OpenMS
2.8.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 std::string &n, const std::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 std::string &name) |
Look up entry of this node (local search) More... | |
NodeIterator | findNode (const std::string &name) |
Look up subnode of this node (local search) More... | |
ParamNode * | findParentOf (const std::string &name) |
Look up the parent node of the entry or node corresponding to name (tree search) More... | |
ParamEntry * | findEntryRecursive (const std::string &name) |
Look up the entry corresponding to name (tree search) More... | |
void | insert (const ParamNode &node, const std::string &prefix="") |
Inserts a node with the given prefix . More... | |
void | insert (const ParamEntry &entry, const std::string &prefix="") |
Inserts an entry with the given prefix . More... | |
size_t | size () const |
Returns the number of entries in the whole subtree. More... | |
std::string | suffix (const std::string &key) const |
Returns the name suffix of a key (the part behind the last ':' character) More... | |
Public Attributes | |
std::string | name |
Name of the node. More... | |
std::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 | ( | const std::string & | n, |
const std::string & | d | ||
) |
Constructor with name and description.
~ParamNode | ( | ) |
Destructor.
EntryIterator findEntry | ( | const std::string & | name | ) |
Look up entry of this node (local search)
Returns the end iterator if no entry is found
ParamEntry* findEntryRecursive | ( | const std::string & | name | ) |
Look up the entry corresponding to name
(tree search)
Returns 0 if no entry is found
NodeIterator findNode | ( | const std::string & | name | ) |
Look up subnode of this node (local search)
Returns the end iterator if no entry is found
ParamNode* findParentOf | ( | const std::string & | name | ) |
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 std::string & | prefix = "" |
||
) |
Inserts an entry
with the given prefix
.
void insert | ( | const ParamNode & | node, |
const std::string & | prefix = "" |
||
) |
Inserts a node
with the given prefix
.
bool operator== | ( | const ParamNode & | rhs | ) | const |
Equality operator (name, entries and subnodes are compared)
size_t size | ( | ) | const |
Returns the number of entries in the whole subtree.
std::string suffix | ( | const std::string & | key | ) | const |
Returns the name suffix of a key
(the part behind the last ':' character)
std::string description |
Description of the node.
std::vector<ParamEntry> entries |
Entries (leafs) in the node.
std::string name |
Name of the node.
std::vector<ParamNode> nodes |
Subnodes.