Manages a timer callback. More...
#include <timer.h>
Classes | |
class | Impl |
Public Member Functions | |
bool | hasPending () |
Returns whether or not the timer has any pending events to call. | |
bool | isValid () |
operator void * () | |
bool | operator!= (const Timer &rhs) |
bool | operator< (const Timer &rhs) |
bool | operator== (const Timer &rhs) |
void | setPeriod (const Duration &period) |
Set the period of this timer. | |
void | start () |
Start the timer. Does nothing if the timer is already started. | |
void | stop () |
Stop the timer. Once this call returns, no more callbacks will be called. Does nothing if the timer is already stopped. | |
Timer () | |
Timer (const Timer &rhs) | |
~Timer () | |
Private Types | |
typedef boost::shared_ptr< Impl > | ImplPtr |
typedef boost::weak_ptr< Impl > | ImplWPtr |
Private Member Functions | |
Timer (const TimerOptions &ops) | |
Private Attributes | |
ImplPtr | impl_ |
Friends | |
class | NodeHandle |
Manages a timer callback.
A Timer should always be created through a call to NodeHandle::createTimer(), or copied from one that was. Once all copies of a specific Timer go out of scope, the callback associated with that handle will stop being called.
typedef boost::shared_ptr<Impl> ros::Timer::ImplPtr [private] |
typedef boost::weak_ptr<Impl> ros::Timer::ImplWPtr [private] |
ros::Timer::Timer | ( | ) | [inline] |
ros::Timer::Timer | ( | const Timer & | rhs | ) |
ros::Timer::Timer | ( | const TimerOptions & | ops | ) | [private] |
bool ros::Timer::hasPending | ( | ) |
bool ros::Timer::isValid | ( | ) | [inline] |
void ros::Timer::setPeriod | ( | const Duration & | period | ) |
void ros::Timer::start | ( | ) |
void ros::Timer::stop | ( | ) |
friend class NodeHandle [friend] |
ImplPtr ros::Timer::impl_ [private] |