fesa::FieldArray< T > Class Template Reference

FieldArray template class for arrays of various numeric types and structure types. More...

#include <FieldArray.h>

Inheritance diagram for fesa::FieldArray< T >:
fesa::AbstractField fesa::AcqFieldArray< T > fesa::ConfigFieldArray< T > fesa::GenericFieldArray< T > fesa::SettingFieldArray< T > fesa::AcqFieldScalarArray< T > fesa::AcqFieldStructArray< T > fesa::ConfigFieldScalarArray< T > fesa::ConfigFieldStructArray< T > fesa::GenericFieldScalarArray< T > fesa::GenericFieldStructArray< T > fesa::SettingFieldScalarArray< T > fesa::SettingFieldStructArray< T >

List of all members.

Public Member Functions

 FieldArray (const std::string &fieldName, const FieldCategory fieldCategory, bool multiplexed, bool multiMultiplexed, bool persistent, DataIntegrity bufferType, DataStore *pDataStore, int32_t size)
 Constructor.
 ~FieldArray ()
 destructor
uint32_t getMaxSize ()
 retrieve the size of the array

Protected Member Functions

uint32_t getFieldValueSize ()
 Method to get the size of the field-value object. The template of the field-value class depends on the field type.
void initialize (FieldElement &fieldElement)
 used to initialize some parameters of the field from the instance document
void setFieldValueAddress (char *pFV, bool initFieldsFlag)
 Maps an address in shared memory or on the heap to the field value member of the field class.
void checkMaxDimension (uint32_t size)
 this method checks whether the size passed by parameter is within the max size of the array. If it is not, the method throws a FesaException
FieldValue< T[]> * getFieldValue (int32_t slot)
void copyValue (uint32_t slot, std::string &str)
 this method puts in the slot the value passed by parameter in the corresponding format
void getValueToStore (int32_t slot, std::string &str)

Protected Attributes

uint32_t maxSize_
 maximum size of the array
FieldValue< T[]> * fieldValue_
 value of field in the first slot

Detailed Description

template<typename T>
class fesa::FieldArray< T >

FieldArray template class for arrays of various numeric types and structure types.

Definition at line 19 of file FieldArray.h.


Constructor & Destructor Documentation

template<typename T >
fesa::FieldArray< T >::FieldArray ( const std::string &  fieldName,
const FieldCategory  fieldCategory,
bool  multiplexed,
bool  multiMultiplexed,
bool  persistent,
DataIntegrity  bufferType,
DataStore pDataStore,
int32_t  size 
) [inline]

Constructor.

Parameters:
name of the field, field category, multiplexing criterion, pointer to DataStore
size of the array

Definition at line 102 of file FieldArray.h.

template<typename T >
fesa::FieldArray< T >::~FieldArray (  )  [inline]

destructor

Definition at line 113 of file FieldArray.h.


Member Function Documentation

template<typename T >
void fesa::FieldArray< T >::checkMaxDimension ( uint32_t  size  )  [inline, protected]
template<typename T >
void fesa::FieldArray< T >::copyValue ( uint32_t  slot,
std::string &  str 
) [inline, protected, virtual]
template<typename T >
FieldValue< T[]> * fesa::FieldArray< T >::getFieldValue ( int32_t  slot  )  [inline, protected, virtual]
template<typename T >
uint32_t fesa::FieldArray< T >::getFieldValueSize (  )  [inline, protected, virtual]

Method to get the size of the field-value object. The template of the field-value class depends on the field type.

Returns:
the size in bytes of the field value object.

Implements fesa::AbstractField.

Definition at line 151 of file FieldArray.h.

References fesa::AbstractField::buffer_, fesa::FieldArray< T >::maxSize_, and fesa::AbstractField::valueSize_.

template<typename T >
uint32_t fesa::FieldArray< T >::getMaxSize (  )  [inline]

retrieve the size of the array

Parameters:
size of the array the context

Definition at line 244 of file FieldArray.h.

References fesa::FieldArray< T >::maxSize_.

template<typename T >
void fesa::FieldArray< T >::getValueToStore ( int32_t  slot,
std::string &  str 
) [inline, protected, virtual]
template<typename T >
void fesa::FieldArray< T >::initialize ( FieldElement fieldElement  )  [inline, protected, virtual]

used to initialize some parameters of the field from the instance document

Parameters:
fieldElement that contains the values for the field

Reimplemented from fesa::AbstractField.

Definition at line 160 of file FieldArray.h.

References fesa::FieldElement::dimension1_, and fesa::FieldArray< T >::maxSize_.

template<typename T >
void fesa::FieldArray< T >::setFieldValueAddress ( char *  pFV,
bool  initFieldsFlag 
) [inline, protected, virtual]

Maps an address in shared memory or on the heap to the field value member of the field class.

Parameters:
pFV pointer to a field value.

Implements fesa::AbstractField.

Definition at line 124 of file FieldArray.h.

References fesa::AbstractField::buffer_, FesaErrorSettingFieldValueAddress, fesa::FieldArray< T >::fieldValue_, fesa::AbstractMultiplexingManager::getDepth(), fesa::FieldArray< T >::maxSize_, fesa::AbstractField::multiplexingManager_, fesa::AbstractField::name_, and fesa::AbstractField::valueSize_.


Member Data Documentation

template<typename T >
FieldValue<T[]>* fesa::FieldArray< T >::fieldValue_ [protected]
template<typename T >
uint32_t fesa::FieldArray< T >::maxSize_ [protected]

The documentation for this class was generated from the following file:

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1