Repository for all the system parameters. More...
#include <Registry.h>
Public Member Functions | |
| bool | registerEntry (std::string, voidP, enum ECF::type, std::string description="", uint index=0) |
| bool | isRegistered (std::string) |
| bool | modifyEntry (std::string, voidP, uint index=0) |
| voidP | getEntry (std::string, uint index=0) |
| ECF::type | getType (std::string) |
| bool | isModified (std::string, uint index=0) |
| bool | readEntries (const XMLNode &node, std::string prefix="", uint index=0) |
| void | dumpEntries (XMLNode &) |
| void | write (XMLNode &) |
Repository for all the system parameters.
The Registry stores all system parameters and parses sections of XML configuration file.
Definition at line 41 of file Registry.h.
| void Registry::dumpEntries | ( | XMLNode & | xRegistry | ) |
Dumps the entire registry in given XML node.
| xRegistry | XMLNode to write values to |
Definition at line 271 of file Registry.cpp.
| voidP Registry::getEntry | ( | std::string | key, | |
| uint | index = 0 | |||
| ) |
Returns pointer to parameter value.
| key | parameter name | |
| index | parameter index (for multiple entities with the same parameter name) |
Definition at line 71 of file Registry.cpp.
| ECF::type Registry::getType | ( | std::string | key | ) |
Returns parameter type.
| key | parameter name |
Definition at line 91 of file Registry.cpp.
| bool Registry::isModified | ( | std::string | key, | |
| uint | index = 0 | |||
| ) |
Check whether parameter value has been modified after initial parameter registration.
| key | parameter name | |
| index | parameter index (for multiple entities with the same parameter name) |
Definition at line 106 of file Registry.cpp.
| bool Registry::isRegistered | ( | std::string | key | ) |
Check whether a parameter is registered.
| key | parameter name |
Definition at line 39 of file Registry.cpp.
| bool Registry::modifyEntry | ( | std::string | key, | |
| voidP | x, | |||
| uint | index = 0 | |||
| ) |
Stores new value for the parameter.
| key | parameter name | |
| x | pointer to new parameter value |
Definition at line 50 of file Registry.cpp.
| bool Registry::readEntries | ( | const XMLNode & | node, | |
| std::string | prefix = "", |
|||
| uint | index = 0 | |||
| ) |
Reads entries from an XML node.
The context of different configuration nodes (Algorithm, Genotype, Registry) is set with the prefix parameter.
| node | XML node | |
| prefix | configuration node context: parameter name is prefix + key | |
| index | parameter index (for multiple entities with the same parameter name) |
Definition at line 128 of file Registry.cpp.
| bool Registry::registerEntry | ( | std::string | key, | |
| voidP | x, | |||
| enum ECF::type | T, | |||
| std::string | description = "", |
|||
| uint | index = 0 | |||
| ) |
Registers a parameter with the Registry.
Called by each class wanting to use parameters, before configuration file is read.
| key | parameter name | |
| x | parameter value | |
| T | parameter type (of enum type) | |
| description | parameter description (optional) | |
| index | parameter index (for multiple genotype entities with the same parameter name) |
Definition at line 15 of file Registry.cpp.
| void Registry::write | ( | XMLNode & | xRegistry | ) |
Writes registry values in given XML node.
| xRegistry | XMLNode to write values to |
Definition at line 223 of file Registry.cpp.
1.7.1