00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef INCL_EVOLUTION_PREFIX_CONFIG_NODE
00021 # define INCL_EVOLUTION_PREFIX_CONFIG_NODE
00022
00023 #include <ConfigNode.h>
00024 #include <boost/shared_ptr.hpp>
00025
00026 #include <map>
00027 #include <utility>
00028 #include <vector>
00029 #include <string>
00030 using namespace std;
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 class PrefixConfigNode : public ConfigNode {
00042 public:
00043
00044 PrefixConfigNode(const string prefix,
00045 const boost::shared_ptr<ConfigNode> &node);
00046
00047
00048 PrefixConfigNode(const string prefix,
00049 const boost::shared_ptr<const ConfigNode> &node);
00050
00051 virtual string getName() const { return m_readOnlyNode->getName(); }
00052
00053
00054 virtual void flush();
00055 virtual string readProperty(const string &property) const;
00056 virtual void setProperty(const string &property,
00057 const string &value,
00058 const string &comment = "",
00059 const string *defValue = NULL);
00060 virtual void readProperties(map<string, string> &props) const;
00061 virtual void removeProperty(const string &property);
00062 virtual bool exists() const { return m_readOnlyNode->exists(); }
00063
00064 private:
00065 string m_prefix;
00066 boost::shared_ptr<ConfigNode> m_node;
00067 boost::shared_ptr<const ConfigNode> m_readOnlyNode;
00068 };
00069
00070 #endif