StringConfigProperty Class Reference
[Configuration Handling]

#include <SyncEvolutionConfig.h>

Inheritance diagram for StringConfigProperty:

Inheritance graph
[legend]
Collaboration diagram for StringConfigProperty:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 StringConfigProperty (const string &name, const string &comment, const string &def=string(""), const Values &values=Values())
bool normalizeValue (string &res) const
virtual bool checkValue (const string &propValue, string &error) const
virtual string getProperty (const ConfigNode &node, bool *isDefault=NULL) const

Protected Member Functions

virtual Values getValues () const


Detailed Description

A string property which maps multiple different possible value strings to one generic value, ignoring the case. Values not listed are passed through unchanged. The first value in the list of aliases is the generic one.

The addition operator is defined for the aliases so that they can be constructed more easily.

Definition at line 169 of file SyncEvolutionConfig.h.


Constructor & Destructor Documentation

StringConfigProperty::StringConfigProperty ( const string &  name,
const string &  comment,
const string &  def = string(""),
const Values values = Values() 
) [inline]

Definition at line 171 of file SyncEvolutionConfig.h.


Member Function Documentation

virtual bool StringConfigProperty::checkValue ( const string &  propValue,
string &  error 
) const [inline, virtual]

This implementation accepts all values if no aliases are given, otherwise the value must be part of the aliases.

Reimplemented from ConfigProperty.

Definition at line 198 of file SyncEvolutionConfig.h.

References getValues().

virtual string StringConfigProperty::getProperty ( const ConfigNode node,
bool *  isDefault = NULL 
) const [inline, virtual]

Return values:
isDefault return true if the node had no value set and the default was returned instead

Reimplemented from ConfigProperty.

Definition at line 236 of file SyncEvolutionConfig.h.

References normalizeValue().

virtual Values StringConfigProperty::getValues (  )  const [inline, protected, virtual]

Definition at line 243 of file SyncEvolutionConfig.h.

Referenced by checkValue(), and normalizeValue().

bool StringConfigProperty::normalizeValue ( string &  res  )  const [inline]

Returns:
false if aliases are defined and the string is not one of them

Definition at line 181 of file SyncEvolutionConfig.h.

References getValues().

Referenced by getProperty().


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

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