VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtEventLoop Class Reference

The abstract DtEventLoop class. More...

Inheritance diagram for makVrv::DtEventLoop:
Inheritance graph
[legend]

Public Types

typedef void(* RunFunction )(DtDe &)
 Public typedefs. More...
 

Public Member Functions

virtual ~DtEventLoop ()
 DTOR. More...
 
void setAlternateRunFunction (RunFunction aFunction)
 Set an alternate run function. More...
 
void run ()
 Run the app. More...
 

Static Public Member Functions

static void runOnce (DtDe &)
 Helper function for creating a event loop an run once. More...
 
static DtEventLoopcreate (DtDe &theIG)
 Helper function for create, gets DtEventLoopCreator instance from the de and calls it's create method. More...
 

Protected Member Functions

 DtEventLoop (DtDe &de)
 The constructor for an abstract class is not public. More...
 
void defaultRun ()
 Default implementation of Run. More...
 

Protected Attributes

DtDemyDe
 
DtTimedSection * myTimer
 
RunFunction myRunnerFunction
 

Detailed Description

The abstract DtEventLoop class.

Member Typedef Documentation

typedef void(* makVrv::DtEventLoop::RunFunction)(DtDe &)

Public typedefs.

Constructor & Destructor Documentation

virtual makVrv::DtEventLoop::~DtEventLoop ( )
virtual

DTOR.

makVrv::DtEventLoop::DtEventLoop ( DtDe de)
protected

The constructor for an abstract class is not public.

Member Function Documentation

static void makVrv::DtEventLoop::runOnce ( DtDe )
static

Helper function for creating a event loop an run once.

This function allocates an event loop object and calls run on it, then deallocates it.

static DtEventLoop* makVrv::DtEventLoop::create ( DtDe theIG)
static

Helper function for create, gets DtEventLoopCreator instance from the de and calls it's create method.

Exceptions
DtCorruptedStatewhen the DtEventLoopCreator instance is unable to be found.
void makVrv::DtEventLoop::setAlternateRunFunction ( RunFunction  aFunction)

Set an alternate run function.

Note it is important that the alternate run function provides some mechanism for calling tick() member function on a regular bases. To disable the alternate function simply pass a NULL pointer to use the defaultRun implementation.

void makVrv::DtEventLoop::run ( )

Run the app.

This calls the alternate run function if one is set, or it will call the defaultRun() function.

void makVrv::DtEventLoop::defaultRun ( )
protected

Default implementation of Run.

Implementation: while(!timeToStop()) { tick(); }

Member Data Documentation

DtDe& makVrv::DtEventLoop::myDe
protected
DtTimedSection* makVrv::DtEventLoop::myTimer
protected
RunFunction makVrv::DtEventLoop::myRunnerFunction
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)