SimEventBuffer Class Reference

Inheritance diagram for SimEventBuffer:
Inheritance graph
[legend]
Collaboration diagram for SimEventBuffer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimEventBuffer (OptionManager &mgr, const std::string &descrName="SimEventBuffer", const std::string &tagName="SimEventBuffer")
 Constructor.
virtual ~SimEventBuffer ()
 Destructor.
template<class E >
void asyncPost (rutz::shared_ptr< E > e)
 Post an event asynchronously.
rutz::shared_ptr< SimEventasyncRetrieve ()
 Retrieve the next buffered event.

Static Public Member Functions

static SimEventBufferInstance ()
 Return SimEventBuffer instance.

Protected Member Functions

 SIMCALLBACK_DECLARE (SimEventBuffer, SimEventClockTick)
 Callback for when a new clock tick is available.

Detailed Description

Definition at line 46 of file SimEventBuffer.H.


Constructor & Destructor Documentation

SimEventBuffer::SimEventBuffer ( OptionManager mgr,
const std::string descrName = "SimEventBuffer",
const std::string tagName = "SimEventBuffer" 
)

Constructor.

Definition at line 44 of file SimEventBuffer.C.

References ModelComponent::init().

SimEventBuffer::~SimEventBuffer (  )  [virtual]

Destructor.

Definition at line 58 of file SimEventBuffer.C.


Member Function Documentation

template<class E >
void SimEventBuffer::asyncPost ( rutz::shared_ptr< E >  e  )  [inline]

Post an event asynchronously.

The event is queued in a buffer and asyncPost returns immediately. The buffered event is posted to SimEventQueue asynchronously on next clock tick.

Definition at line 92 of file SimEventBuffer.H.

References rutz::demangled_name(), and rutz::shared_ptr< T >::is_valid().

rutz::shared_ptr< SimEvent > SimEventBuffer::asyncRetrieve (  ) 

Retrieve the next buffered event.

Normally, this is called only when receving SimEventClockTick event. It returns invalid rutz::shared_ptr<SimEvent> when buffer is empty.

Definition at line 63 of file SimEventBuffer.C.

static SimEventBuffer& SimEventBuffer::Instance (  )  [inline, static]

Return SimEventBuffer instance.

Definition at line 73 of file SimEventBuffer.H.

SimEventBuffer::SIMCALLBACK_DECLARE ( SimEventBuffer  ,
SimEventClockTick   
) [protected]

Callback for when a new clock tick is available.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:48 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3