#include <QuantityCluster.h>
Public Types | |
typedef Loki::Tuple< typename GetVar< L >::Result > | VariableTuple |
a tuple of quantities | |
Public Member Functions | |
void | save (BSUtilities::xmlw::XmlStream &os) const |
save a VariableVectorTuple to XML | |
void | load (const TiXmlHandle node) |
load a VariableVectorTuple from XML | |
bool | operator== (const VariableVectorTuple &tuple) const |
equality | |
int | number (void) const |
return the number of vectors | |
int | size (void) const |
return the size of the vectors | |
void | push_back (const VariableTuple &new_values) |
add a new set of data to the VariableVectorTuple | |
void | insert (const VariableTuple &new_values, const int index) |
add a new set of data to the VariableVectorTuple at position index | |
void | erase (const int index) |
erase a set of data from the VariableVectorTuple at position index | |
template<int I> Loki::TL::TypeAt< L, I >::Result::V | value (const int index) const |
return a variable value | |
template<int I, class NU> Variable< typename Loki::TL::TypeAt< L, I >::Result::V::PQ, NU > | value (const int index, const NU &unit) const |
return a variable value in unit | |
VariableTuple | operator[] (const int index) const |
return the values at position index within the vectors | |
VariableTuple | values (const int index) const |
return the values at position index within the vectors | |
Static Public Attributes | |
const std::string | TAG |
the xml VariableVectorTuple tag | |
const std::string | QTAG |
the xml quantity tag | |
const std::string | UTAG |
the xml unit tag | |
const std::string | DTAG |
the xml data tag | |
const std::string | VTAG |
the xml value tag | |
Private Types | |
typedef Loki::Typelist< VariableVector< Quantity< DIM, BT, UL, DU, ST >, SU >, LTail > | L |
the typelist | |
Private Attributes | |
Loki::Tuple< L > | vectors |
specialization for a Typelist with first element being a VariableVector. These are collections of VariableVectors. The template is parametrized by a Typelist (Alexandrescu) having the types of the VariableVectors to be stored as elements;
Definition at line 767 of file QuantityCluster.h.
|
the typelist
Definition at line 773 of file QuantityCluster.h. |
|
a tuple of quantities helper type with one object of the types stored in the various VariableVectors in the correct order. This can be used for input and output to and from the VariableVectorTuple. Definition at line 783 of file QuantityCluster.h. Referenced by insert(), operator[](), push_back(), and values(). |
|
erase a set of data from the VariableVectorTuple at position index uses helper class EraVal. Definition at line 884 of file QuantityCluster.h. |
|
add a new set of data to the VariableVectorTuple at position index
Definition at line 875 of file QuantityCluster.h. References VariableTuple. |
|
load a VariableVectorTuple from XML uses TinyXml; an element is extracted from the TiXmlHandle, and checked for (1) non-null element pointer (2) the name of the element (must be a variable vector tuple) (3) the correctness of quantities and units in the element's attributes Subsequently, the LoadVec helper template's loadvec function is called. Definition at line 818 of file QuantityCluster.h. |
|
return the number of vectors
Definition at line 855 of file QuantityCluster.h. |
|
equality compares the size of the two values vectors and their contents Definition at line 850 of file QuantityCluster.h. |
|
return the values at position index within the vectors uses helper class GetVal to retrieve a VariableTuple with the values located in the vectors of the VariableVectorTuple, at position index respectively. Definition at line 929 of file QuantityCluster.h. References VariableTuple. |
|
add a new set of data to the VariableVectorTuple
Definition at line 867 of file QuantityCluster.h. References VariableTuple. |
|
save a VariableVectorTuple to XML write the relevant information of the VariableVectorTuple object to a stream in XML format; these are given by the individual VariableVectors Definition at line 790 of file QuantityCluster.h. |
|
return the size of the vectors
Definition at line 861 of file QuantityCluster.h. |
|
return a variable value in unit The first index I defines the VariableVector from which the value should be taken. This, consequently, also defines the return type of the function, since this vector is associated with a certain Variable<> type. The return type is determined by the parent quantity PQ of this Variable (in turn retrieved from the typelist of the enclosing VariableVectorTuple, at position I), and the new unit, in which the value should be returned. Index I iterates over a, possibly, inhomogeneous collection of VariableVectors. The second index index defines the position of the requested values in the VariableVector. This collection is homogeneous, all values are returned in the same type. Thus, index does not change the return type, but only defines the numerical value of the result. The difference between the two accessing indices is reflected in their respective treatment as a template argument (which must be fixed at compile time, thus fixing the return type) and a function argument (not fixed), respectively. The value is converted into unit. The conversion routine of variables checks that NU is of an appropriate type. Definition at line 920 of file QuantityCluster.h. |
|
return a variable value return the value of the variable located in VariableVector I at position index. Definition at line 895 of file QuantityCluster.h. |
|
return the values at position index within the vectors alternative to operator[]; uses operator[] Definition at line 939 of file QuantityCluster.h. References VariableTuple. |
|
the xml data tag
Definition at line 969 of file QuantityCluster.h. |
|
the xml quantity tag
Definition at line 963 of file QuantityCluster.h. |
|
the xml VariableVectorTuple tag
Definition at line 960 of file QuantityCluster.h. |
|
the xml unit tag
Definition at line 966 of file QuantityCluster.h. |
|
Definition at line 775 of file QuantityCluster.h. |
|
the xml value tag
Definition at line 972 of file QuantityCluster.h. |