ECF 1.5
Public Member Functions | List of all members

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 &)
 

Detailed Description

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.

Member Function Documentation

◆ dumpEntries()

void Registry::dumpEntries ( XMLNode &  xRegistry)

Dumps the entire registry in given XML node.

Parameters
xRegistryXMLNode to write values to

Definition at line 271 of file Registry.cpp.

◆ getEntry()

voidP Registry::getEntry ( std::string  key,
uint  index = 0 
)

Returns pointer to parameter value.

Parameters
keyparameter name
indexparameter index (for multiple entities with the same parameter name)

Definition at line 71 of file Registry.cpp.

◆ getType()

ECF::type Registry::getType ( std::string  key)

Returns parameter type.

Parameters
keyparameter name
Returns
parameter type (of enum type)

Definition at line 91 of file Registry.cpp.

◆ isModified()

bool Registry::isModified ( std::string  key,
uint  index = 0 
)

Check whether parameter value has been modified after initial parameter registration.

Parameters
keyparameter name
indexparameter index (for multiple entities with the same parameter name)

Definition at line 106 of file Registry.cpp.

◆ isRegistered()

bool Registry::isRegistered ( std::string  key)

Check whether a parameter is registered.

Parameters
keyparameter name

Definition at line 39 of file Registry.cpp.

◆ modifyEntry()

bool Registry::modifyEntry ( std::string  key,
voidP  x,
uint  index = 0 
)

Stores new value for the parameter.

Parameters
keyparameter name
xpointer to new parameter value

Definition at line 50 of file Registry.cpp.

◆ readEntries()

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.

Parameters
nodeXML node
prefixconfiguration node context: parameter name is prefix + key
indexparameter index (for multiple entities with the same parameter name)

Definition at line 128 of file Registry.cpp.

◆ registerEntry()

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.

Parameters
keyparameter name
xparameter value
Tparameter type (of enum type)
descriptionparameter description (optional)
indexparameter index (for multiple genotype entities with the same parameter name)
Returns
true if new parameter is registered, false otherwise

Definition at line 15 of file Registry.cpp.

◆ write()

void Registry::write ( XMLNode &  xRegistry)

Writes registry values in given XML node.

Parameters
xRegistryXMLNode to write values to

Definition at line 223 of file Registry.cpp.


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