VCF::TimerComponent Class Reference
The
TimerComponent is used to fire timer events.
More...
#include <vcf/ApplicationKit/TimerComponent.h>
Inheritance diagram for VCF::TimerComponent:
List of all members.
Detailed Description
The
TimerComponent is used to fire timer events.
Simply create the component, add an event handler to it's TimerPulse delegate, set it's time out interval, and activate the timer. You can stop the timer at any point by call it's setActivated() function and passing in false. The default state of the timer is not active.
Constructor & Destructor Documentation
| VCF::TimerComponent::TimerComponent |
( |
|
) |
|
|
| VCF::TimerComponent::TimerComponent |
( |
Component * |
owner |
) |
|
|
| VCF::TimerComponent::TimerComponent |
( |
const String & |
name, |
|
|
Component * |
owner |
|
) |
|
|
| VCF::TimerComponent::TimerComponent |
( |
const String & |
name |
) |
|
|
| virtual VCF::TimerComponent::~TimerComponent |
( |
|
) |
[virtual] |
|
Member Function Documentation
| virtual void VCF::TimerComponent::afterCreate |
( |
ComponentEvent * |
event |
) |
[virtual] |
|
|
|
after the component has been created/instantiated the afterCreate() method is called.
Special initializations may then happen here.
Reimplemented from VCF::Component. |
| int32 VCF::TimerComponent::getTimeoutInterval |
( |
|
) |
[inline] |
|
|
|
Returns the time out interval in milliseconds.
|
| EventHandler* VCF::TimerComponent::getTimerHandler |
( |
|
) |
[protected] |
|
| bool VCF::TimerComponent::isActive |
( |
|
) |
[inline] |
|
|
|
Indicates whether or not the component is active.
The timer is considered active if it is firing timer events. It will remain active till it's destroyed, or setActive() is called with false for a value. |
| void VCF::TimerComponent::onInternalTimerPulse |
( |
TimerEvent * |
event |
) |
[protected] |
|
| void VCF::TimerComponent::setActivated |
( |
const bool & |
isActive |
) |
|
|
|
|
Activates the timer.
Pass in true to activate the timer, and false to turn it off. If the timer is activated, it will start to fire timer events. |
| void VCF::TimerComponent::setTimeoutInterval |
( |
const int32 & |
interval |
) |
|
|
|
|
Set's the time out interval.
A new timer event, i.e. TimerPulse will fire an event, ever interval number of milliseconds. |
Member Data Documentation
The documentation for this class was generated from the following file: