nrEngine::ITimeObserver Class Reference
[Clock and Timers]

Interface for every kind of objects used to observe the ticking of the clock. More...

Inheritance diagram for nrEngine::ITimeObserver:

nrEngine::Timer

Public Member Functions

 ITimeObserver ()
virtual ~ITimeObserver ()
virtual void notifyTimeObserver ()=0
int32 getObserverID ()
virtual void resetObserver (float64 resetToTime=0.0f)=0

Friends

class Clock

Detailed Description

Interface for every kind of objects used to observe the ticking of the clock.

ITimeObserver is an object which observers our global clock. Each time clock ticks (this is not every second, but every frame) observer will be notified about this and can do his work. Good example for such an observer is a timer, which is updated every frame and provide time for parts of your application. This also can be an alarm-clock which wait until certain time point and then fires.

Definition at line 35 of file ITimeObserver.h.


Member Function Documentation

virtual void nrEngine::ITimeObserver::notifyTimeObserver (  )  [pure virtual]

Clock should notify me every frame.

Implemented in nrEngine::Timer.

int32 nrEngine::ITimeObserver::getObserverID (  ) 

Returns the observer id given us by the clock. You will need this id if you want to delete observer from the clock's list of observers

Definition at line 55 of file ITimeObserver.h.

Referenced by nrEngine::Timer::resetObserver().

virtual void nrEngine::ITimeObserver::resetObserver ( float64  resetToTime = 0.0f  )  [pure virtual]

Call this method to reset an observer. Each observer should know how to reset himself

Parameters:
resetToTime reset the observer to this starting time

Implemented in nrEngine::Timer.


The documentation for this class was generated from the following file:
Generated on Wed Sep 12 23:19:43 2007 for nrEngine by  doxygen 1.5.1