#include <QuantityCluster.h>
Public Types | |
typedef Loki::Tuple< typename GetVar< L >::Result > | VariableTuple |
a tuple of quantities | |
Public Member Functions | |
int | number (void) |
return the number of vectors | |
int | length (void) |
return the length of the vectors | |
void | add (const VariableTuple &new_values) |
add a new set of data to the VariableVectorTuple | |
void | add (const VariableTuple &new_values, const int index) |
add a new set of data to the VariableVectorTuple at position index | |
void | remove (const int index) |
remove 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 | |
Private Types | |
typedef Loki::Typelist< LHead, LTail > | L |
the typelist | |
Private Attributes | |
Loki::Tuple< L > | vectors |
specialization for a Typelist 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 471 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 485 of file QuantityCluster.h. Referenced by add(), operator[](), and values(). |
|
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 562 of file QuantityCluster.h. References VariableTuple. |
|
remove a set of data from the VariableVectorTuple at position index uses helper class RemVal. Definition at line 517 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 parameter (which must be fixed at compile time, thus fixing the return type) and a function parameter (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 553 of file QuantityCluster.h. |
|
return a variable value return the value of the variable located in VariableVector I at position index. Definition at line 528 of file QuantityCluster.h. |
|
return the values at position index within the vectors alternative to operator[]; uses operator[] Definition at line 572 of file QuantityCluster.h. References VariableTuple. |