ODIN
Public Member Functions | List of all members

#include <tjvallist.h>

Inheritance diagram for ValList< T >:
Inheritance graph
[legend]

Public Member Functions

 ValList (const STD_string &object_label="unnamedValList", unsigned int repetitions=1)
 
 ValList (T value)
 
 ValList (const ValList< T > &vl)
 
ValListoperator= (const ValList< T > &vl)
 
ValListset_value (T value)
 
ValListadd_sublist (const ValList< T > &vl)
 
ValListmultiply_repetitions (unsigned int reptimes)
 
STD_vector< T > get_values_flat () const
 
STD_vector< T > get_elements_flat () const
 
bool operator== (const ValList< T > &vl) const
 
bool operator< (const ValList< T > &vl) const
 
operator[] (unsigned int i) const
 
unsigned int size () const
 
STD_string printvallist () const
 
bool parsevallist (const STD_string &str)
 
STD_ostream & print2stream (STD_ostream &os) const
 
void clear ()
 
- Public Member Functions inherited from Labeled
 Labeled (const STD_string &label="unnamed")
 
Labeledset_label (const STD_string &label)
 
const STD_string & get_label () const
 
Labeledoperator= (const Labeled &l)
 

Detailed Description

template<class T>
class ValList< T >

This class holds nested lists (tree) of values. Each node can contain a single value, or a list of other nested lists. In addition, it contains a repetition counter for this node. Its main purpose is to retrieve value lists (e.g. frequency lists, delay lists, reco indices) from the sequence tree.

Definition at line 36 of file tjvallist.h.

Constructor & Destructor Documentation

◆ ValList() [1/3]

template<class T >
ValList< T >::ValList ( const STD_string &  object_label = "unnamedValList< T >",
unsigned int  repetitions = 1 
)

Empty node with given label and repetitions

◆ ValList() [2/3]

template<class T >
ValList< T >::ValList ( value)

Node with a single value

◆ ValList() [3/3]

template<class T >
ValList< T >::ValList ( const ValList< T > &  vl)

Copy constructor

Member Function Documentation

◆ add_sublist()

template<class T >
ValList& ValList< T >::add_sublist ( const ValList< T > &  vl)

Append another node to this

◆ clear()

template<class T >
void ValList< T >::clear ( )

Clears the value list

◆ get_elements_flat()

template<class T >
STD_vector<T> ValList< T >::get_elements_flat ( ) const

Returns unrolled values of nested list for one repetition of this list

◆ get_values_flat()

template<class T >
STD_vector<T> ValList< T >::get_values_flat ( ) const

Returns unrolled values of nested list

◆ multiply_repetitions()

template<class T >
ValList& ValList< T >::multiply_repetitions ( unsigned int  reptimes)
inline

Multiply number of repetitions of this node by 'reptimes'

Definition at line 104 of file tjvallist.h.

◆ operator<()

template<class T >
bool ValList< T >::operator< ( const ValList< T > &  vl) const

Comparison operator

◆ operator=()

template<class T >
ValList& ValList< T >::operator= ( const ValList< T > &  vl)

Assignment operator

◆ operator==()

template<class T >
bool ValList< T >::operator== ( const ValList< T > &  vl) const

Equal operator

◆ operator[]()

template<class T >
T ValList< T >::operator[] ( unsigned int  i) const

Acess i'th value in the nested list

◆ parsevallist()

template<class T >
bool ValList< T >::parsevallist ( const STD_string &  str)

Parses list from string

◆ print2stream()

template<class T >
STD_ostream& ValList< T >::print2stream ( STD_ostream &  os) const

Prints value list to stream

◆ printvallist()

template<class T >
STD_string ValList< T >::printvallist ( ) const

Serializes list to a string

◆ set_value()

template<class T >
ValList& ValList< T >::set_value ( value)

Make node single value

◆ size()

template<class T >
unsigned int ValList< T >::size ( ) const
inline

Returns number of values of one repetition of this node

Returns number of values

Definition at line 140 of file tjvallist.h.


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