libqicore-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
task.hpp
Go to the documentation of this file.
1 
7 #ifndef QICORE_TASK_H_
8 # define QICORE_TASK_H_
9 
10 #include <qi/signal.hpp>
11 #include <qi/property.hpp>
12 
13 namespace qi
14 {
15  class Task
16  {
17  public:
18  Task() { running.set(false); }
19  virtual ~Task() {}
20 
26  virtual bool interrupt() = 0;
27 
29  Property<bool> running;
30 
35  Property<std::string> error;
36  };
37 }
38 
39 #define QI_TASK_MEMBERS interrupt, running, error
40 
41 #endif
virtual bool interrupt()=0
Task()
Definition: task.hpp:18
virtual ~Task()
Definition: task.hpp:19
Property< bool > running
RO, Indicates if the task is currently running.
Definition: task.hpp:29
Property< std::string > error
Definition: task.hpp:35