TextMsgEvent.h
Go to the documentation of this file.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,(size_t)-1, EventBase::statusETID,0),_text("") { }
00012
00013
00014 TextMsgEvent(const std::string& text, size_t srcID=-1U) : EventBase(EventBase::textmsgEGID,srcID, EventBase::statusETID,0),_text(text) { }
00015
00016 virtual EventBase* clone() const { return new TextMsgEvent(*this); }
00017
00018 virtual unsigned int getClassTypeID() const { return autoRegisterTextMsgEvent; }
00019
00020 std::string getText() const { return _text; }
00021 TextMsgEvent& setText(const std::string& text) { _text=text; return *this; }
00022
00023 std::string getDescription(bool showTypeSpecific=true, unsigned int verbosity=0) const;
00024
00025 virtual unsigned int getBinSize() const;
00026 virtual unsigned int loadBinaryBuffer(const char buf[], unsigned int len);
00027 virtual unsigned int saveBinaryBuffer(char buf[], unsigned int len) const;
00028 virtual void loadXML(xmlNode* node);
00029 virtual void saveXML(xmlNode * node) const;
00030
00031 protected:
00032 std::string _text;
00033
00034
00035 static const EventBase::classTypeID_t autoRegisterTextMsgEvent;
00036 };
00037
00038
00039
00040
00041
00042
00043 #endif