WARPXM v1.10.0
Loading...
Searching...
No Matches
WmNameTree< V > Class Template Reference

Provides hierarchical container for T values according to unique string keys. More...

#include <wmnametree.h>

Inheritance diagram for WmNameTree< V >:

Detailed Description

template<typename V>
class WmNameTree< V >

Provides hierarchical container for T values according to unique string keys.

Provides map class functionality where the unique keys are strings which are expected to be hierarchical. Hierarchy is determined by '.' delemiters in the string key. Ex: density, velocity.x, velocity.y, current.ion.x, current.electron.y are all valid keys. From above, velocity.x and velocity.y are both children of the velocity node. The parent node may or may not be an actual member of the container. Above, note no element 'velocity', just children of velocity.

Public Member Functions

 WmNameTree ()
 Basic constructor creates empty container for elements of type V with unique string keys.
 
WmNameTree< V > find_children (const std::string &baseNodeName) const
 Return all children (and grandchildren, etc.) of a baseNode.
 
unsigned num_children (const std::string &baseNodeName) const
 Return count of all children (and grandchildren, etc.) of a baseNode.
 

Constructor & Destructor Documentation

◆ WmNameTree()

template<typename V >
WmNameTree< V >::WmNameTree ( )
inline

Basic constructor creates empty container for elements of type V with unique string keys.

Member Function Documentation

◆ find_children()

template<typename V >
WmNameTree< V > WmNameTree< V >::find_children ( const std::string &  baseNodeName) const
inline

Return all children (and grandchildren, etc.) of a baseNode.

baseNodeName prefix is stripped.

Parameters
baseNodeNameThe string identifying the base node
Returns
A new tree holding only the children.

◆ num_children()

template<typename V >
unsigned WmNameTree< V >::num_children ( const std::string &  baseNodeName) const
inline

Return count of all children (and grandchildren, etc.) of a baseNode.

Parameters
baseNodeNameThe string identifying the base node
Returns
Number of children and grandchildren, etc.

The documentation for this class was generated from the following file: