74 Format fmt = e_Standard
85 virtual void PrintOn(ostream & strm)
const;
86 virtual void ReadFrom(istream & strm);
91 class Separator :
public PObject
94 Separator(
char c =
'\0') : m_separator(c) { }
95 virtual void PrintOn(ostream & strm)
const;
96 virtual void ReadFrom(istream & strm);
97 bool operator==(
char c)
const {
return m_separator == c; }
98 bool operator!=(
char c)
const {
return m_separator != c; }
103 class ParamValue :
public PString
106 ParamValue(
const char * str = NULL) :
PString(str) { }
108 virtual void PrintOn(ostream & strm)
const;
109 virtual void ReadFrom(istream & strm);
112 class ParamValues :
public PArray<ParamValue>
115 virtual void PrintOn(ostream & strm)
const;
116 virtual void ReadFrom(istream & strm);
119 typedef std::map<Token, ParamValues> ParamMap;
121 class TypeValues :
public ParamValues
125 TypeValues(
const ParamValues & values) : ParamValues(values) { }
126 virtual void PrintOn(ostream & strm)
const;
130 class TextValue :
public PString
133 TextValue(
const char * str = NULL) :
PString(str) { }
135 virtual void PrintOn(ostream & strm)
const;
136 virtual void ReadFrom(istream & strm);
140 class TextValues :
public PArray<TextValue>
143 virtual void PrintOn(ostream & strm)
const;
144 virtual void ReadFrom(istream & strm);
147 class URIValue :
public PURL
150 URIValue(
const char * str = NULL) :
PURL(str) { }
152 virtual void PrintOn(ostream & strm)
const;
153 virtual void ReadFrom(istream & strm);
157 class InlineValue :
public URIValue
160 InlineValue(
const char * str = NULL) : URIValue(str), m_params(NULL) { }
161 InlineValue(
const PString & str) : URIValue(str), m_params(NULL) { }
162 virtual void PrintOn(ostream & strm)
const;
163 virtual void ReadFrom(istream & strm);
164 InlineValue & ReadFromParam(
const ParamMap & params);
166 const ParamMap * m_params;
170 TextValue m_fullName;
173 TextValue m_familyName;
174 TextValue m_givenName;
175 TextValues m_additionalNames;
176 TextValue m_honorificPrefixes;
177 TextValue m_honorificSuffixes;
178 TextValues m_nickNames;
179 TextValue m_sortString;
185 TextValue m_timeZone;
193 TextValue m_organisationName;
194 TextValue m_organisationUnit;
197 TextValues m_categories;
200 TextValue m_productId;
202 TextValue m_revision;
204 TextValue m_publicKey;
206 struct MultiValue :
public PObject {
208 MultiValue(
const PString & type) { m_types.Append(
new ParamValue(type)); }
211 void SetTypes(
const ParamMap & params);
214 struct Address :
public MultiValue {
215 Address(
bool label =
false) : m_label(label) { }
216 virtual void PrintOn(ostream & strm)
const;
217 virtual void ReadFrom(istream & strm);
220 TextValue m_postOfficeBox;
221 TextValue m_extendedAddress;
223 TextValue m_locality;
225 TextValue m_postCode;
231 struct Telephone :
public MultiValue {
237 virtual void PrintOn(ostream & strm)
const;
243 struct EMail :
public MultiValue {
249 virtual void PrintOn(ostream & strm)
const;
254 struct ExtendedType {
255 ParamMap m_parameters;
259 typedef std::map<Token, ExtendedType> ExtendedTypeMap;
260 ExtendedTypeMap m_extensions;
266 #endif // PTLIB_VCARD_H
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:2164
This class defines an absolute time and date.
Definition: ptime.h:49
PCaselessString & operator=(const PString &str)
Assign the string to the current object.
This class is a variation of a string that ignores case.
Definition: pstring.h:2012
virtual void ReadFrom(istream &strm)
Input the contents of the object from the stream.
The character string class.
Definition: pstring.h:108
static const PString & Empty()
Return an empty string.
This template class maps the PArrayObjects to a specific object type.
Definition: array.h:925
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
This class describes a Universal Resource Locator.
Definition: url.h:56
virtual void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
void PrintOn(ostream &strm) const