Wt examples  3.7.1
Contact.h
Go to the documentation of this file.
1 // This may look like C code, but it's really -*- C++ -*-
2 /*
3  * Copyright (C) 2008 Emweb bv, Herent, Belgium.
4  *
5  * See the LICENSE file for terms of use.
6  */
7 #ifndef CONTACT_H_
8 #define CONTACT_H_
9 
13 
19 struct Contact
20 {
23  std::wstring name;
24 
27  std::wstring email;
28 
31  Contact(const std::wstring name_, const std::wstring email_)
32  : name(name_),
33  email(email_)
34  { }
35 
38  std::wstring formatted() const {
39  return L'"' + name + L"\" <" + email + L">";
40  }
41 };
42 
44 
45 #endif // CONTACT_H_
std::wstring name
The contact name.
Definition: Contact.h:23
Contact(const std::wstring name_, const std::wstring email_)
Create a new contact.
Definition: Contact.h:31
std::wstring email
The contact email address.
Definition: Contact.h:27
An email contact.
Definition: Contact.h:19
std::wstring formatted() const
Get the typical single string form: "name" <email>
Definition: Contact.h:38

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13