#include <ConfigTree.h>
Public Types | |
enum | PropertyType { visible, hidden, other } |
Public Member Functions | |
virtual | ~ConfigTree () |
virtual void | flush ()=0 |
virtual string | getRootPath () const =0 |
virtual boost::shared_ptr < ConfigNode > | open (const string &path, PropertyType type, const string &otherId=string(""))=0 |
virtual list< string > | getChildren (const string &path)=0 |
A ConfigNode can list all its properties while the tree lists nodes at a specific level and creates nodes.
This model is similar to the Funambol C++ DeviceManagementTree. Besides being implemented differently, it also provides additional functionality:
Definition at line 61 of file ConfigTree.h.
Selects which node attached to a path name is to be used. This is similar in concept to multiple data forks in a file.
visible | visible configuration properties |
hidden | hidden read/write properties |
other | additional node selected via otherID |
Definition at line 76 of file ConfigTree.h.
virtual ConfigTree::~ConfigTree | ( | ) | [inline, virtual] |
frees all resources *without* flushing changed nodes
Definition at line 64 of file ConfigTree.h.
virtual void ConfigTree::flush | ( | ) | [pure virtual] |
ensure that all changes are saved persistently
Implemented in FileConfigTree, and VolatileConfigTree.
virtual list<string> ConfigTree::getChildren | ( | const string & | path | ) | [pure virtual] |
returns names of all existing nodes beneath the given path
Implemented in FileConfigTree.
virtual string ConfigTree::getRootPath | ( | ) | const [pure virtual] |
a string identifying the root of the configuration - exact meaning varies
Implemented in FileConfigTree.
virtual boost::shared_ptr<ConfigNode> ConfigTree::open | ( | const string & | path, | |
PropertyType | type, | |||
const string & | otherId = string("") | |||
) | [pure virtual] |
Open the specified node. Opening it multiple times will return the same instance, so the content is always synchronized.
path | a relative path with / as separator | |
type | selects which fork of that path is to be opened (visible, hidden, change tracking) | |
otherId | an additional string to be attached to the other node's name (allows having multiple different such nodes); an empty string is allowed |
Implemented in FileConfigTree.