00001 /*******************************************************/ 00009 #if !defined(_AJA_ELEMENTSTRING_H_) 00010 #define _AJA_ELEMENTSTRING_H_ 00011 00012 #include "aja.h" 00013 00014 namespace aja 00015 { 00016 /**********************************************/ 00027 class ElementString : public ElementItem 00028 { 00029 public: 00030 ElementString(number_t id,const char* text); 00031 ElementString(number_t id,const std::string& text); 00032 ElementString(number_t id); 00033 virtual ~ElementString(); 00034 00036 // METHODS 00038 public: 00039 bool setString(const std::string& str); 00040 bool setString(const char* str, unsigned int size); 00041 00042 00044 // MEMBERS 00046 protected: 00047 std::string mString; 00048 00049 00051 // VIRTUAL FUNCTIONS 00053 public: 00054 bool buildAja(OutputBuffer& out); 00055 bool parseElmData(buffer_t buffer, unsigned int size, unsigned int& pos); 00056 std::string getElementContent(); 00057 number_t getItemSize(); 00058 00059 }; 00060 } 00061 00062 #endif