OpenMAMA C++ API
Wombat::MamaFieldCacheFieldVectorBasic< T, fieldType > Class Template Reference

MamaFieldCacheFieldVectorBasic. More...

#include <MamaFieldCacheFieldTypes.h>

Inheritance diagram for Wombat::MamaFieldCacheFieldVectorBasic< T, fieldType >:
Wombat::MamaFieldCacheFieldBase

Public Member Functions

void set (MamaFieldCacheField &field, const T *values, mama_size_t size)
 Set the field value. More...
 
void get (const MamaFieldCacheField &field, const T *&values, mama_size_t &size) const
 Return the field values. More...
 
const T & get (const MamaFieldCacheField &field, mama_size_t index) const
 Return the value of a specific field of a vector field. More...
 
- Public Member Functions inherited from Wombat::MamaFieldCacheFieldBase
virtual ~MamaFieldCacheFieldBase ()
 

Protected Member Functions

void checkType (const MamaFieldCacheField &field) const
 
- Protected Member Functions inherited from Wombat::MamaFieldCacheFieldBase
 MamaFieldCacheFieldBase ()
 

Detailed Description

template<typename T, mamaFieldType fieldType>
class Wombat::MamaFieldCacheFieldVectorBasic< T, fieldType >

MamaFieldCacheFieldVectorBasic.

Base class for basic vector types. Allows to set and get the value of the field.

Member Function Documentation

§ set()

template<typename T , mamaFieldType fieldType>
void Wombat::MamaFieldCacheFieldVectorBasic< T, fieldType >::set ( MamaFieldCacheField field,
const T *  values,
mama_size_t  size 
)

Set the field value.

Parameters
fieldThe field to set the values to.
valuesThe new values of the field.
sizeThe number of fields in values.

Referenced by Wombat::setFieldValue().

§ get() [1/2]

template<typename T , mamaFieldType fieldType>
void Wombat::MamaFieldCacheFieldVectorBasic< T, fieldType >::get ( const MamaFieldCacheField field,
const T *&  values,
mama_size_t size 
) const

Return the field values.

Parameters
fieldThe field to get the values from.
valuesA reference to the values to be returned.
sizeA reference to the size of the vector to be returned.

Referenced by Wombat::getFieldValue().

§ get() [2/2]

template<typename T , mamaFieldType fieldType>
const T& Wombat::MamaFieldCacheFieldVectorBasic< T, fieldType >::get ( const MamaFieldCacheField field,
mama_size_t  index 
) const

Return the value of a specific field of a vector field.

Parameters
fieldThe field to get the value from.
indexThe index of the element of the vector to get the value from.
Returns
The value of the field.

§ checkType()

template<typename T , mamaFieldType fieldType>
void Wombat::MamaFieldCacheFieldVectorBasic< T, fieldType >::checkType ( const MamaFieldCacheField field) const
inlineprotected