Castor3D  ..
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Castor3D::FrameListener Class Reference

User event synchronisation class. More...

+ Inheritance diagram for Castor3D::FrameListener:
+ Collaboration diagram for Castor3D::FrameListener:

Public Member Functions

C3D_API FrameListener (Castor::String const &p_name)
 Constructor. More...
 
C3D_API ~FrameListener ()
 Destructor. More...
 
C3D_API void Flush ()
 Empties the event lists. More...
 
C3D_API void PostEvent (FrameEventSPtr p_event)
 Puts an event in the corresponding array. More...
 
C3D_API bool FireEvents (eEVENT_TYPE p_type)
 Applies all events of a given type, then discards them. More...
 

Protected Member Functions

virtual C3D_API void DoFlush ()
 Empties the event lists. More...
 

Protected Attributes

std::array< FrameEventPtrArray, eEVENT_TYPE_COUNT > m_events
 The events arrays. More...
 
std::recursive_mutex m_mutex
 Mutex to make this class thread safe. More...
 

Detailed Description

User event synchronisation class.

Author
Sylvain DOREMUS
Version
0.1
Date
03/03/2010
Remarks
The manager of the frame events. It can add frame events and applies them at the wanted times

Constructor & Destructor Documentation

◆ FrameListener()

C3D_API Castor3D::FrameListener::FrameListener ( Castor::String const &  p_name)

Constructor.

Parameters
[in]p_nameThe listener's name.

◆ ~FrameListener()

C3D_API Castor3D::FrameListener::~FrameListener ( )

Destructor.

Member Function Documentation

◆ DoFlush()

virtual C3D_API void Castor3D::FrameListener::DoFlush ( )
inlineprotectedvirtual

Empties the event lists.

◆ FireEvents()

C3D_API bool Castor3D::FrameListener::FireEvents ( eEVENT_TYPE  p_type)

Applies all events of a given type, then discards them.

Parameters
[in]p_typeThe type of events to fire

◆ Flush()

C3D_API void Castor3D::FrameListener::Flush ( )

Empties the event lists.

Referenced by Castor3D::ElementCleaner< FrameListener, FrameListener >::Cleanup().

+ Here is the caller graph for this function:

◆ PostEvent()

C3D_API void Castor3D::FrameListener::PostEvent ( FrameEventSPtr  p_event)

Puts an event in the corresponding array.

Parameters
[in]p_eventThe event to put

Member Data Documentation

◆ m_events

std::array< FrameEventPtrArray, eEVENT_TYPE_COUNT > Castor3D::FrameListener::m_events
protected

The events arrays.

◆ m_mutex

std::recursive_mutex Castor3D::FrameListener::m_mutex
protected

Mutex to make this class thread safe.


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