#include <WinItem.h>
Inheritance diagram for WinItem:

Public Member Functions | |
| WinItem () | |
| Default Constructor. | |
| virtual | ~WinItem () |
| Destructor. | |
| int | getPropertyMapSize () |
| Returns the size of propertyMap;. | |
| map< wstring, wstring > & | getPropertyMap () |
| Returns a reference to the internal propertyMap. | |
| void | setProperty (const wstring propertyName, const wstring propertyValue) |
| Sets a property value of name 'propertyName'. | |
| void | setIntProperty (const wstring propertyName, const int intValue) |
| Sets a integer property value of name 'propertyName'. | |
| bool | getProperty (const wstring propertyName, wstring &propertyValue) |
| Gets a property value from its name. | |
| wstring & | getPropertyRef (const wstring propertyName, bool *found) |
| Gets a property value from its name. | |
| bool | getIntProperty (const wstring propertyName, int *intValue) |
| Gets a property value from its name, and convert into a integer value. | |
| void | removeElement (wstring key) |
| void | resetPropertyMap () |
| Reset the propertyMap (clear all rows). | |
| void | resetAllValues () |
| Reset all fields values of the propertyMap (only values). | |
| virtual wstring & | toString ()=0 |
| Format and return a string from the propertyMap. | |
| virtual int | parse (const wstring dataString)=0 |
| Parse a string and fills the propertyMap. | |
| virtual long | getCRC () |
| Return the crc value of the internal map with all values. | |
| WCHAR * | getVObjectPropertyValue (VObject *vo, const WCHAR *propertyName) |
| Utility to safe-retrieve the property value inside VObject 'vo'. | |
| virtual wstring & | getName () |
| Util function that returns the name of the item, usually the "Subject" property. | |
Public Attributes | |
| map< wstring, wstring > | propertyMap |
| Map <propertyName, propertyValue> of props exchanged. | |
Static Protected Attributes | |
| static unsigned long | crc32Table [256] |
| The table used to calculate the crc. | |
Contains a map of <propertyName,propertyValue> for all properties exchanged and methods to get/set them.
| void WinItem::setProperty | ( | const wstring | propertyName, | |
| const wstring | propertyValue | |||
| ) |
Sets a property value of name 'propertyName'.
Stores the value into the propertyMap, adds a new row <name, value> if the property is not found, otherwise existing value is overwritten.
| propertyName | the name of property to set | |
| propertyValue | the value of property to set |
| void WinItem::setIntProperty | ( | const wstring | propertyName, | |
| const int | intValue | |||
| ) |
Sets a integer property value of name 'propertyName'.
Like 'setProperty', but the input value is integer and it's formatted into a string.
| propertyName | the name of property to set | |
| propertyValue | the integer value of property to set |
| bool WinItem::getProperty | ( | const wstring | propertyName, | |
| wstring & | propertyValue | |||
| ) |
Gets a property value from its name.
Retrieves the value from the propertyMap. If property is not found, returns false.
| propertyName | the name of property to retrieve | |
| propertyValue | [IN-OUT] the value of property, it's set to empty string if the property is not found |
| wstring& WinItem::getPropertyRef | ( | const wstring | propertyName, | |
| bool * | found | |||
| ) |
Gets a property value from its name.
Retrieves the value from the propertyMap. Returns a reference to the internal value of property inside the map (value not copied).
| propertyName | the name of property to retrieve | |
| propertyValue | [IN-OUT] true if property found, false if not found |
| bool WinItem::getIntProperty | ( | const wstring | propertyName, | |
| int * | intValue | |||
| ) |
Gets a property value from its name, and convert into a integer value.
Retrieves the value from the propertyMap. If property is not found or not correctly converted into int, returns false.
| propertyName | the name of property to retrieve | |
| propertyValue | [IN-OUT] the value of property, integer value |
| virtual wstring& WinItem::toString | ( | ) | [pure virtual] |
Format and return a string from the propertyMap.
Not supported properties are ignored and so not formatted as they don't have a correspondence in propertyMap.
Implemented in WinContact, WinContactSIF, WinEvent, WinEventSIF, WinNote, WinNoteSIF, WinRecipient, WinRecurrence, WinRecurrenceSIF, WinTask, and WinTaskSIF.
| virtual int WinItem::parse | ( | const wstring | dataString | ) | [pure virtual] |
Parse a string and fills the propertyMap.
The map is cleared and will contain only found properties at the end of the parsing.
| dataString | input vCard string to be parsed |
Implemented in WinContact, WinContactSIF, WinEvent, WinEventSIF, WinNote, WinNoteSIF, WinRecipient, WinRecurrence, WinRecurrenceSIF, WinTask, and WinTaskSIF.
| virtual long WinItem::getCRC | ( | ) | [virtual] |
| WCHAR* WinItem::getVObjectPropertyValue | ( | VObject * | vo, | |
| const WCHAR * | propertyName | |||
| ) |
Utility to safe-retrieve the property value inside VObject 'vo'.
| vo | : VObject to read from | |
| propertyName | : the property name requested |
| virtual wstring& WinItem::getName | ( | ) | [virtual] |
Util function that returns the name of the item, usually the "Subject" property.
It should be implemented by derived classes to return a desired value. If property doesn't exist, returns "<NULL>"
Reimplemented in WinContact.
| map<wstring,wstring> WinItem::propertyMap |
Map <propertyName, propertyValue> of props exchanged.
1.5.1