Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

Param::ParamNode Struct Reference

#include <OpenMS/DATASTRUCTURES/Param.h>

List of all members.


Detailed Description

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

Public Types

typedef std::vector< ParamNode >
::iterator 
NodeIterator
 Iterator for child nodes.
typedef std::vector
< ParamEntry >::iterator 
EntryIterator
 Iterator for entries.

Public Member Functions

 ParamNode ()
 Default constructor.
 ParamNode (const String &n, const String &d)
 Constructor with name and description.
bool operator== (const ParamNode &rhs) const
 Equality operator (name, entries and subnodes are compared).
EntryIterator findEntry (const String &name)
 Look up entry of this node (local search).
NodeIterator findNode (const String &name)
 Look up subnode of this node (local search).
ParamNodefindParentOf (const String &name)
 Look up the parent node of the entry or node corresponding to name (tree search).
ParamEntryfindEntryRecursive (const String &name)
 Look up the entry corresponding to name (tree search).
void insert (const ParamNode &node, const String &prefix="")
 Inserts a node with the given prefix.
void insert (const ParamEntry &entry, const String &prefix="")
 Inserts an entry with the given prefix.
UInt size () const
 Returns the number of entries in the whole subtree.
String suffix (const String &key) const
 Returns the name suffix of a key (the part behind the last ':' character).

Public Attributes

String name
 Name of the node.
String description
 Description of the node.
std::vector< ParamEntryentries
 Entries (leafs) in the node.
std::vector< ParamNodenodes
 Subnodes.

Member Typedef Documentation

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

Iterator for child nodes.

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

Iterator for entries.


Constructor & Destructor Documentation

ParamNode (  ) 

Default constructor.

ParamNode ( const String n,
const String d 
)

Constructor with name and description.


Member Function Documentation

bool operator== ( const ParamNode rhs  )  const

Equality operator (name, entries and subnodes are compared).

EntryIterator findEntry ( const String name  ) 

Look up entry of this node (local search).

Returns the end iterator 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

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

ParamEntry* findEntryRecursive ( const String name  ) 

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

Returns 0 if no entry is found

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

Inserts a node with the given prefix.

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

Inserts an entry with the given prefix.

UInt size (  )  const

Returns the number of entries in the whole subtree.

String suffix ( const String key  )  const

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


Member Data Documentation

String name

Name of the node.

String description

Description of the node.

std::vector<ParamEntry> entries

Entries (leafs) in the node.

std::vector<ParamNode> nodes

Subnodes.


The documentation for this struct was generated from the following file:
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1