PvCard Class Reference

Class to represent a vCard as per RFC2426. More...

`#include <vcard.h>`

Inheritance diagram for PvCard:

## Classes

struct | Address
struct | EMail
struct | ExtendedType
class | InlineValue
| Representation of EBNF img-inline-value/snd-inline-value. More...
struct | MultiValue
class | ParamValue
| Representation of EBNF param-value. More...
class | ParamValues
| Comma separated list of param-value's. More...
class | Separator
struct | Telephone
class | TextValue
| Representation of EBNF text-value. More...
class | TextValues
| Comma separated list of text-value's. More...
class | Token
| Representation of token (EBNF group, name, iana-token or x-name) More...
class | TypeValues
class | URIValue

## Public Types

enum | Format { e_Standard, e_XML_XMPP, e_XML_RDF, e_XML_RFC }
| Output string formats. More...
typedef std::map< Token, ParamValues > | ParamMap
typedef std::map< Token, ExtendedType > | ExtendedTypeMap
Public Types inherited from PObject
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
| Result of the comparison operation performed by the `Compare()` function. More...

## Public Member Functions

| PvCard ()
bool | IsValid () const
virtual void | PrintOn (ostream &strm) const
| Output the contents of the object to the stream. More...
virtual void | ReadFrom (istream &strm)
| Input the contents of the object from the stream. More...
bool | Parse (const PString &str)
PString | AsString (Format fmt=e_Standard)
Public Member Functions inherited from PObject
virtual | ~PObject ()
virtual PObject * | Clone () const
| Create a copy of the class on the heap. More...
virtual PINDEX | HashFunction () const
| This function yields a hash value required by the `PDictionary` class. More...
virtual const char * | GetClass (unsigned ancestor=0) const
| Get the current dynamic type of the object instance. More...
PBoolean | IsClass (const char *cls) const
virtual PBoolean | InternalIsDescendant (const char *clsName) const
| Determine if the dynamic type of the current instance is a descendent of the specified class. More...
virtual Comparison | Compare (const PObject &obj) const
| Compare the two objects and return their relative rank. More...
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const
| Determine the byte wise comparison of two objects. More...
bool | operator== (const PObject &obj) const
| Compare the two objects. More...
bool | operator!= (const PObject &obj) const
| Compare the two objects. More...
bool | operator< (const PObject &obj) const
| Compare the two objects. More...
bool | operator> (const PObject &obj) const
| Compare the two objects. More...
bool | operator<= (const PObject &obj) const
| Compare the two objects. More...
bool | operator>= (const PObject &obj) const
| Compare the two objects. More...

## Public Attributes

Token | m_group
TextValue | m_fullName
TextValue | m_version
TextValue | m_familyName
TextValue | m_givenName
TextValues | m_additionalNames
TextValue | m_honorificPrefixes
TextValue | m_honorificSuffixes
TextValues | m_nickNames
TextValue | m_sortString
PTime | m_birthday
URIValue | m_url
InlineValue | m_photo
InlineValue | m_sound
TextValue | m_timeZone
double | m_latitude
double | m_longitude
TextValue | m_title
TextValue | m_role
InlineValue | m_logo
TextValue | m_agent
TextValue | m_organisationName
TextValue | m_organisationUnit
TextValue | m_mailer
TextValues | m_categories
TextValue | m_note
TextValue | m_productId
TextValue | m_guid
TextValue | m_revision
TextValue | m_class
TextValue | m_publicKey
PArray< Address > | m_addresses
PArray< Address > | m_labels
PArray< Telephone > | m_telephoneNumbers
PArray< EMail > | m_emailAddresses
ExtendedTypeMap | m_extensions

## Additional Inherited Members

Static Public Member Functions inherited from PObject
static const char * | Class ()
| Get the name of the class as a C string. More...
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size)
| Internal function caled from CompareObjectMemoryDirect() More...
Protected Member Functions inherited from PObject
| PObject ()
| Constructor for PObject, made protected so cannot ever create one on its own. More...

## Detailed Description

Class to represent a vCard as per RFC2426.

## Member Typedef Documentation

## ExtendedTypeMap

typedef std::map<Token, ExtendedType> PvCard::ExtendedTypeMap

## ParamMap

typedef std::map<Token, ParamValues> PvCard::ParamMap

## Member Enumeration Documentation

## Format

enum PvCard::Format

Output string formats.

If operator<< or PrintOn() is used the stream width() parameter may be set to this to indicate the output format. e.g. `stream << setw(PvCard::e_XML_XMPP) << card;`

Enumerator
e_Standard | As per RFC2425.
e_XML_XMPP | Jabber XML.
e_XML_RDF | W3C version.
e_XML_RFC | Draft RFC.

## Constructor & Destructor Documentation

## PvCard()

PvCard::PvCard | ( |  | ) |

## Member Function Documentation

## AsString()

PString PvCard::AsString | ( | Format | fmt = `e_Standard` | ) |

## IsValid()

bool PvCard::IsValid | ( |  | ) | const

## Parse()

bool PvCard::Parse | ( | const PString & | str | ) |

## PrintOn()

virtual void PvCard::PrintOn | ( | ostream & | strm | ) | const

virtual

Output the contents of the object to the stream.

The exact output is dependent on the exact semantics of the descendent class. This is primarily used by the standard `operator<<` function.

The default behaviour is to print the class name.

Reimplemented from PObject.

## ReadFrom()

virtual void PvCard::ReadFrom | ( | istream & | strm | ) |

virtual

Input the contents of the object from the stream.

The exact input is dependent on the exact semantics of the descendent class. This is primarily used by the standard `operator>>` function.

The default behaviour is to do nothing.

Reimplemented from PObject.

## Member Data Documentation

## m_additionalNames

TextValues PvCard::m_additionalNames

## m_addresses

PArray<Address> PvCard::m_addresses

## m_agent

TextValue PvCard::m_agent

## m_birthday

PTime PvCard::m_birthday

## m_categories

TextValues PvCard::m_categories

## m_class

TextValue PvCard::m_class

## m_emailAddresses

PArray<EMail> PvCard::m_emailAddresses

## m_extensions

ExtendedTypeMap PvCard::m_extensions

## m_familyName

TextValue PvCard::m_familyName

## m_fullName

TextValue PvCard::m_fullName

## m_givenName

TextValue PvCard::m_givenName

## m_group

Token PvCard::m_group

## m_guid

TextValue PvCard::m_guid

## m_honorificPrefixes

TextValue PvCard::m_honorificPrefixes

## m_honorificSuffixes

TextValue PvCard::m_honorificSuffixes

## m_labels

PArray<Address> PvCard::m_labels

## m_latitude

double PvCard::m_latitude

## m_logo

InlineValue PvCard::m_logo

## m_longitude

double PvCard::m_longitude

## m_mailer

TextValue PvCard::m_mailer

## m_nickNames

TextValues PvCard::m_nickNames

## m_note

TextValue PvCard::m_note

## m_organisationName

TextValue PvCard::m_organisationName

## m_organisationUnit

TextValue PvCard::m_organisationUnit

## m_photo

InlineValue PvCard::m_photo

## m_productId

TextValue PvCard::m_productId

## m_publicKey

TextValue PvCard::m_publicKey

## m_revision

TextValue PvCard::m_revision

## m_role

TextValue PvCard::m_role

## m_sortString

TextValue PvCard::m_sortString

## m_sound

InlineValue PvCard::m_sound

## m_telephoneNumbers

PArray<Telephone> PvCard::m_telephoneNumbers

## m_timeZone

TextValue PvCard::m_timeZone

## m_title

TextValue PvCard::m_title

## m_url

URIValue PvCard::m_url

## m_version

TextValue PvCard::m_version

The documentation for this class was generated from the following file:

- vcard.h