5 #ifndef _QI_PERIODICTASK_HPP_
6 #define _QI_PERIODICTASK_HPP_
10 #include <boost/function.hpp>
11 #include <boost/utility.hpp>
20 struct PeriodicTaskPrivate;
37 void setCallback(
const Callback& cb);
39 template<
typename T,
typename ARG0>
PeriodicTask& setCallback(
const T& callable, ARG0 tracked, ...);
41 #define genCall(n, ATYPEDECL, ATYPES, ADECL, AUSE, comma) \
42 template<typename AF, typename ARG0 comma ATYPEDECL> \
43 inline void setCallback(const AF& fun, const ARG0& arg0 comma ADECL) \
45 setCallback(::qi::bind<void()>(fun, arg0 comma AUSE)); \
65 void start(
bool immediate =
true);
88 void compensateCallbackTime(
bool compensate);
91 void setName(
const std::string& name);
94 bool isRunning()
const;
100 bool isStopping()
const;
102 boost::shared_ptr<PeriodicTaskPrivate> _p;
int64_t int64_t
Cross-platform signed integer of length 64 bits (8 bytes).
#define genCall(n, ATYPEDECL, ATYPES, ADECL, AUSE, comma)
boost::function< void()> Callback