/* */ #ifndef _D_DATA_H_ #define _D_DATA_H_ #include "MetaEntry.h" #include using namespace std; class Data : public MetaEntry { private: int32_t len; char* data; bool number; public: /** * This class stores the copy of data. So caller must take care of freeing * memory of data. */ Data(const char* data, int32_t len, bool number = false); Data(const string& data, bool number = false); ~Data(); string toString() const; int32_t toInt() const; int64_t toLLInt() const; const char* getData() const; int32_t getLen() const; bool isNumber() const; void accept(MetaEntryVisitor* v) const; }; #endif // _D_DATA_H_