#include <QuantityCluster.h>
Public Types | |
typedef Loki::Tuple< typename GetVar< L >::Result > | QTuple |
a tuple of quantities | |
Public Member Functions | |
void | save (BSUtilities::xmlw::XmlStream &os) const |
save a QuantityVectorTuple to XML | |
void | load (const TiXmlHandle node) |
load a QuantityVectorTuple from XML | |
bool | operator== (const QuantityVectorTuple &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 QTuple &new_values) |
add a new set of data to the QuantityVectorTuple | |
void | insert (const QTuple &new_values, const int index) |
add a new set of data to the QuantityVectorTuple at position index | |
void | erase (const int index) |
erase a set of data from the QuantityVectorTuple at position index | |
template<int I> Loki::TL::TypeAt< L, I >::Result::V | value (const unsigned int index) const |
return a variable value | |
template<int I, class NU> T< typename Loki::TL::TypeAt< L, I >::Result::V::PQ, NU, typename Loki::TL::TypeAt< L, I >::Result::V::DD > | value (const int index, const NU &unit) const |
return a variable value in unit | |
QTuple | operator[] (const int index) const |
return the values at position index within the vectors | |
QTuple | values (const int index) const |
return the values at position index within the vectors | |
template<int I> QuantityVector< T, typename Loki::TL::TypeAt< L, I >::Result::V::PQ, typename Loki::TL::TypeAt< L, I >::Result::V::Unit, typename Loki::TL::TypeAt< L, I >::Result::V::DD > | getVector (Loki::Int2Type< I >) const |
return a vector of variables according to index I | |
Static Public Attributes | |
const std::string | TAG |
the xml QuantityVectorTuple 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 | |
const std::string | MTAG |
the xml type tag | |
Private Types | |
typedef Loki::Typelist< QuantityVector< T, Quantity< DIM, BT, UL, DU, ST >, SU, DD >, LTail > | L |
the typelist | |
Private Attributes | |
Loki::Tuple< L > | vectors |
specialization for a Typelist with first element being a QuantityVector. These are collections of QuantityVectors. The template is parametrized by a Typelist (Alexandrescu) having the types of the QuantityVectors to be stored as elements;
Definition at line 977 of file QuantityCluster.h.
|
the typelist
Definition at line 983 of file QuantityCluster.h. |
|
a tuple of quantities helper type with one object of the types stored in the various QuantityVectors in the correct order. This can be used for input and output to and from the QuantityVectorTuple. Definition at line 993 of file QuantityCluster.h. Referenced by insert(), operator[](), push_back(), and values(). |
|
erase a set of data from the QuantityVectorTuple at position index uses helper class EraVal. Definition at line 1096 of file QuantityCluster.h. |
|
return a vector of variables according to index I
Definition at line 1159 of file QuantityCluster.h. |
|
add a new set of data to the QuantityVectorTuple at position index
Definition at line 1087 of file QuantityCluster.h. References QTuple. |
|
load a QuantityVectorTuple 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. ?????????????? load the dedimensionalizer? ?????????????????????? Definition at line 1030 of file QuantityCluster.h. |
|
return the number of vectors
Definition at line 1067 of file QuantityCluster.h. |
|
equality compares each pair of QuantityVectors Definition at line 1062 of file QuantityCluster.h. |
|
return the values at position index within the vectors uses helper class GetVal to retrieve a QTuple with the values located in the vectors of the QuantityVectorTuple, at position index respectively. Definition at line 1142 of file QuantityCluster.h. References QTuple. |
|
add a new set of data to the QuantityVectorTuple
Definition at line 1079 of file QuantityCluster.h. References QTuple. |
|
save a QuantityVectorTuple to XML write the relevant information of the QuantityVectorTuple object to a stream in XML format; these are given by the individual QuantityVectors ?????????????? save the dedimensionalizer? ?????????????????????? Definition at line 1001 of file QuantityCluster.h. |
|
return the size of the vectors
Definition at line 1073 of file QuantityCluster.h. |
|
return a variable value in unit The first index I defines the QuantityVector 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 QuantityVectorTuple, at position I), and the new unit, in which the value should be returned. Index I iterates over a, possibly, inhomogeneous collection of QuantityVectors. The second index index defines the position of the requested values in the QuantityVector. 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 1133 of file QuantityCluster.h. |
|
return a variable value return the value of the variable located in QuantityVector I at position index. Definition at line 1107 of file QuantityCluster.h. |
|
return the values at position index within the vectors alternative to operator[]; uses operator[] Definition at line 1152 of file QuantityCluster.h. References QTuple. |
|
the xml data tag
Definition at line 1193 of file QuantityCluster.h. |
|
the xml type tag
Definition at line 1199 of file QuantityCluster.h. |
|
the xml quantity tag
Definition at line 1187 of file QuantityCluster.h. |
|
the xml QuantityVectorTuple tag
Definition at line 1184 of file QuantityCluster.h. |
|
the xml unit tag
Definition at line 1190 of file QuantityCluster.h. |
|
Definition at line 985 of file QuantityCluster.h. |
|
the xml value tag
Definition at line 1196 of file QuantityCluster.h. |