#include <FieldStringArray.h>
Public Member Functions | |
FieldStringArray (const std::string &fieldName, const FieldCategory fieldCategory, bool multiplexed, bool multiMultiplexed, bool persistent, DataIntegrity bufferType, DataStore *pDataStore, int32_t arrayLength, int32_t stringLength) | |
Constructor. | |
~FieldStringArray () | |
void | getMaxSize (uint32_t &size1, uint32_t &size2) |
retrieve the size of the array | |
uint32_t | getSize (MultiplexingContext *context) |
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. | |
FieldValue< char *[]> * | 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 &value) |
Protected Attributes | |
uint32_t | maxSize1_ |
first dimension of the array | |
uint32_t | maxSize2_ |
second dimension of the array. Maximum size of a string | |
FieldValue< char *[]> * | fieldValue_ |
value of the field | |
char **** | pointers_ |
buffer that contains the pointers to the strings for all slots. the first index contain the slots, the second one the pending or active buffer, and the third one acces to the strings |
Definition at line 18 of file FieldStringArray.h.
fesa::FieldStringArray::FieldStringArray | ( | const std::string & | fieldName, | |
const FieldCategory | fieldCategory, | |||
bool | multiplexed, | |||
bool | multiMultiplexed, | |||
bool | persistent, | |||
DataIntegrity | bufferType, | |||
DataStore * | pDataStore, | |||
int32_t | arrayLength, | |||
int32_t | stringLength | |||
) |
Constructor.
name | of the field, field category, multiplexing criterion, pointer to DataStore |
Definition at line 17 of file FieldStringArray.cpp.
fesa::FieldStringArray::~FieldStringArray | ( | ) |
Definition at line 27 of file FieldStringArray.cpp.
References fesa::AbstractField::buffer_, fesa::AbstractMultiplexingManager::getDepth(), fesa::AbstractField::multiplexingManager_, and pointers_.
void fesa::FieldStringArray::copyValue | ( | uint32_t | slot, | |
std::string & | str | |||
) | [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 121 of file FieldStringArray.cpp.
References fesa::FieldValue< char *[]>::activeBuffer(), FesaErrorValueExceedsLimits, fesa::StringUtilities::getElements(), getFieldValue(), maxSize1_, maxSize2_, fesa::AbstractField::name_, fesa::FieldValue< char *[]>::pendingBuffer(), pointers_, fesa::StringUtilities::removeBrackets(), fesa::FieldValue< char *[]>::setActiveCurrentSize(), and fesa::FieldValue< char *[]>::setPendingCurrentSize().
FieldValue< char *[]> * fesa::FieldStringArray::getFieldValue | ( | int32_t | slot | ) | [protected, virtual] |
Implements fesa::AbstractField.
Definition at line 112 of file FieldStringArray.cpp.
References fieldValue_, and fesa::AbstractField::valueSize_.
Referenced by copyValue(), fesa::SettingFieldStringArray::get(), fesa::GenericFieldStringArray::get(), fesa::AcqFieldStringArray::get(), getSize(), fesa::SettingFieldStringArray::getString(), fesa::GenericFieldStringArray::getString(), fesa::AcqFieldStringArray::getString(), getValueToStore(), fesa::SettingFieldStringArray::set(), fesa::GenericFieldStringArray::set(), fesa::AcqFieldStringArray::set(), fesa::SettingFieldStringArray::setString(), fesa::GenericFieldStringArray::setString(), and fesa::AcqFieldStringArray::setString().
uint32_t fesa::FieldStringArray::getFieldValueSize | ( | ) | [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 62 of file FieldStringArray.cpp.
References fesa::AbstractField::buffer_, maxSize1_, maxSize2_, and fesa::AbstractField::valueSize_.
void fesa::FieldStringArray::getMaxSize | ( | uint32_t & | size1, | |
uint32_t & | size2 | |||
) |
retrieve the size of the array
size1 | first dimension of the array | |
size2 | second dimension of the array |
Definition at line 187 of file FieldStringArray.cpp.
uint32_t fesa::FieldStringArray::getSize | ( | MultiplexingContext * | context | ) |
retrieve the size of the array
size | of the array the context |
Definition at line 193 of file FieldStringArray.cpp.
References FesaErrorNoneContextforMuxedField, fesa::FieldValue< char *[]>::getActiveCurrentSize(), getFieldValue(), fesa::AbstractMultiplexingManager::getSlot(), fesa::MultiplexingContext::getType(), fesa::AbstractField::multiplexingManager_, fesa::AbstractField::name_, and fesa::MultiplexingContext::NoneCtxt.
void fesa::FieldStringArray::getValueToStore | ( | int32_t | slot, | |
std::string & | value | |||
) | [protected, virtual] |
Implements fesa::AbstractField.
Definition at line 163 of file FieldStringArray.cpp.
References fesa::FieldValue< char *[]>::activeBuffer(), fesa::FieldValue< char *[]>::getActiveCurrentSize(), getFieldValue(), fesa::FieldValueBase::hasPendingChanged(), fesa::FieldValueBase::isToBeSync(), fesa::FieldValue< char *[]>::pendingBuffer(), and pointers_.
void fesa::FieldStringArray::initialize | ( | FieldElement & | fieldElement | ) | [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 47 of file FieldStringArray.cpp.
References fesa::FieldElement::dimension1_, fesa::FieldElement::dimension2_, maxSize1_, and maxSize2_.
void fesa::FieldStringArray::setFieldValueAddress | ( | char * | pFV, | |
bool | initFieldsFlag | |||
) | [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 73 of file FieldStringArray.cpp.
References fesa::AbstractField::buffer_, fieldValue_, fesa::AbstractMultiplexingManager::getDepth(), maxSize1_, maxSize2_, fesa::AbstractField::multiplexingManager_, and pointers_.
FieldValue<char *[]>* fesa::FieldStringArray::fieldValue_ [protected] |
value of the field
Definition at line 101 of file FieldStringArray.h.
Referenced by fesa::ConfigFieldStringArray::get(), getFieldValue(), fesa::ConfigFieldStringArray::getString(), and setFieldValueAddress().
uint32_t fesa::FieldStringArray::maxSize1_ [protected] |
first dimension of the array
Definition at line 91 of file FieldStringArray.h.
Referenced by copyValue(), getFieldValueSize(), getMaxSize(), initialize(), fesa::SettingFieldStringArray::set(), fesa::GenericFieldStringArray::set(), fesa::AcqFieldStringArray::set(), setFieldValueAddress(), fesa::SettingFieldStringArray::setString(), fesa::GenericFieldStringArray::setString(), and fesa::AcqFieldStringArray::setString().
uint32_t fesa::FieldStringArray::maxSize2_ [protected] |
second dimension of the array. Maximum size of a string
Definition at line 96 of file FieldStringArray.h.
Referenced by copyValue(), getFieldValueSize(), getMaxSize(), initialize(), fesa::SettingFieldStringArray::set(), fesa::GenericFieldStringArray::set(), fesa::AcqFieldStringArray::set(), setFieldValueAddress(), fesa::SettingFieldStringArray::setString(), fesa::GenericFieldStringArray::setString(), and fesa::AcqFieldStringArray::setString().
char**** fesa::FieldStringArray::pointers_ [protected] |
buffer that contains the pointers to the strings for all slots. the first index contain the slots, the second one the pending or active buffer, and the third one acces to the strings
Definition at line 108 of file FieldStringArray.h.
Referenced by copyValue(), fesa::SettingFieldStringArray::get(), fesa::GenericFieldStringArray::get(), fesa::ConfigFieldStringArray::get(), fesa::AcqFieldStringArray::get(), fesa::SettingFieldStringArray::getString(), fesa::GenericFieldStringArray::getString(), fesa::ConfigFieldStringArray::getString(), fesa::AcqFieldStringArray::getString(), getValueToStore(), fesa::SettingFieldStringArray::set(), fesa::GenericFieldStringArray::set(), fesa::AcqFieldStringArray::set(), setFieldValueAddress(), fesa::SettingFieldStringArray::setString(), fesa::GenericFieldStringArray::setString(), fesa::AcqFieldStringArray::setString(), and ~FieldStringArray().