Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

mpcl::event::TThreadedEventHandler< TEvent > Class Template Reference

#include <threaded_event_handler.hh>

Inheritance diagram for mpcl::event::TThreadedEventHandler< TEvent >:

mpcl::event::TEventHandler< TEvent > mpcl::system::TThread mpcl::system::IThread List of all members.

Public Methods

 TThreadedEventHandler (void)
 Builds a new instance.

TEvent pop (void)
void push (const TEvent &rktSOURCE_EVENT)
bool isEmpty (void) const

Detailed Description

template<typename TEvent>
class mpcl::event::TThreadedEventHandler< TEvent >

Threaded event handler for TStreamableDfa. It protects from concurrent access to shared class data.
See also:
TStreamableDfa.

Definition at line 50 of file threaded_event_handler.hh.


Member Function Documentation

template<typename TEvent>
bool mpcl::event::TThreadedEventHandler< TEvent >::isEmpty void    const [inline, virtual]
 

Returns true if there is no more events. It is mutex protected.

Returns:
True if there is no more events.

Reimplemented from mpcl::event::TEventHandler< TEvent >.

Definition at line 115 of file threaded_event_handler.hh.

References mpcl::system::TMutex::lock(), and mpcl::system::TMutex::unlock().

template<typename TEvent>
TEvent mpcl::event::TThreadedEventHandler< TEvent >::pop void    [inline, virtual]
 

Extracts next event (and removes from the queue). It is mutex protected.

Returns:
Next event.

Reimplemented from mpcl::event::TEventHandler< TEvent >.

Definition at line 81 of file threaded_event_handler.hh.

References mpcl::system::TMutex::lock(), and mpcl::system::TMutex::unlock().

template<typename TEvent>
void mpcl::event::TThreadedEventHandler< TEvent >::push const TEvent &    rktSOURCE_EVENT [inline, virtual]
 

Pushes an event into the queue. It is mutex protected.

Parameters:
rktSOURCE_EVENT  Pushed event.

Reimplemented from mpcl::event::TEventHandler< TEvent >.

Definition at line 96 of file threaded_event_handler.hh.

References mpcl::system::TMutex::lock(), and mpcl::system::TMutex::unlock().


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:25 2003 for MPCL by doxygen1.2.18