MemoryKeyValueStore Class Reference
[Client]

This is the interface for the handling of the key/value that has to be written in the storage. More...

#include <MemoryKeyValueStore.h>

Inheritance diagram for MemoryKeyValueStore:
[legend]
Collaboration diagram for MemoryKeyValueStore:
[legend]

List of all members.

Public Member Functions

virtual StringBuffer readPropertyValue (const char *prop) const
 Read a property value from the data ArrayList.
virtual int setPropertyValue (const char *prop, const char *value)
 Sets a property value.
virtual int removeProperty (const char *prop)
 Remove a certain property from the data ArrayList.
virtual int removeAllProperties ()
 Remove all the properties in the value store.
virtual EnumerationgetProperties ()
 Read all the properties that are in the store.
virtual int close ()=0
 Save the current properties that are in the data arraylist.

Protected Attributes

ArrayListEnumeration data
 The list contains the pair key/value that are what is in the file that is in the form key:value.


Detailed Description

This is the interface for the handling of the key/value that has to be written in the storage.

It provides methods that has to be specialized by implementation on filesystem, registry, db...


Member Function Documentation

virtual int MemoryKeyValueStore::close (  )  [pure virtual]

Save the current properties that are in the data arraylist.

Returns:
0 - success, failure otherwise

Implements KeyValueStore.

Implemented in PropertyFile.

virtual Enumeration& MemoryKeyValueStore::getProperties (  )  [inline, virtual]

Read all the properties that are in the store.

This is an enumeration of KeyValuePairs.

Implements KeyValueStore.

References data.

virtual int MemoryKeyValueStore::removeProperty ( const char *  prop  )  [virtual]

Remove a certain property from the data ArrayList.

Parameters:
prop the name of the property which is to be removed
Returns:
int 0 on success, an error code otherwise

Implements KeyValueStore.

Reimplemented in PropertyFile.

virtual int MemoryKeyValueStore::setPropertyValue ( const char *  prop,
const char *  value 
) [virtual]

Sets a property value.

The value might be cached inside the implementation of this interface. To ensure that it is stored persistently and to do error checking, call save().

Parameters:
prop - the property name
value - the property value (zero terminated string)
Returns:
int 0 on success, an error code otherwise

Implements KeyValueStore.

Reimplemented in PropertyFile.


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

Generated on Tue Apr 6 13:00:42 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1