Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

KoduEventBase Class Reference

#include <KoduEventBase.h>

Inheritance diagram for KoduEventBase:

Detailed Description

Definition at line 6 of file KoduEventBase.h.

List of all members.

Public Member Functions

 KoduEventBase ()
 ~KoduEventBase ()
int getDestination ()
void setDestination (int destID)
virtual std::string getDescription (bool showTypeSpecific, unsigned int verbosity) const
 generates a description of the event with variable verbosity
virtual unsigned int getBinSize () const
 should return the minimum size needed if using binary format (i.e. not XML)
virtual unsigned int saveBinaryBuffer (char buf[], unsigned int len) const
 save to binary format
virtual unsigned int loadBinaryBuffer (const char buf[], unsigned int len)
 load from binary format

Static Public Member Functions

static KoduEventBasegetInstance (const char buf[], unsigned int size)

Static Public Attributes

static const char * classID = "EventBase::KoduEvent"

Protected Attributes

int _destID

Constructor & Destructor Documentation

KoduEventBase::KoduEventBase (  ) 

Definition at line 15 of file KoduEventBase.h.

KoduEventBase::~KoduEventBase (  ) 

Definition at line 17 of file KoduEventBase.h.


Member Function Documentation

unsigned int KoduEventBase::getBinSize (  )  const [virtual]

should return the minimum size needed if using binary format (i.e. not XML)

Reimplemented from EventBase.

Reimplemented in KoduGiveEvent, and KoduSayEvent.

Definition at line 39 of file KoduEventBase.cc.

std::string KoduEventBase::getDescription ( bool  showTypeSpecific,
unsigned int  verbosity 
) 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.

Reimplemented in KoduGiveEvent, and KoduSayEvent.

Definition at line 31 of file KoduEventBase.cc.

int KoduEventBase::getDestination (  ) 

Definition at line 23 of file KoduEventBase.cc.

KoduEventBase * KoduEventBase::getInstance ( const char  buf[],
unsigned int  size 
) [static]

Definition at line 9 of file KoduEventBase.cc.

Referenced by RemoteRouter::forwardEvent().

unsigned int KoduEventBase::loadBinaryBuffer ( const char  buf[],
unsigned int  len 
) [virtual]

load from binary format

Reimplemented from EventBase.

Reimplemented in KoduGiveEvent, and KoduSayEvent.

Definition at line 57 of file KoduEventBase.cc.

Referenced by getInstance(), KoduSayEvent::loadBinaryBuffer(), and KoduGiveEvent::loadBinaryBuffer().

unsigned int KoduEventBase::saveBinaryBuffer ( char  buf[],
unsigned int  len 
) const [virtual]

save to binary format

Reimplemented from EventBase.

Reimplemented in KoduGiveEvent, and KoduSayEvent.

Definition at line 49 of file KoduEventBase.cc.

Referenced by KoduSayEvent::saveBinaryBuffer(), and KoduGiveEvent::saveBinaryBuffer().

void KoduEventBase::setDestination ( int  destID  ) 

Member Data Documentation

const char * KoduEventBase::classID = "EventBase::KoduEvent" [static]

Reimplemented in KoduGiveEvent, and KoduSayEvent.

Definition at line 11 of file KoduEventBase.h.

Referenced by RemoteRouter::forwardEvent(), getBinSize(), loadBinaryBuffer(), and saveBinaryBuffer().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:10 2016 by Doxygen 1.6.3