FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::Event Class Reference

Base class for all events. More...

#include <event.h>

+ Inheritance diagram for FIFE::Event:
+ Collaboration diagram for FIFE::Event:

Public Member Functions

 Event ()
 Constructor. More...
 
virtual ~Event ()
 Destructor. More...
 
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 getAttrStr () const
 Gets attribute string of the event. More...
 
virtual std::string getDebugString () const
 Gets the debugstring of the event. More...
 

Private Attributes

bool m_isConsumed
 Indicates if the event is consumed. More...
 
IEventSourcem_eventSource
 The source of the event. More...
 
int32_t m_timestamp
 Timestamp of the event. More...
 

Detailed Description

Base class for all events.

Definition at line 49 of file event.h.

Constructor & Destructor Documentation

◆ Event()

FIFE::Event::Event ( )
inline

Constructor.

Definition at line 53 of file event.h.

◆ ~Event()

virtual FIFE::Event::~Event ( )
inlinevirtual

Destructor.

Definition at line 60 of file event.h.

Member Function Documentation

◆ consume()

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

Marks the event as consumed.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::InputEvent, FIFE::KeyEvent, FIFE::Command, FIFE::TextEvent, and FIFE::DropEvent.

Definition at line 64 of file event.h.

References m_isConsumed.

Referenced by FIFE::Command::consume(), and FIFE::InputEvent::consume().

+ Here is the caller graph for this function:

◆ getAttrStr()

virtual std::string FIFE::Event::getAttrStr ( ) const
inlinevirtual

Gets attribute string of the event.

Reimplemented in FIFE::MouseEvent, and FIFE::InputEvent.

Definition at line 96 of file event.h.

References m_eventSource, m_isConsumed, and m_timestamp.

Referenced by FIFE::InputEvent::getAttrStr(), and getDebugString().

+ Here is the caller graph for this function:

◆ getDebugString()

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

Gets the debugstring of the event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::InputEvent, FIFE::Command, FIFE::DropEvent, FIFE::KeyEvent, and FIFE::TextEvent.

Definition at line 106 of file event.h.

References getAttrStr(), and getName().

Referenced by FIFE::Command::getDebugString(), and FIFE::InputEvent::getDebugString().

+ Here is the caller graph for this function:

◆ getName()

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

Gets the name of the event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::InputEvent, FIFE::Command, FIFE::DropEvent, FIFE::KeyEvent, and FIFE::TextEvent.

Definition at line 89 of file event.h.

Referenced by getDebugString().

+ Here is the caller graph for this function:

◆ getSource()

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

Gets the source of the event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::InputEvent, FIFE::KeyEvent, FIFE::Command, FIFE::DropEvent, and FIFE::TextEvent.

Definition at line 73 of file event.h.

References m_eventSource.

Referenced by FIFE::Command::getSource(), and FIFE::InputEvent::getSource().

+ Here is the caller graph for this function:

◆ getTimeStamp()

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

Gets the timestamp of the event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::InputEvent, FIFE::Command, FIFE::DropEvent, FIFE::KeyEvent, and FIFE::TextEvent.

Definition at line 81 of file event.h.

References m_timestamp.

Referenced by FIFE::Command::getTimeStamp(), and FIFE::InputEvent::getTimeStamp().

+ Here is the caller graph for this function:

◆ isConsumed()

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

Checks if the event is consumed.

Returns
true if the event is consumed, false otherwise.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::InputEvent, FIFE::KeyEvent, FIFE::Command, FIFE::TextEvent, and FIFE::DropEvent.

Definition at line 69 of file event.h.

References m_isConsumed.

Referenced by FIFE::Command::isConsumed(), and FIFE::InputEvent::isConsumed().

+ Here is the caller graph for this function:

◆ setSource()

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

Sets the source of the event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::InputEvent, FIFE::Command, FIFE::KeyEvent, FIFE::DropEvent, and FIFE::TextEvent.

Definition at line 77 of file event.h.

References m_eventSource.

Referenced by FIFE::Command::setSource(), and FIFE::InputEvent::setSource().

+ Here is the caller graph for this function:

◆ setTimeStamp()

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

Sets the timestamp of the event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::InputEvent, FIFE::Command, FIFE::DropEvent, FIFE::KeyEvent, and FIFE::TextEvent.

Definition at line 85 of file event.h.

References m_timestamp.

Referenced by FIFE::Command::setTimeStamp(), and FIFE::InputEvent::setTimeStamp().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_eventSource

IEventSource* FIFE::Event::m_eventSource
private

The source of the event.

Definition at line 117 of file event.h.

Referenced by getAttrStr(), getSource(), and setSource().

◆ m_isConsumed

bool FIFE::Event::m_isConsumed
private

Indicates if the event is consumed.

Definition at line 115 of file event.h.

Referenced by consume(), getAttrStr(), and isConsumed().

◆ m_timestamp

int32_t FIFE::Event::m_timestamp
private

Timestamp of the event.

Definition at line 119 of file event.h.

Referenced by getAttrStr(), getTimeStamp(), and setTimeStamp().


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