ECF 1.5
Registry.h
1#ifndef Registry_h
2#define Registry_h
3
4#include <map>
5
6#define NODE_ENTRY "Entry"
7
8namespace ECF
9{
10
15enum type
16 { INT, UINT, STRING, FLOAT, DOUBLE, CHAR, ERROR };
17
18
23struct Param
24{
25 voidP value;
26 enum ECF::type T;
27 bool bModified;
28 std::string description;
29};
30
31}
32typedef boost::shared_ptr<ECF::Param> ParamP;
33
34
42{
43private:
44 std::map < std::string, ParamP > parameters_;
45 typedef std::map < std::string, ParamP >::iterator map_iter;
46
47public:
48 bool registerEntry(std::string, voidP, enum ECF::type, std::string description = "", uint index = 0);
49 bool isRegistered(std::string);
50 bool modifyEntry(std::string, voidP, uint index = 0);
51 voidP getEntry(std::string, uint index = 0);
52 ECF::type getType(std::string);
53 bool isModified(std::string, uint index = 0);
54 bool readEntries(const XMLNode& node, std::string prefix = "", uint index = 0);
55 void dumpEntries(XMLNode&);
56 void write(XMLNode&);
57};
58typedef boost::shared_ptr<Registry> RegistryP;
59
60#endif
61
Repository for all the system parameters.
Definition: Registry.h:42
bool isRegistered(std::string)
Definition: Registry.cpp:39
voidP getEntry(std::string, uint index=0)
Definition: Registry.cpp:71
void write(XMLNode &)
Definition: Registry.cpp:223
ECF::type getType(std::string)
Definition: Registry.cpp:91
bool modifyEntry(std::string, voidP, uint index=0)
Definition: Registry.cpp:50
void dumpEntries(XMLNode &)
Definition: Registry.cpp:271
bool readEntries(const XMLNode &node, std::string prefix="", uint index=0)
Definition: Registry.cpp:128
bool registerEntry(std::string, voidP, enum ECF::type, std::string description="", uint index=0)
Definition: Registry.cpp:15
bool isModified(std::string, uint index=0)
Definition: Registry.cpp:106
type
Data types used for configuration file parameters.
Definition: Registry.h:16
Definition: nodes.h:92
ECF parameter structure, as stored in the Registry.
Definition: Registry.h:24