FieldStringArray.h

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 
00003 #ifndef _FIELD_STRING_ARRAY_H_
00004 #define _FIELD_STRING_ARRAY_H_
00005 
00006 #include <fesa-core/DataStore/AbstractField.h>
00007 #include <fesa-core/DataStore/FieldValue.h>
00008 
00009 #include <string>
00010 
00011 namespace fesa
00012 {
00013 
00018 class FieldStringArray : public AbstractField
00019 {
00020   public:
00021 
00026     FieldStringArray (const std::string& fieldName, const FieldCategory fieldCategory, bool multiplexed,
00027                       bool multiMultiplexed, bool persistent, DataIntegrity bufferType, DataStore* pDataStore, int32_t arrayLength, int32_t stringLength);
00028 
00029     /*
00030      *!
00031      *\brief destructor
00032      */
00033     ~FieldStringArray();
00034 
00040     void getMaxSize(uint32_t& size1, uint32_t& size2);
00041 
00047     uint32_t  getSize(MultiplexingContext* context);
00048 
00049   protected:
00050 
00056     uint32_t getFieldValueSize();
00057 
00062     void initialize(FieldElement& fieldElement);
00063 
00068     void setFieldValueAddress(char* pFV, bool initFieldsFlag);
00069 
00074     FieldValue<char *[]>* getFieldValue(int32_t slot);
00075 
00081     void copyValue(uint32_t slot, std::string& str);
00082 
00083     /*
00084      * \return the value of the pending buffer as a string
00085      */
00086     void getValueToStore(int32_t slot,std::string& value);
00087 
00091     uint32_t maxSize1_;
00092 
00096     uint32_t maxSize2_;
00097 
00101     FieldValue<char *[]>* fieldValue_;
00102 
00108     char**** pointers_;
00109 
00110 };
00111 
00112 } // fesa
00113 
00114 #endif // _FIELD_STRING_ARRAY_H_

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1