FieldArray template class for arrays of various numeric types and structure types. More...
#include <FieldArray.h>
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 |
FieldArray template class for arrays of various numeric types and structure types.
Definition at line 19 of file FieldArray.h.
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.
name | of the field, field category, multiplexing criterion, pointer to DataStore | |
size | of the array |
Definition at line 102 of file FieldArray.h.
fesa::FieldArray< T >::~FieldArray | ( | ) | [inline] |
destructor
Definition at line 113 of file FieldArray.h.
void fesa::FieldArray< T >::checkMaxDimension | ( | uint32_t | size | ) | [inline, protected] |
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
FesaException |
Definition at line 169 of file FieldArray.h.
References FesaErrorFieldMaxDimensionOutOfBound, fesa::FieldArray< T >::maxSize_, fesa::AbstractField::name_, and fesa::StringUtilities::toString().
Referenced by fesa::FieldArray< T >::copyValue(), fesa::SettingFieldArray< T >::set(), fesa::GenericFieldArray< T >::set(), fesa::AcqFieldArray< T >::set(), fesa::SettingFieldStructArray< T >::setCell(), fesa::SettingFieldScalarArray< T >::setCell(), fesa::GenericFieldStructArray< T >::setCell(), fesa::GenericFieldScalarArray< T >::setCell(), fesa::AcqFieldStructArray< T >::setCell(), and fesa::AcqFieldScalarArray< T >::setCell().
void fesa::FieldArray< T >::copyValue | ( | uint32_t | slot, | |
std::string & | str | |||
) | [inline, protected, virtual] |
this method puts in the slot the value passed by parameter in the corresponding format
slot | to put the value | |
val | value to put |
Implements fesa::AbstractField.
Definition at line 179 of file FieldArray.h.
References fesa::FieldValue< T[]>::activeBuffer(), fesa::FieldArray< T >::checkMaxDimension(), fesa::StringUtilities::getElements(), fesa::FieldArray< T >::getFieldValue(), fesa::FieldArray< T >::maxSize_, fesa::StringUtilities::removeBrackets(), fesa::FieldValue< T[]>::setActiveCurrentSize(), and fesa::FieldValue< T[]>::setPendingCurrentSize().
FieldValue< T[]> * fesa::FieldArray< T >::getFieldValue | ( | int32_t | slot | ) | [inline, protected, virtual] |
Implements fesa::AbstractField.
Definition at line 117 of file FieldArray.h.
References fesa::FieldArray< T >::fieldValue_, and fesa::AbstractField::valueSize_.
Referenced by fesa::FieldArray< T >::copyValue(), fesa::SettingFieldArray< T >::get(), fesa::GenericFieldArray< T >::get(), fesa::AcqFieldArray< T >::get(), fesa::SettingFieldStructArray< T >::getCell(), fesa::SettingFieldScalarArray< T >::getCell(), fesa::GenericFieldStructArray< T >::getCell(), fesa::GenericFieldScalarArray< T >::getCell(), fesa::AcqFieldStructArray< T >::getCell(), fesa::AcqFieldScalarArray< T >::getCell(), fesa::SettingFieldArray< T >::getSize(), fesa::GenericFieldArray< T >::getSize(), fesa::AcqFieldArray< T >::getSize(), fesa::FieldArray< T >::getValueToStore(), fesa::SettingFieldArray< T >::set(), fesa::GenericFieldArray< T >::set(), fesa::AcqFieldArray< T >::set(), fesa::SettingFieldStructArray< T >::setCell(), fesa::SettingFieldScalarArray< T >::setCell(), fesa::GenericFieldStructArray< T >::setCell(), fesa::GenericFieldScalarArray< T >::setCell(), fesa::AcqFieldStructArray< T >::setCell(), and fesa::AcqFieldScalarArray< T >::setCell().
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.
Implements fesa::AbstractField.
Definition at line 151 of file FieldArray.h.
References fesa::AbstractField::buffer_, fesa::FieldArray< T >::maxSize_, and fesa::AbstractField::valueSize_.
uint32_t fesa::FieldArray< T >::getMaxSize | ( | ) | [inline] |
retrieve the size of the array
size | of the array the context |
Definition at line 244 of file FieldArray.h.
References fesa::FieldArray< T >::maxSize_.
void fesa::FieldArray< T >::getValueToStore | ( | int32_t | slot, | |
std::string & | str | |||
) | [inline, protected, virtual] |
Implements fesa::AbstractField.
Definition at line 217 of file FieldArray.h.
References fesa::FieldValue< T[]>::activeBuffer(), fesa::FieldArray< T >::getFieldValue(), fesa::FieldValueBase::isToBeSync(), and fesa::FieldValue< T[]>::pendingBuffer().
void fesa::FieldArray< T >::initialize | ( | FieldElement & | fieldElement | ) | [inline, protected, virtual] |
used to initialize some parameters of the field from the instance document
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_.
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.
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_.
FieldValue<T[]>* fesa::FieldArray< T >::fieldValue_ [protected] |
value of field in the first slot
Definition at line 85 of file FieldArray.h.
Referenced by fesa::ConfigFieldArray< T >::get(), fesa::ConfigFieldStructArray< T >::getCell(), fesa::ConfigFieldScalarArray< T >::getCell(), fesa::FieldArray< T >::getFieldValue(), fesa::ConfigFieldArray< T >::getSize(), and fesa::FieldArray< T >::setFieldValueAddress().
uint32_t fesa::FieldArray< T >::maxSize_ [protected] |
maximum size of the array
Definition at line 79 of file FieldArray.h.
Referenced by fesa::FieldArray< T >::checkMaxDimension(), fesa::FieldArray< T >::copyValue(), fesa::FieldArray< T >::getFieldValueSize(), fesa::FieldArray< T >::getMaxSize(), fesa::FieldArray< T >::initialize(), and fesa::FieldArray< T >::setFieldValueAddress().