Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

TextMsgEvent Class Reference

#include <TextMsgEvent.h>

Inheritance diagram for TextMsgEvent:

Inheritance graph
[legend]
List of all members.

Detailed Description

Extends EventBase to also include actual message text.

Definition at line 8 of file TextMsgEvent.h.

Public Member Functions

 TextMsgEvent ()
 Constructor.
 TextMsgEvent (const std::string &text)
 Constructor, pass a text msg.
virtual EventBaseclone () const
 allows a copy to be made of an event, supporting polymorphism
virtual unsigned int getClassTypeID () const
 All subclasses should override this and return a unique ID for their class.
std::string getText () const
 returns the text
TextMsgEventsetText (const std::string &text)
 sets the text
std::string getDescription (bool showTypeSpecific=true, unsigned int verbosity=0) const
 generates a description of the event with variable verbosity
virtual unsigned int getBinSize () const
 values to pass to setSaveFormat()
virtual unsigned int LoadBinaryBuffer (const char buf[], unsigned int len)
 values to pass to setSaveFormat()
virtual unsigned int SaveBinaryBuffer (char buf[], unsigned int len) const
 values to pass to setSaveFormat()
virtual void LoadXML (xmlNode *node)
 values to pass to setSaveFormat()
virtual void SaveXML (xmlNode *node) const
 values to pass to setSaveFormat()

Protected Attributes

std::string _text
 the unmodified arguments passed to the command


Constructor & Destructor Documentation

TextMsgEvent::TextMsgEvent  )  [inline]
 

Constructor.

Definition at line 11 of file TextMsgEvent.h.

Referenced by clone().

TextMsgEvent::TextMsgEvent const std::string &  text  )  [inline]
 

Constructor, pass a text msg.

Definition at line 14 of file TextMsgEvent.h.


Member Function Documentation

virtual EventBase* TextMsgEvent::clone  )  const [inline, virtual]
 

allows a copy to be made of an event, supporting polymorphism

Must be overridden by all subclasses to allow this to happen

I would like to switch this over to the cloneable interface once the compiler gets updated out of the 3.3 branch... see Cloneable::clone() for a discussion of the issue and implementation notes.

Reimplemented from EventBase.

Definition at line 16 of file TextMsgEvent.h.

unsigned int TextMsgEvent::getBinSize  )  const [virtual]
 

values to pass to setSaveFormat()

Reimplemented from EventBase.

Definition at line 15 of file TextMsgEvent.cc.

virtual unsigned int TextMsgEvent::getClassTypeID  )  const [inline, virtual]
 

All subclasses should override this and return a unique ID for their class.

All IDs corresponding to all-capital letters are reserved for future framework expansion. (Thus, user subclasses should contain at least one lower-case letter.) This code can be used when serializing to allow quick identification of the class type by the receiver.

Reimplemented from EventBase.

Definition at line 18 of file TextMsgEvent.h.

std::string TextMsgEvent::getDescription bool  showTypeSpecific = true,
unsigned int  verbosity = 0
const [virtual]
 

generates a description of the event with variable verbosity

Parameters:
showTypeSpecific should be read by subclasses to add additional information
verbosity can be one of the following values:
  • 0 - Basic: event_name \t generator_id \t source_id \t type_id
  • 1 - Numerics: event_name \t generator_id \t source_id \t type_id
  • 2 - Timing: event_name \t generator_id \t source_id \t type_id \t duration \t timestamp
  • 3 and above - Full: event_name \t generator_id \t source_id \t type_id \t duration \t timestamp \t magnitude if showTypeSpecific, additional fields will be added after the common fields listed above.

Reimplemented from EventBase.

Definition at line 6 of file TextMsgEvent.cc.

std::string TextMsgEvent::getText  )  const [inline]
 

returns the text

Definition at line 20 of file TextMsgEvent.h.

Referenced by TextMsgTrans::processEvent(), StepTest::processEvent(), EchoBehavior::processEvent(), and CameraBehavior::processEvent().

unsigned int TextMsgEvent::LoadBinaryBuffer const char  buf[],
unsigned int  len
[virtual]
 

values to pass to setSaveFormat()

Reimplemented from EventBase.

Definition at line 27 of file TextMsgEvent.cc.

void TextMsgEvent::LoadXML xmlNode node  )  [virtual]
 

values to pass to setSaveFormat()

Reimplemented from EventBase.

Definition at line 56 of file TextMsgEvent.cc.

unsigned int TextMsgEvent::SaveBinaryBuffer char  buf[],
unsigned int  len
const [virtual]
 

values to pass to setSaveFormat()

Reimplemented from EventBase.

Definition at line 42 of file TextMsgEvent.cc.

void TextMsgEvent::SaveXML xmlNode node  )  const [virtual]
 

values to pass to setSaveFormat()

Reimplemented from EventBase.

Definition at line 82 of file TextMsgEvent.cc.

TextMsgEvent& TextMsgEvent::setText const std::string &  text  )  [inline]
 

sets the text

Definition at line 21 of file TextMsgEvent.h.


Member Data Documentation

std::string TextMsgEvent::_text [protected]
 

the unmodified arguments passed to the command

Definition at line 35 of file TextMsgEvent.h.

Referenced by getBinSize(), getDescription(), getText(), LoadBinaryBuffer(), LoadXML(), SaveBinaryBuffer(), SaveXML(), and setText().


The documentation for this class was generated from the following files:

Tekkotsu v2.4.1
Generated Tue Aug 16 16:35:10 2005 by Doxygen 1.4.4