00001 /*******************************************************/ 00009 #if !defined(_AJA_ELEMENTDATA_H_) 00010 #define _AJA_ELEMENTDATA_H_ 00011 00012 #include "aja.h" 00013 00014 namespace aja 00015 { 00016 00017 /***************************************************/ 00031 class ElementData : public ElementItem 00032 { 00033 public: 00034 ElementData(number_t id, const void* buffer, unsigned int size); 00035 ElementData(number_t id); 00036 virtual ~ElementData(); 00037 00039 // METHODS 00041 public: 00042 buffer_t getData(); 00043 number_t getDataSize(); 00044 void clearData(); 00045 bool copyData(buffer_t buffer, number_t size); 00046 bool copyData(const char* buffer, unsigned int size); 00047 bool setData(buffer_t buffer, number_t size); 00048 bool setData(const char* buffer, unsigned int size); 00049 00050 00052 // MEMBERS 00054 protected: 00055 buffer_t mData; 00056 number_t mSize; 00057 00058 00060 // VIRTUAL FUNCTIONS 00062 public: 00063 bool buildAja(OutputBuffer& out); 00064 bool parseElmData(buffer_t buffer, unsigned int size, unsigned int& pos); 00065 std::string getElementContent(); 00066 number_t getItemSize(); 00067 }; 00068 } 00069 00070 #endif