OpenMS
2.5.0
|
Node inside a Param object which is used to build the internal tree. More...
#include <OpenMS/DATASTRUCTURES/Param.h>
Public Types | |
typedef std::vector< ParamNode >::iterator | NodeIterator |
Iterator for child nodes. More... | |
typedef std::vector< ParamEntry >::iterator | EntryIterator |
Iterator for entries. More... | |
typedef std::vector< ParamNode >::const_iterator | ConstNodeIterator |
Iterator for child nodes. More... | |
typedef std::vector< ParamEntry >::const_iterator | ConstEntryIterator |
Iterator for entries. More... | |
Public Member Functions | |
ParamNode () | |
Default constructor. More... | |
ParamNode (const String &n, const String &d) | |
Constructor with name and description. More... | |
ParamNode (const ParamNode &)=default | |
Copy constructor. More... | |
ParamNode (ParamNode &&)=default | |
Move constructor. More... | |
~ParamNode () | |
Destructor. More... | |
ParamNode & | operator= (const ParamNode &)=default |
Assignment operator. More... | |
ParamNode & | operator= (ParamNode &&) &=default |
Move assignment operator. More... | |
bool | operator== (const ParamNode &rhs) const |
Equality operator (name, entries and subnodes are compared) More... | |
EntryIterator | findEntry (const String &name) |
Look up entry of this node (local search) More... | |
NodeIterator | findNode (const String &name) |
Look up subnode of this node (local search) More... | |
ParamNode * | findParentOf (const String &name) |
Look up the parent node of the entry or node corresponding to name (tree search) More... | |
ParamEntry * | findEntryRecursive (const String &name) |
Look up the entry corresponding to name (tree search) More... | |
void | insert (const ParamNode &node, const String &prefix="") |
Inserts a node with the given prefix . More... | |
void | insert (const ParamEntry &entry, const String &prefix="") |
Inserts an entry with the given prefix . More... | |
Size | size () const |
Returns the number of entries in the whole subtree. More... | |
String | suffix (const String &key) const |
Returns the name suffix of a key (the part behind the last ':' character) More... | |
Public Attributes | |
String | name |
Name of the node. More... | |
String | description |
Description of the node. More... | |
std::vector< ParamEntry > | entries |
Entries (leafs) in the node. More... | |
std::vector< ParamNode > | nodes |
Subnodes. More... | |
Node inside a Param object which is used to build the internal tree.
typedef std::vector<ParamEntry>::const_iterator ConstEntryIterator |
Iterator for entries.
typedef std::vector<ParamNode>::const_iterator ConstNodeIterator |
Iterator for child nodes.
typedef std::vector<ParamEntry>::iterator EntryIterator |
Iterator for entries.
typedef std::vector<ParamNode>::iterator NodeIterator |
Iterator for child nodes.
ParamNode | ( | ) |
Default constructor.
~ParamNode | ( | ) |
Destructor.
EntryIterator findEntry | ( | const String & | name | ) |
Look up entry of this node (local search)
Returns the end iterator if no entry is found
ParamEntry* findEntryRecursive | ( | const String & | name | ) |
Look up the entry corresponding to name
(tree search)
Returns 0 if no entry is found
NodeIterator findNode | ( | const String & | name | ) |
Look up subnode of this node (local search)
Returns the end iterator if no entry is found
Look up the parent node of the entry or node corresponding to name
(tree search)
Returns 0 if no entry is found
void insert | ( | const ParamEntry & | entry, |
const String & | prefix = "" |
||
) |
Inserts an entry
with the given prefix
.
Inserts a node
with the given prefix
.
bool operator== | ( | const ParamNode & | rhs | ) | const |
Equality operator (name, entries and subnodes are compared)
Size size | ( | ) | const |
Returns the number of entries in the whole subtree.
Returns the name suffix of a key
(the part behind the last ':' character)
String description |
Description of the node.
std::vector<ParamEntry> entries |
Entries (leafs) in the node.
String name |
Name of the node.
std::vector<ParamNode> nodes |
Subnodes.