| OpenMS 2.5.0

Public Types | Public Member Functions | Public Attributes | List of all members
Param::ParamNode Struct Reference

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

## Detailed Description

Node inside a Param object which is used to build the internal tree.

## Member Typedef Documentation

## ◆ ConstEntryIterator

typedef std::vector<ParamEntry>::const_iterator ConstEntryIterator

Iterator for entries.

## ◆ ConstNodeIterator

typedef std::vector<ParamNode>::const_iterator ConstNodeIterator

Iterator for child nodes.

## ◆ EntryIterator

typedef std::vector<ParamEntry>::iterator EntryIterator

Iterator for entries.

## ◆ NodeIterator

typedef std::vector<ParamNode>::iterator NodeIterator

Iterator for child nodes.

## Constructor & Destructor Documentation

## ◆ ParamNode() [1/4]

ParamNode | ( |  | ) |

Default constructor.

## ◆ ParamNode() [2/4]

ParamNode | ( | const String & | n,
|  | const String & | d
| ) |  |

Constructor with name and description.

## ◆ ParamNode() [3/4]

ParamNode | ( | const ParamNode & |  | ) |

default

Copy constructor.

## ◆ ParamNode() [4/4]

ParamNode | ( | ParamNode && |  | ) |

default

Move constructor.

## ◆ ~ParamNode()

~ParamNode | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ findEntry()

EntryIterator findEntry | ( | const String & | name | ) |

Look up entry of this node (local search)

Returns the end iterator if no entry is found

## ◆ findEntryRecursive()

ParamEntry* findEntryRecursive | ( | const String & | name | ) |

Look up the entry corresponding to `name` (tree search)

Returns 0 if no entry is found

## ◆ findNode()

NodeIterator findNode | ( | const String & | name | ) |

Look up subnode of this node (local search)

Returns the end iterator if no entry is found

## ◆ findParentOf()

ParamNode* findParentOf | ( | const String & | name | ) |

Look up the parent node of the entry or node corresponding to `name` (tree search)

Returns 0 if no entry is found

## ◆ insert() [1/2]

void insert | ( | const ParamNode & | node,
|  | const String & | prefix = `""`
| ) |  |

Inserts a `node` with the given `prefix`.

## ◆ insert() [2/2]

void insert | ( | const ParamEntry & | entry,
|  | const String & | prefix = `""`
| ) |  |

Inserts an `entry` with the given `prefix`.

## ◆ operator=() [1/2]

ParamNode& operator= | ( | const ParamNode & |  | ) |

default

Assignment operator.

## ◆ operator=() [2/2]

ParamNode& operator= | ( | ParamNode && |  | ) | &

default

Move assignment operator.

## ◆ operator==()

bool operator== | ( | const ParamNode & | rhs | ) | const

Equality operator (name, entries and subnodes are compared)

## ◆ size()

Size size | ( |  | ) | const

Returns the number of entries in the whole subtree.

## ◆ suffix()

String suffix | ( | const String & | key | ) | const

Returns the name suffix of a `key` (the part behind the last ':' character)

## Member Data Documentation

## ◆ description

String description

Description of the node.

## ◆ entries

std::vector<ParamEntry> entries

Entries (leafs) in the node.

## ◆ name

String name

Name of the node.

## ◆ nodes

std::vector<ParamNode> nodes

Subnodes.