OSVR-Core
Public Types | Protected Member Functions | List of all members
util::RunLoopManagerBase Class Referenceabstract

Base class for implementations of a RunLoopManager that use various synchronization libraries. More...

#include <RunLoopManager.h>

Inheritance diagram for util::RunLoopManagerBase:
util::StartingInterface util::LoopInterface util::ShutdownInterface util::RunLoopManagerBoost util::RunLoopManagerStd

Public Types

enum  RunningState { STATE_STOPPED, STATE_STARTING, STATE_RUNNING }
 

Public Member Functions

Starting Interface

Set up internal state to allow the run loop to start.

virtual void signalStart ()=0
 
virtual void signalAndWaitForStart ()=0
 Set up for run loop to start, then block until we have confirmation that the run loop is running. More...
 
ShutdownInterface

Send a message to the run loop that it should stop.

virtual void signalShutdown ()=0
 
virtual void signalAndWaitForShutdown ()=0
 Send a message to the run loop that it should stop, and wait until it does. More...
 
Loop Interface

Methods called from within the run loop or by a helper class.

Notify the run loop manager that the run loop is now starting but not yet running.

void reportStarting ()
 
void reportRunning ()
 Notify the run loop manager that the run loop is now running.
 
bool shouldContinue ()
 
void reportStopped ()
 

Protected Member Functions

virtual void reportStateChange_ (RunningState s)=0
 Changes the internal state variable (under mutex protection) and notifies anyone who might be waiting on a condition change. More...
 
void setShouldStop_ (bool value)
 internal utility function. More...
 

Detailed Description

Base class for implementations of a RunLoopManager that use various synchronization libraries.

Member Function Documentation

§ reportStateChange_()

virtual void util::RunLoopManagerBase::reportStateChange_ ( RunningState  s)
protectedpure virtual

Changes the internal state variable (under mutex protection) and notifies anyone who might be waiting on a condition change.

§ setShouldStop_()

void util::RunLoopManagerBase::setShouldStop_ ( bool  value)
inlineprotected

internal utility function.

shared implementation provided

§ signalAndWaitForShutdown()

virtual void util::RunLoopManagerBase::signalAndWaitForShutdown ( )
pure virtual

Send a message to the run loop that it should stop, and wait until it does.

Implements util::ShutdownInterface.

Implemented in util::RunLoopManagerBoost, and util::RunLoopManagerStd.

§ signalAndWaitForStart()

virtual void util::RunLoopManagerBase::signalAndWaitForStart ( )
pure virtual

Set up for run loop to start, then block until we have confirmation that the run loop is running.

Implements util::StartingInterface.

Implemented in util::RunLoopManagerBoost, and util::RunLoopManagerStd.


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