ConfigNode Class Reference

#include <ConfigNode.h>

Inheritance diagram for ConfigNode:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~ConfigNode ()
virtual string getName () const =0
virtual void flush ()=0
virtual string readProperty (const string &property) const =0
virtual void setProperty (const string &property, const string &value, const string &comment=string(""), const string *defValue=NULL)=0
virtual void readProperties (map< string, string > &props) const =0
virtual void removeProperty (const string &property)=0
virtual bool exists () const =0


Detailed Description

This class corresponds to the Funambol C++ client DeviceManagementNode, but offers a slightly different API. See ConfigTree for details.

Definition at line 33 of file ConfigNode.h.


Constructor & Destructor Documentation

virtual ConfigNode::~ConfigNode (  )  [inline, virtual]

free resources without saving

Definition at line 36 of file ConfigNode.h.


Member Function Documentation

virtual bool ConfigNode::exists (  )  const [pure virtual]

Node exists in backend storage.

Implemented in FileConfigNode, FilterConfigNode, PrefixConfigNode, and SafeConfigNode.

virtual void ConfigNode::flush (  )  [pure virtual]

save all changes persistently

Implemented in FileConfigNode, FilterConfigNode, PrefixConfigNode, SafeConfigNode, and VolatileConfigNode.

virtual string ConfigNode::getName (  )  const [pure virtual]

a name for the node that the user can understand

Implemented in FileConfigNode, FilterConfigNode, PrefixConfigNode, SafeConfigNode, and VolatileConfigNode.

Referenced by ConfigProperty::throwValueError().

virtual void ConfigNode::readProperties ( map< string, string > &  props  )  const [pure virtual]

Extract all list of all currently defined properties and their values. Does not include values which were initialized with their defaults, if the implementation remembers that.

Return values:
props to be filled with key/value pairs; guaranteed to be empty before the call

Implemented in FileConfigNode, FilterConfigNode, PrefixConfigNode, and SafeConfigNode.

virtual string ConfigNode::readProperty ( const string &  property  )  const [pure virtual]

Returns the value of the given property

Parameters:
property - the property name
Returns:
value of the property or empty string if not set

Implemented in FileConfigNode, FilterConfigNode, PrefixConfigNode, and SafeConfigNode.

Referenced by TypedConfigProperty< T >::getProperty(), and ConfigProperty::getProperty().

virtual void ConfigNode::removeProperty ( const string &  property  )  [pure virtual]

Remove a certain property.

Parameters:
property the name of the property which is to be removed

Implemented in FileConfigNode, FilterConfigNode, PrefixConfigNode, and SafeConfigNode.

virtual void ConfigNode::setProperty ( const string &  property,
const string &  value,
const string &  comment = string(""),
const string *  defValue = NULL 
) [pure virtual]

Sets a property value.

Parameters:
property the property name
value the property value (zero terminated string)
comment a comment explaining what the property is about, with
separating lines; might be used by the backend when adding a new property
defValue If a defValue is provided and the value matches the default, then the node is asked to remember that the value hasn't really been changed. An implementation can decide to not support this.

Implemented in FileConfigNode, FilterConfigNode, PrefixConfigNode, and SafeConfigNode.

Referenced by ConfigProperty::setDefaultProperty(), TypedConfigProperty< T >::setProperty(), and ConfigProperty::setProperty().


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

Generated on Sat Oct 18 17:17:03 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1