Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::engine::base::EventManager< ValueType > Class Template Reference

A class that manages a specific type of events for an engine context. More...

#include <omEngineEventManager.h>

Inheritance diagram for om::engine::base::EventManager< ValueType >:
om::engine::base::EventManagerBase

Public Member Functions

 EventManager ()
 Create a new default empty event manager with no events. More...
 
virtual void update (const Time &currentTime)
 Update the events that are buffered in the event manager for the specified time stamp. More...
 
Size getEventCount () const
 Return the number of events there are of the type that this manager holds. More...
 
const Event< ValueType > * getEvents () const
 Return a pointer to the array of events that this manager holds. More...
 
void addEvent (const Event< ValueType > &newEvent)
 Add a new event to the event manager. More...
 
void addEvent (const ValueType &value, const OpaqueResource &target=OpaqueResource(), const OpaqueResource &sender=OpaqueResource(), const EngineSystem *systemSender=((void *) 0), const Time &time=Time::getCurrent())
 Add a new event to the event manager with the specified value and other parameters. More...
 
- Public Member Functions inherited from om::engine::base::EventManagerBase
virtual ~EventManagerBase ()
 Destroy this event manager and release all internal resources. More...
 
const EventValueTypegetValueType () const
 Return an object indicating the type of the value for an event. More...
 

Static Public Attributes

static const EventValueType VALUE_TYPE = EventValueType::of<T>()
 An object that stores the type of a value with the templated type. More...
 

Additional Inherited Members

- Protected Member Functions inherited from om::engine::base::EventManagerBase
 EventManagerBase (const EventValueType *newValueType)
 Create a new event manager base for the specified event value type. More...
 

Detailed Description

template<typename ValueType>
class om::engine::base::EventManager< ValueType >

A class that manages a specific type of events for an engine context.

Constructor & Destructor Documentation

template<typename ValueType >
om::engine::base::EventManager< ValueType >::EventManager ( )
inline

Create a new default empty event manager with no events.

Member Function Documentation

template<typename ValueType >
virtual void om::engine::base::EventManager< ValueType >::update ( const Time currentTime)
inlinevirtual

Update the events that are buffered in the event manager for the specified time stamp.

This method prepares any events that are still valid from the last time step so that they can be processed for the next time step. This method should be called at the beginning of every time step by the engine context.

Implements om::engine::base::EventManagerBase.

template<typename ValueType >
Size om::engine::base::EventManager< ValueType >::getEventCount ( ) const
inline

Return the number of events there are of the type that this manager holds.

template<typename ValueType >
const Event<ValueType>* om::engine::base::EventManager< ValueType >::getEvents ( ) const
inline

Return a pointer to the array of events that this manager holds.

template<typename ValueType >
void om::engine::base::EventManager< ValueType >::addEvent ( const Event< ValueType > &  newEvent)
inline

Add a new event to the event manager.

template<typename ValueType >
void om::engine::base::EventManager< ValueType >::addEvent ( const ValueType &  value,
const OpaqueResource target = OpaqueResource(),
const OpaqueResource sender = OpaqueResource(),
const EngineSystem systemSender = ((void *)0),
const Time time = Time::getCurrent() 
)
inline

Add a new event to the event manager with the specified value and other parameters.

Member Data Documentation

template<typename ValueType >
const EventValueType om::engine::base::EventManager< T >::VALUE_TYPE = EventValueType::of<T>()
static

An object that stores the type of a value with the templated type.


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