LibCT 2.0
Public Member Functions | Private Attributes

LibCT::EventOccurance Class Reference

An EventOccurance is passed to all listening classes when an event occurs. More...

#include <EventOccurance.h>

List of all members.

Public Member Functions

 EventOccurance (EventType *pEventType, Functor *pFunctor, int prioriy, EventData *pEventData)
 Constructor.
 ~EventOccurance ()
 Destructor.
 EventOccurance (const EventOccurance &rhs)
 Copy-constructor.
EventOccuranceoperator= (const EventOccurance &rhs)
void Run ()
 Calls the callback method.
const EventTypeGetEventType () const
int GetPriority () const
const void * GetData () const
template<typename T >
const T * GetData () const

Private Attributes

EventTypem_pEventType
 Type of the event.
Functorm_pFunctor
 Functor associated with the event.
int m_Priority
 Priority.
EventDatam_pEventData
 Event data.

Detailed Description

An EventOccurance is passed to all listening classes when an event occurs.


Constructor & Destructor Documentation

LibCT::EventOccurance::EventOccurance ( EventType pEventType,
Functor pFunctor,
int  prioriy,
EventData pEventData 
)

Constructor.

Parameters:
pEventTypeType of event
pFunctorFunction to call
prioriyProirity of the event
pEventDataEvent data
LibCT::EventOccurance::~EventOccurance ( )

Destructor.

LibCT::EventOccurance::EventOccurance ( const EventOccurance rhs)

Copy-constructor.

Parameters:
rhsEventOccurance to copy-from

Member Function Documentation

const void* LibCT::EventOccurance::GetData ( ) const

Get the event data

Returns:
The data associated with the event
template<typename T >
const T* LibCT::EventOccurance::GetData ( ) const [inline]

Get the data cast to a specific type

Returns:
The data cast to a specific type
const EventType* LibCT::EventOccurance::GetEventType ( ) const

Get the EventType

Returns:
The EventType
int LibCT::EventOccurance::GetPriority ( ) const

Get the priority of the event

Returns:
The events priority
EventOccurance& LibCT::EventOccurance::operator= ( const EventOccurance rhs)

Assignment operator

Returns:
A referance to this
Parameters:
rhsEventOccurance to copy-from
void LibCT::EventOccurance::Run ( )

Calls the callback method.


Member Data Documentation

Event data.

Type of the event.

Functor associated with the event.

Priority.


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