Classes to read parameters. More...
#include <param.h>

Public Member Functions | |
| ParamTree (const char *name_, const char *value_=(char *) NULL) | |
| Constructor for a new node. | |
| ParamTree (ParamTree &PT) | |
| Copy-Constructor. | |
| ~ParamTree () | |
| Destructor. | |
| void | add (const char *name_, const char *value_=(const char *) NULL) |
| Add's a new node in the tree. | |
| const char * | get (const char *name_) |
| Get's the value of a parameter from the tree. | |
| void | dump (ostream &out) |
| Print's the whole tree. | |
Public Attributes | |
| ParamTree * | left |
| Left and right tree. | |
| ParamTree * | right |
| const char * | name |
| Name of the parameter in this node. | |
| const char * | value |
| Value of the parameter in this node. | |
Classes to read parameters.
A binary tree to represent and quick find read parameters.
Definition at line 16 of file param.h.
| ParamTree::ParamTree | ( | const char * | name_, | |
| const char * | value_ = (char*)NULL | |||
| ) | [inline] |
Constructor for a new node.
| name_ | Name of the parameter, not NULL !. | |
| value_ | Value of the parameter, default is NULL. |
| ParamTree::ParamTree | ( | ParamTree & | PT | ) | [inline] |
Copy-Constructor.
Copys name, value and the left and right tree.
| PT | The ParamTree to copy. |
| ParamTree::~ParamTree | ( | ) |
Destructor.
Deletes the left and right tree, name and value.
| void ParamTree::add | ( | const char * | name_, | |
| const char * | value_ = (const char *) NULL | |||
| ) |
Add's a new node in the tree.
If a node for this name still exist's, the value will be overwritten.
| name_ | The name of the parameter to add to the tree. | |
| value_ | The value of the parameter to add to the tree, default is NULL. |
| const char* ParamTree::get | ( | const char * | name_ | ) |
Get's the value of a parameter from the tree.
| name_ | The name of the parameter to look for. |
| void ParamTree::dump | ( | ostream & | out | ) |
Print's the whole tree.
Print's the left tree, the root and the right tree.
| out | The ostream to print to, default is out_log. |
| const char* ParamTree::name |
| const char* ParamTree::value |
1.6.1