Wt examples 3.3.12
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 bvba, Kessel-Lo, Belgium.
4 *
5 * See the LICENSE file for terms of use.
6 */
7#ifndef CONTACT_H_
8#define CONTACT_H_
9
14
19struct 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
45#endif // CONTACT_H_
An email contact.
Definition Contact.h:20
std::wstring name
The contact name.
Definition Contact.h:23
std::wstring email
The contact email address.
Definition Contact.h:27
std::wstring formatted() const
Get the typical single string form: "name" <email>
Definition Contact.h:38
Contact(const std::wstring name_, const std::wstring email_)
Create a new contact.
Definition Contact.h:31

Generated on Fri May 17 2024 for the C++ Web Toolkit (Wt) by doxygen 1.9.8