WoopsiUI::WoopsiTimer Class Reference

#include <woopsitimer.h>

Inheritance diagram for WoopsiUI::WoopsiTimer:
WoopsiUI::Gadget

List of all members.

Public Member Functions

 WoopsiTimer (u32 timeout, bool repeat)
const u32 getTimeout () const
const u32 getFrameCount () const
void reset ()
void start ()
void stop ()
void pause ()
void setTimeout (u32 timeout)
virtual bool run ()

Protected Member Functions

virtual ~WoopsiTimer ()
 WoopsiTimer (const WoopsiTimer &woopsiTimer)

Protected Attributes

u32 _frameCount
u32 _timeout
bool _isRunning
bool _isRepeater

Detailed Description

Class providing a timer.


Constructor & Destructor Documentation

WoopsiUI::WoopsiTimer::WoopsiTimer ( u32  timeout,
bool  repeat 
)

Constructor.

Parameters:
timeout Time, in frames, before the timer fires an EVENT_ACTION event.
repeat If true, the timer will fire multiple events. If false, the timer will fire just once and stop.
virtual WoopsiUI::WoopsiTimer::~WoopsiTimer (  )  [inline, protected, virtual]

Destructor.

WoopsiUI::WoopsiTimer::WoopsiTimer ( const WoopsiTimer woopsiTimer  )  [inline, protected]

Copy constructor is protected to prevent usage.


Member Function Documentation

const u32 WoopsiUI::WoopsiTimer::getFrameCount (  )  const [inline]

Return the number of frames that this timer has been running for since the last event fired.

Returns:
Frame count since the last event fired.
const u32 WoopsiUI::WoopsiTimer::getTimeout (  )  const [inline]

Return the timeout of this timer.

Returns:
The number of frames that this timer runs before firing an event.
void WoopsiUI::WoopsiTimer::pause (  )  [inline]

Stops the timer but does not reset the frame count.

void WoopsiUI::WoopsiTimer::reset (  )  [inline]

Resets the frame count back to 0.

virtual bool WoopsiUI::WoopsiTimer::run (  )  [virtual]

Run any code that should execute every VBL.

Returns:
True if the function ran succesfully.
void WoopsiUI::WoopsiTimer::setTimeout ( u32  timeout  )  [inline]

Set the timeout of this timer.

Parameters:
timeout The number of frames that this timer will run before firing an event.
void WoopsiUI::WoopsiTimer::start (  )  [inline]

Starts the timer.

void WoopsiUI::WoopsiTimer::stop (  )  [inline]

Stops the timer and resets the frame count.


Member Data Documentation

Number of frames run so far

Indicates whether or not the timer repeats

Indicates whether or not the timer is running

Number of frames to run before firing an event


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

Generated on Sun Nov 15 11:35:37 2009 for Woopsi by  doxygen 1.6.1