FIFE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FIFE::Command Class Reference

Class for commands Commands are arbitrary events e.g. More...

#include <ec_command.h>

+ Inheritance diagram for FIFE::Command:
+ Collaboration diagram for FIFE::Command:

Public Member Functions

 Command ()
 Constructor. More...
 
virtual ~Command ()
 Destructor. More...
 
CommandType getCommandType () const
 Gets the type of this command. More...
 
void setCommandType (CommandType type)
 
int32_t getCode () const
 Gets the code of this command. More...
 
void setCode (int32_t code)
 
virtual void consume ()
 Marks the event as consumed. More...
 
virtual bool isConsumed () const
 Checks if the event is consumed. More...
 
virtual IEventSourcegetSource () const
 Gets the source of the event. More...
 
virtual void setSource (IEventSource *source)
 Sets the source of the event. More...
 
virtual int32_t getTimeStamp () const
 Gets the timestamp of the event. More...
 
virtual void setTimeStamp (int32_t timestamp)
 Sets the timestamp of the event. More...
 
virtual const std::string & getName () const
 Gets the name of the event. More...
 
virtual std::string getDebugString () const
 Gets the debugstring of the event. More...
 
- Public Member Functions inherited from FIFE::Event
 Event ()
 Constructor. More...
 
virtual ~Event ()
 Destructor. More...
 
virtual std::string getAttrStr () const
 Gets attribute string of the event. More...
 

Private Attributes

CommandType m_commandtype
 
int32_t m_code
 

Detailed Description

Class for commands Commands are arbitrary events e.g.

send from one subsystem to another

Definition at line 44 of file ec_command.h.

Constructor & Destructor Documentation

FIFE::Command::Command ( )
inline

Constructor.

Definition at line 48 of file ec_command.h.

virtual FIFE::Command::~Command ( )
inlinevirtual

Destructor.

Definition at line 55 of file ec_command.h.

Member Function Documentation

virtual void FIFE::Command::consume ( )
inlinevirtual

Marks the event as consumed.

Reimplemented from FIFE::Event.

Definition at line 69 of file ec_command.h.

References FIFE::Event::consume().

int32_t FIFE::Command::getCode ( ) const
inline

Gets the code of this command.

Meaning of code depends on the command type

Returns
code of this command

Definition at line 66 of file ec_command.h.

References m_code.

CommandType FIFE::Command::getCommandType ( ) const
inline

Gets the type of this command.

Returns
type of this command

Definition at line 60 of file ec_command.h.

References m_commandtype.

virtual std::string FIFE::Command::getDebugString ( ) const
inlinevirtual

Gets the debugstring of the event.

Reimplemented from FIFE::Event.

Definition at line 80 of file ec_command.h.

References FIFE::Event::getDebugString().

virtual const std::string& FIFE::Command::getName ( ) const
inlinevirtual

Gets the name of the event.

Reimplemented from FIFE::Event.

Definition at line 76 of file ec_command.h.

virtual IEventSource* FIFE::Command::getSource ( ) const
inlinevirtual

Gets the source of the event.

Reimplemented from FIFE::Event.

Definition at line 71 of file ec_command.h.

References FIFE::Event::getSource().

virtual int32_t FIFE::Command::getTimeStamp ( ) const
inlinevirtual

Gets the timestamp of the event.

Reimplemented from FIFE::Event.

Definition at line 73 of file ec_command.h.

References FIFE::Event::getTimeStamp().

virtual bool FIFE::Command::isConsumed ( ) const
inlinevirtual

Checks if the event is consumed.

Returns
true if the event is consumed, false otherwise.

Reimplemented from FIFE::Event.

Definition at line 70 of file ec_command.h.

References FIFE::Event::isConsumed().

Referenced by FIFE::EventManager::dispatchCommand().

+ Here is the caller graph for this function:

void FIFE::Command::setCode ( int32_t  code)
inline

Definition at line 67 of file ec_command.h.

References m_code.

void FIFE::Command::setCommandType ( CommandType  type)
inline

Definition at line 61 of file ec_command.h.

References m_commandtype.

Referenced by FIFE::EventManager::processActiveEvent(), and FIFE::EventManager::processEvents().

+ Here is the caller graph for this function:

virtual void FIFE::Command::setSource ( IEventSource source)
inlinevirtual

Sets the source of the event.

Reimplemented from FIFE::Event.

Definition at line 72 of file ec_command.h.

References FIFE::Event::setSource().

Referenced by FIFE::EventManager::processEvents().

+ Here is the caller graph for this function:

virtual void FIFE::Command::setTimeStamp ( int32_t  timestamp)
inlinevirtual

Sets the timestamp of the event.

Reimplemented from FIFE::Event.

Definition at line 74 of file ec_command.h.

References FIFE::Event::setTimeStamp().

Member Data Documentation

int32_t FIFE::Command::m_code
private

Definition at line 85 of file ec_command.h.

Referenced by getCode(), and setCode().

CommandType FIFE::Command::m_commandtype
private

Definition at line 84 of file ec_command.h.

Referenced by getCommandType(), and setCommandType().


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