7#ifndef __HDI_CORE_TIMER__
8#define __HDI_CORE_TIMER__
14 #if defined(HDI_CORE_AIP_MODE)
66 Timer(
const std::string& name_,
const double delay_,
const Callback& responder_);
121 #if defined(HDI_CORE_AIP_MODE)
153 virtual std::string
name()
const;
235 #if defined(HDI_CORE_AIP_MODE)
236 friend aip::Timer* __accessImpl(
const Timer&);
243 void* __impl()
const;
248 typedef std::unique_ptr<Timer> TimerUP;
249 typedef std::shared_ptr<Timer> TimerSP;
250 typedef std::weak_ptr<Timer> TimerWP;
252 #if defined(HDI_CORE_AIP_MODE)
253 extern aip::Timer* __accessImpl(
const Timer&);
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Deals with timer registration and callbacks.
Definition: hdicoreTimer.h:32
virtual bool active() const
Gets whether the timer is active.
virtual void setCallback(const Callback &cb_)
Sets the callback for the timer.
virtual AITimerHandle aiTimerHandle() const
Gets the timer handle around which the target object is wrapped.
virtual void setDelay(const double delay_)
Sets the delay in seconds for the target Timer object.
virtual double delay() const
Gets the delay in seconds for the target Timer object.
virtual std::string name() const
Gets the unique timer name.
virtual bool isEmpty() const
Gets whether the target Timer object is empty (constructed with the default ctor)
Timer(const std::string &name_, const double delay_, const Callback &responder_)
Constructs a Timer object to fire a responder (target and action) in a given number of seconds.
virtual Callback *const callback() const
Gets the registered callback for the timer.
virtual bool operator==(const Timer &rhs_) const
Tests whether a given Timer object is the same as another.
Timer()
Constructs an empty Timer object.
virtual ~Timer()
Destructs a Timer object, deactivating the timer first.
virtual void activate()
Activates (enables) the timer.
virtual bool operator!=(const Timer &rhs_) const
Tests whether a given Timer object is not the same as another.
virtual void destroy()
Destroys the timer, converting the target object to an empty Timer object (see the default constructo...
virtual void setActive(const bool active_)
Sets whether the timer is active.
Timer(const Timer &t_)
Constructs a new Timer object from an existing Timer object (copy constructor)
virtual void deactivate()
Deactivates (disables) the timer, preventing it from firing.
virtual Timer & operator=(const Timer &rhs_)
Assigns one Timer object to another.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.