Public Member Functions

Registry Class Reference
[Evolutionary FrameworkMain Classes]

Repository for all the system parameters. More...

#include <Registry.h>

List of all members.

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 (pt::ptree &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 45 of file Registry.h.


Member Function Documentation

void Registry::dumpEntries ( XMLNode &  xRegistry  ) 

Dumps the entire registry in given XML node.

Parameters:
xRegistry XMLNode to write values to

Definition at line 406 of file Registry.cpp.

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

Returns pointer to parameter value.

Parameters:
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.

Parameters:
key parameter name
Returns:
parameter type (of enum type)

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.

Parameters:
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.

Parameters:
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.

Parameters:
key parameter name
x pointer to new parameter value

Definition at line 50 of file Registry.cpp.

bool Registry::readEntries ( pt::ptree &  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:
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 144 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.

Parameters:
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)
Returns:
true if new parameter is registered, false otherwise

Definition at line 15 of file Registry.cpp.

void Registry::write ( XMLNode &  xRegistry  ) 

Writes registry values in given XML node.

Parameters:
xRegistry XMLNode to write values to

Definition at line 358 of file Registry.cpp.


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