FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::Command Class Reference

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

#include <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)
 Sets the type of this command. More...
 
int32_t getCode () const
 Gets the code of this command. More...
 
void setCode (int32_t code)
 Sets the code of this command. More...
 
virtual void consume ()
 Marks events as consumed. More...
 
virtual bool isConsumed () const
 Checks whether 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 command.h.

Constructor & Destructor Documentation

FIFE::Command::Command ( )
inline

Constructor.

Definition at line 48 of file command.h.

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

Destructor.

Definition at line 55 of file command.h.

Member Function Documentation

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

Marks events as consumed.

Reimplemented from FIFE::Event.

Definition at line 77 of file 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 69 of file 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 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 108 of file 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 101 of file command.h.

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

Gets the source of the event.

Reimplemented from FIFE::Event.

Definition at line 85 of file 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 93 of file command.h.

References FIFE::Event::getTimeStamp().

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

Checks whether event is consumed.

Reimplemented from FIFE::Event.

Definition at line 81 of file 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

Sets the code of this command.

Meaning of code depends on the command type

Definition at line 73 of file command.h.

References m_code.

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

Sets the type of this command.

Definition at line 64 of file command.h.

References m_commandType.

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

+ 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 89 of file 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 97 of file command.h.

References FIFE::Event::setTimeStamp().

Member Data Documentation

int32_t FIFE::Command::m_code
private

Definition at line 112 of file command.h.

Referenced by getCode(), and setCode().

CommandType FIFE::Command::m_commandType
private

Definition at line 111 of file command.h.

Referenced by getCommandType(), and setCommandType().


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