Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

KoduGiveEvent Class Reference

#include <KoduGiveEvent.h>

Inheritance diagram for KoduGiveEvent:

Detailed Description

Definition at line 8 of file KoduGiveEvent.h.

List of all members.

Public Member Functions

 KoduGiveEvent ()
 ~KoduGiveEvent ()
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
void setTurnAndObject (float turn, std::string objType)
float getTurn () const
std::string getObjType () const

Static Public Attributes

static const char * classID = "KoduEventBase::KoduGiveEvent"

Private Attributes

float _turn
std::string _objType

Constructor & Destructor Documentation

KoduGiveEvent::KoduGiveEvent (  ) 

Definition at line 16 of file KoduGiveEvent.h.

KoduGiveEvent::~KoduGiveEvent (  ) 

Definition at line 18 of file KoduGiveEvent.h.


Member Function Documentation

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

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

Reimplemented from KoduEventBase.

Definition at line 13 of file KoduGiveEvent.cc.

std::string KoduGiveEvent::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 KoduEventBase.

Definition at line 5 of file KoduGiveEvent.cc.

std::string KoduGiveEvent::getObjType (  )  const

Definition at line 50 of file KoduGiveEvent.cc.

Referenced by KoduInterpreter::KoduEventListener::doEvent().

float KoduGiveEvent::getTurn (  )  const

Definition at line 46 of file KoduGiveEvent.cc.

Referenced by KoduInterpreter::KoduEventListener::doEvent().

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

load from binary format

Reimplemented from KoduEventBase.

Definition at line 32 of file KoduGiveEvent.cc.

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

save to binary format

Reimplemented from KoduEventBase.

Definition at line 23 of file KoduGiveEvent.cc.

void KoduGiveEvent::setTurnAndObject ( float  turn,
std::string  objType 
)

Definition at line 41 of file KoduGiveEvent.cc.


Member Data Documentation

std::string KoduGiveEvent::_objType [private]

Definition at line 11 of file KoduGiveEvent.h.

Referenced by getObjType(), loadBinaryBuffer(), saveBinaryBuffer(), and setTurnAndObject().

const char * KoduGiveEvent::classID = "KoduEventBase::KoduGiveEvent" [static]

Reimplemented from KoduEventBase.

Definition at line 14 of file KoduGiveEvent.h.

Referenced by 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