Homepage Demos Overview Downloads Tutorials Reference
Credits

TextMsgEvent.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_TextMsgEvent_h
00003 #define INCLUDED_TextMsgEvent_h
00004 
00005 #include "EventBase.h"
00006 
00007 //! Extends EventBase to also include actual message text
00008 class TextMsgEvent : public EventBase {
00009  public:
00010   //! Constructor
00011   TextMsgEvent() : EventBase(EventBase::textmsgEGID,(unsigned int)-1, EventBase::statusETID,0),_text("")/*,_token(0)*/ {  }
00012 
00013   //! Constructor, pass a text msg
00014   TextMsgEvent(const std::string& text) : EventBase(EventBase::textmsgEGID,(unsigned int)-1, EventBase::statusETID,0),_text(text)/*,_token(0)*/ { }
00015   
00016   std::string getText() const { return _text; } //!< returns the text
00017   TextMsgEvent& setText(const std::string& text) { _text=text; return *this; } //!< sets the text
00018   
00019   //int getToken() const { return _token; } //!< returns the token
00020   //TextMsgEvent& setToken(int token) { _token=token; return *this;} //!< sets the token
00021   
00022   std::string getDescription(bool showTypeSpecific=true, unsigned int verbosity=0) const;
00023   
00024   virtual unsigned int getBinSize() const;
00025   virtual unsigned int LoadBuffer(const char buf[], unsigned int len);
00026   virtual unsigned int SaveBuffer(char buf[], unsigned int len) const;
00027 
00028  protected:
00029   std::string _text; //!< the unmodified arguments passed to the command
00030   //int _token;      //!< for future expansion, to support centralized parsing
00031 };
00032 
00033 /*! @file
00034  * @brief Describes TextMsgEvent, which extends EventBase to also include actual message text
00035  * @author ejt (Creator)
00036  *
00037  * $Author: ejt $
00038  * $Name: tekkotsu-2_2_2 $
00039  * $Revision: 1.10 $
00040  * $State: Exp $
00041  * $Date: 2004/09/01 21:30:57 $
00042  */
00043 
00044 #endif

Tekkotsu v2.2.2
Generated Tue Jan 4 15:43:15 2005 by Doxygen 1.4.0