EventAnalysis  1.3.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
EA::EventLoopProxy Class Reference

A proxy class for EventLoop objects. More...

#include <EventLoopProxy.h>

Public Member Functions

 EventLoopProxy (EventLoop &evLoop)
 Constructor. More...
 
unsigned int GetCurrentEvent ()
 Get the id number of the currently processed event. More...
 
bool SetNextEvent (unsigned int nextEvent)
 Sets the next event to be processed. More...
 
bool StopLoop ()
 Requests to stop the current loop. More...
 

Private Member Functions

void _Reset ()
 Resets the proxy at the beginning of the event processing. More...
 

Private Attributes

EventLoop_evLoop
 
unsigned int _requestedEvent
 
bool _stopLoop
 

Friends

class EventLoop
 

Detailed Description

A proxy class for EventLoop objects.

This class acts as a proxy for EventLoop. It allows other classes (e.g. Algorithms) to interact with the EventLoop, e.g. asking for the ID the of current event or setting the next event to be processed.

Constructor & Destructor Documentation

◆ EventLoopProxy()

EA::EventLoopProxy::EventLoopProxy ( EventLoop evLoop)

Constructor.

Parameters
evLoopThe event loop connected to the proxy object.

Member Function Documentation

◆ _Reset()

void EA::EventLoopProxy::_Reset ( )
private

Resets the proxy at the beginning of the event processing.

Called by EventLoop::Run.

◆ GetCurrentEvent()

unsigned int EA::EventLoopProxy::GetCurrentEvent ( )

Get the id number of the currently processed event.

Returns
The id of the current event.

◆ SetNextEvent()

bool EA::EventLoopProxy::SetNextEvent ( unsigned int  nextEvent)

Sets the next event to be processed.

This method can be used to set the next event to be processed. If the data providers cannot provide the event then a false value is returned. If a different event has already been requested then a false value is returned.

Parameters
nextEventThe id of the desired next event to be processed.
Returns
true if the requested event is correctly set to be the next one, false otherwise.

◆ StopLoop()

bool EA::EventLoopProxy::StopLoop ( )

Requests to stop the current loop.

This method asks for interruption of the event loop. The current event will be processed by all the algorithms in the loop and then the loop execution will be interrupted. Eventual other event loops will then be processed.

Returns
true if the loop interruption request has been successful.

Friends And Related Function Documentation

◆ EventLoop

friend class EventLoop
friend

Member Data Documentation

◆ _evLoop

EventLoop& EA::EventLoopProxy::_evLoop
private

◆ _requestedEvent

unsigned int EA::EventLoopProxy::_requestedEvent
private

◆ _stopLoop

bool EA::EventLoopProxy::_stopLoop
private

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