00001
00002 #ifndef INCLUDED_TextMsgEvent_h
00003 #define INCLUDED_TextMsgEvent_h
00004
00005 #include "EventBase.h"
00006
00007
00008 class TextMsgEvent : public EventBase {
00009 public:
00010
00011 TextMsgEvent() : EventBase(EventBase::textmsgEGID,(unsigned int)-1, EventBase::statusETID,0),_text("") { }
00012
00013
00014 TextMsgEvent(const std::string& text) : EventBase(EventBase::textmsgEGID,(unsigned int)-1, EventBase::statusETID,0),_text(text) { }
00015
00016 virtual EventBase* clone() const { return new TextMsgEvent(*this); }
00017
00018 virtual unsigned int getClassTypeID() const { return makeClassTypeID("TXTM"); }
00019
00020 std::string getText() const { return _text; }
00021 TextMsgEvent& setText(const std::string& text) { _text=text; return *this; }
00022
00023
00024
00025
00026 std::string getDescription(bool showTypeSpecific=true, unsigned int verbosity=0) const;
00027
00028 virtual unsigned int getBinSize() const;
00029 virtual unsigned int LoadBinaryBuffer(const char buf[], unsigned int len);
00030 virtual unsigned int SaveBinaryBuffer(char buf[], unsigned int len) const;
00031 virtual void LoadXML(xmlNode* node);
00032 virtual void SaveXML(xmlNode * node) const;
00033
00034 protected:
00035 std::string _text;
00036
00037 };
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #endif