cmlabs::Timer Class Reference

#include <Timer.h>

Inheritance diagram for cmlabs::Timer:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::Timer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Timer (JString strData, long ms)
 Timer (Object *obj, long ms)
 Timer (JString strData, long ms, void(*function)(JString string))
 Timer (JString strData, long ms, TimerReceiver *receiver)
 Timer (Object *obj, long ms, void(*function)(Object *object))
 Timer (Object *obj, long ms, TimerObjectReceiver *receiver)
virtual ~Timer ()
Objectclone () const
void run ()
void cancel ()
long msLeft ()
long waitFor ()
bool hasEnded ()
long msSinceEnded ()
ObjectgetAndRemoveObject ()

Protected Member Functions

void OnTimer ()

Protected Attributes

JString data
Objectobject
JTime startedAt
JTime endedAt
void(* stringCallback )(JString strData)
void(* objectCallback )(Object *obj)
TimerReceivertimerReceiver
TimerObjectReceivertimerObjectReceiver
JSemaphore extSem
JSemaphore timerSem
bool shouldContinue
long msRuntime


Detailed Description

Definition at line 48 of file Timer.h.


Constructor & Destructor Documentation

cmlabs::Timer::Timer ( JString  strData,
long  ms 
)

Definition at line 33 of file Timer.cpp.

cmlabs::Timer::Timer ( Object obj,
long  ms 
)

Definition at line 47 of file Timer.cpp.

cmlabs::Timer::Timer ( JString  strData,
long  ms,
void(*)(JString string)  function 
)

Definition at line 58 of file Timer.cpp.

cmlabs::Timer::Timer ( JString  strData,
long  ms,
TimerReceiver receiver 
)

Definition at line 83 of file Timer.cpp.

cmlabs::Timer::Timer ( Object obj,
long  ms,
void(*)(Object *object function 
)

Definition at line 72 of file Timer.cpp.

cmlabs::Timer::Timer ( Object obj,
long  ms,
TimerObjectReceiver receiver 
)

Definition at line 96 of file Timer.cpp.

cmlabs::Timer::~Timer (  )  [virtual]

Definition at line 109 of file Timer.cpp.


Member Function Documentation

Object* cmlabs::Timer::clone (  )  const [virtual]

Implements cmlabs::Object.

Definition at line 59 of file Timer.h.

void cmlabs::Timer::run (  )  [virtual]

Reimplemented from cmlabs::JThread.

Definition at line 117 of file Timer.cpp.

void cmlabs::Timer::cancel (  ) 

Definition at line 170 of file Timer.cpp.

long cmlabs::Timer::msLeft (  ) 

Definition at line 201 of file Timer.cpp.

long cmlabs::Timer::waitFor (  ) 

Definition at line 221 of file Timer.cpp.

bool cmlabs::Timer::hasEnded (  ) 

Definition at line 166 of file Timer.cpp.

long cmlabs::Timer::msSinceEnded (  ) 

Definition at line 158 of file Timer.cpp.

Object * cmlabs::Timer::getAndRemoveObject (  ) 

Definition at line 248 of file Timer.cpp.

void cmlabs::Timer::OnTimer (  )  [protected]

Definition at line 243 of file Timer.cpp.


Member Data Documentation

Definition at line 72 of file Timer.h.

Definition at line 73 of file Timer.h.

Definition at line 74 of file Timer.h.

Definition at line 75 of file Timer.h.

void(* cmlabs::Timer::stringCallback)(JString strData) [protected]

void(* cmlabs::Timer::objectCallback)(Object *obj) [protected]

Definition at line 79 of file Timer.h.

Definition at line 80 of file Timer.h.

Definition at line 82 of file Timer.h.

Definition at line 83 of file Timer.h.

Definition at line 84 of file Timer.h.

long cmlabs::Timer::msRuntime [protected]

Definition at line 85 of file Timer.h.


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

Generated on Tue Jul 7 16:24:22 2009 for CoreLibrary by  doxygen 1.5.6