OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OpenAB::VCardField Class Reference

Represents single parsed vCard field. Filed has its value and additionally it can have set of parameters (each of parameter can have multiple values). More...

#include <PIMContactItem.hpp>

Public Member Functions

 VCardField ()
 Default constructor. More...
 
 VCardField (const std::string &v)
 Constructor. More...
 
 ~VCardField ()
 Destructor, virtual by default. More...
 
bool parse (std::string vCardFieldString)
 Parses field from string. More...
 
void setValue (const std::string &value)
 Sets given value. More...
 
bool operator< (const VCardField &other) const
 Comparison operator. Compares two VCardField objects in alphabetical order (using toString to create string representation of VCardField). More...
 
std::string toString () const
 Converts content of VCardField into string format. Used for comparing two VCardField instances and for debugging purposes. More...
 
std::string getValue () const
 Returns value of VCardField. VCardField value is the string that occurred after last ":" character in field string from vCard. More...
 
std::map< std::string,
std::set< std::string > > 
getParams () const
 Return map of all parameters assigned to given field. More...
 

Detailed Description

Represents single parsed vCard field. Filed has its value and additionally it can have set of parameters (each of parameter can have multiple values).

Note
example of vCard field with multiple parameters: TEL;TYPE=WORK;TYPE=FAX:0035387123100 the same field can be written as TEL;TYPE=WORK,FAX:0035387123100

Constructor & Destructor Documentation

OpenAB::VCardField::VCardField ( )

Default constructor.

OpenAB::VCardField::VCardField ( const std::string &  v)

Constructor.

Parameters
[in]vvalue of field.
OpenAB::VCardField::~VCardField ( )

Destructor, virtual by default.

Member Function Documentation

std::map< std::string, std::set< std::string > > OpenAB::VCardField::getParams ( ) const

Return map of all parameters assigned to given field.

Returns
map of all parameters assigned to field.
std::string OpenAB::VCardField::getValue ( ) const

Returns value of VCardField. VCardField value is the string that occurred after last ":" character in field string from vCard.

Returns
value of VCardField.
bool OpenAB::VCardField::operator< ( const VCardField other) const

Comparison operator. Compares two VCardField objects in alphabetical order (using toString to create string representation of VCardField).

Parameters
[in]otherVCardField instance to compare with.
Returns
true if field should be sorted before other field (according to their string representations).
bool OpenAB::VCardField::parse ( std::string  vCardFieldString)

Parses field from string.

Parameters
[in]vCardFieldStringfield string from vCard to be parsed.
Returns
true if field was parsed successfully, false otherwise.
void OpenAB::VCardField::setValue ( const std::string &  value)

Sets given value.

Parameters
[in]valuevalue to be set
std::string OpenAB::VCardField::toString ( ) const

Converts content of VCardField into string format. Used for comparing two VCardField instances and for debugging purposes.

Returns
string representation of VCardField.

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