ValList< T > Class Template Reference
[Classes for basic data types and vectors/arrays (tjutils library)]

#include <tjvallist.h>

Inheritance diagram for ValList< T >:

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

Collaboration graph
[legend]
List of all members.

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 elements_size () const
unsigned int size () const
STD_string printvallist () const
bool parsevallist (const STD_string &str)
STD_ostream & print2stream (STD_ostream &os) const
void clear ()

Friends

class ValListTest

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

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

Empty node with given label and repetitions

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

Node with a single value

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

Copy constructor


Member Function Documentation

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

Assignment operator

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

Make node single value

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

Append another node to this

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.

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

Returns unrolled values of nested list

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

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

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

Equal operator

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

Comparison operator

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

Acess i'th value in the nested list

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

Returns number of values of one repetition of this node

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

Returns number of values

Definition at line 140 of file tjvallist.h.

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

Serializes list to a string

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

Parses list from string

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

Prints value list to stream

Reimplemented in JDXrecoValList.

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

Clears the value list


The documentation for this class was generated from the following file:
Generated on Sat Jun 14 12:32:52 2008 by  doxygen 1.5.1