eng::Timer::Callback Class Reference

Encapsulates a callback functor and defines how frequently to call it. More...

List of all members.

Public Member Functions

 Callback (SharedPtr< Functor > functor, const Milliseconds millisecFreq, Timer::eDisablement canDisable=CAN_DISABLE)
 Callback (const Callback &src)
 ~Callback ()
void CallIfTimeHasCome (const Milliseconds millisecElapsed)
bool IfCanDisable (void) const

Private Types

enum  { NEVER_CALLED = -1 }

Private Attributes

shptr< FunctormFunctor
Milliseconds mMillisecFreq
Milliseconds mMillisecCalled
bool mCanDisable

Friends

class Timer


Detailed Description

Encapsulates a callback functor and defines how frequently to call it.

Callbacks are modified with the last time they were called. Callback has a copy ctor to avoid the modifying-a-copy pitfall if STL copies them (relic from using list).


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
NEVER_CALLED 


Constructor & Destructor Documentation

eng::Timer::Callback::Callback ( SharedPtr< Functor functor,
const Milliseconds  millisecFreq,
Timer::eDisablement  canDisable = CAN_DISABLE 
)

eng::Timer::Callback::Callback ( const Callback src  ) 

eng::Timer::Callback::~Callback (  ) 


Member Function Documentation

void eng::Timer::Callback::CallIfTimeHasCome ( const Milliseconds  millisecElapsed  ) 

bool eng::Timer::Callback::IfCanDisable ( void   )  const [inline]


Friends And Related Function Documentation

friend class Timer [friend]


Member Data Documentation

shptr<Functor> eng::Timer::Callback::mFunctor [private]

Milliseconds eng::Timer::Callback::mMillisecFreq [private]

Milliseconds eng::Timer::Callback::mMillisecCalled [private]

bool eng::Timer::Callback::mCanDisable [private]


The documentation for this class was generated from the following files: Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:25 2007