WinItem Class Reference
[Windows Adapter]

Rapresents an item object for Windows Clients. More...

#include <WinItem.h>

Inheritance diagram for WinItem:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 WinItem ()
 Default Constructor.
virtual ~WinItem ()
 Destructor.
int getPropertyMapSize ()
 Returns the size of propertyMap;.
void setProperty (const wstring propertyName, const wstring propertyValue)
 Sets a 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.
void removeElement (wstring key)
void resetPropertyMap ()
 Reset the propertyMap (clear all rows).
void resetAllValues ()
 Reset all fields values of the propertyMap (only values).
long getCRC ()
 Return the crc value of the internal map with all values.

Properties

map< wstring, wstring > Map
 Map <propertyName, propertyValue> of props exchanged.

Static Private Attributes

static wstring badString

Detailed Description

Rapresents an item object for Windows Clients.

Contains a map of <propertyName,propertyValue> for all properties exchanged and methods to get/set them.


Member Function Documentation

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.

Parameters:
propertyName the name of property to set
propertyValue the 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.

Parameters:
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
Returns:
true if property found, false if 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).

Note:
If property not found, returns a reference to the 'badString' static member of this class.
Parameters:
propertyName the name of property to retrieve
propertyValue [IN-OUT] true if property found, false if not found
Returns:
the value of property found, by reference

long WinItem::getCRC (  ) 

Return the crc value of the internal map with all values.

It uses only the values of the map not the key


Property Documentation

map<wstring,wstring> WinItem::Map

Map <propertyName, propertyValue> of props exchanged.


The documentation for this class was generated from the following file:
Generated on Mon Feb 4 09:51:00 2008 for Funambol Outlook Plug-in Library by  doxygen 1.5.2