version 3.3

VRS::Clock Class Reference

Base Class for Clocks in VRS. More...

#include <vrs/sg/clock.h>

Inheritance diagram for VRS::Clock:

VRS::SharedObj VRS::Visitable VRS::FPSClock VRS::GtkClock

List of all members.

Public Member Functions

 Clock (bool isARealTimeClock=true, double delayInSec=0.001)
virtual void start ()
 Start the clock in order to produce tick events.
virtual void stop ()
 Stop the clock and do not produce any tick events anymore.
void tick (const VRSTime &now)
 Sends time events to all associated managers.
void setDelay (double delayInSec)
double getDelay () const
void addManager (Manager *mgr)
void removeManager (Manager *mgr)
bool hasManager (Manager *mgr) const
void copyManagers (Clock *anotherClock) const
virtual VRSTime time ()
bool isRealTime () const
 VRS_TYPEINFO (Clock, SharedObj)

Static Public Member Functions

static ClocksystemClock ()

Classes

struct  TimeSlave


Detailed Description

Base Class for Clocks in VRS.

Constructor & Destructor Documentation

VRS::Clock::Clock ( bool  isARealTimeClock = true,
double  delayInSec = 0.001 
)

This class keeps track of the time and notifies associated managers about the time progress. A manager is an object that needs to be informed about time progress, i.e., it handles time events.


Member Function Documentation

virtual void VRS::Clock::start (  )  [inline, virtual]

Start the clock in order to produce tick events.

Reimplemented in VRS::GtkClock.

virtual void VRS::Clock::stop ( void   )  [inline, virtual]

Stop the clock and do not produce any tick events anymore.

Reimplemented in VRS::GtkClock.

void VRS::Clock::tick ( const VRSTime now  ) 

Sends time events to all associated managers.

void VRS::Clock::setDelay ( double  delayInSec  ) 

double VRS::Clock::getDelay (  )  const

void VRS::Clock::addManager ( Manager mgr  ) 

void VRS::Clock::removeManager ( Manager mgr  ) 

bool VRS::Clock::hasManager ( Manager mgr  )  const

void VRS::Clock::copyManagers ( Clock anotherClock  )  const

The clock delivers as many and as accurate time-events to the managers.

virtual VRSTime VRS::Clock::time (  )  [virtual]

Reimplemented in VRS::FPSClock.

bool VRS::Clock::isRealTime (  )  const

`time' returns the current time. `isRealTime' tells whether we have a real time clock (which then uses `VRSTimenow' to obtain the time) or not.

static Clock* VRS::Clock::systemClock (  )  [static]

VRS::Clock::VRS_TYPEINFO ( Clock  ,
SharedObj   
)


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

Generated on Thu May 23 06:00:32 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact