Wt examples  4.10.4
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 
14 
19 struct Contact
20 {
23  std::u32string name;
24 
27  std::u32string email;
28 
31  Contact(const std::u32string name_, const std::u32string email_)
32  : name(name_),
33  email(email_)
34  { }
35 
38  std::u32string formatted() const {
39  return U"\"" + name + U"\" <" + email + U">";
40  }
41 };
42 
44 
45 #endif // CONTACT_H_
An email contact.
Definition: Contact.h:20
Contact(const std::u32string name_, const std::u32string email_)
Create a new contact.
Definition: Contact.h:31
std::u32string name
The contact name.
Definition: Contact.h:23
std::u32string formatted() const
Get the typical single string form: "name" <email>
Definition: Contact.h:38
std::u32string email
The contact email address.
Definition: Contact.h:27