UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
task.h
Go to the documentation of this file.
1 #ifndef UGDK_ACTION_TASK_H_
2 #define UGDK_ACTION_TASK_H_
3 
4 #include <ugdk/util/uncopyable.h>
5 
6 namespace ugdk {
7 namespace action {
8 
9 class Task : public util::Uncopyable {
10  public:
11  Task() : finished_(false), priority_(0) {}
12  Task(int priority) : finished_(false), priority_(priority) {}
13  virtual ~Task() {}
14 
15  virtual void operator()(double dt) = 0;
16 
17  int priority() const { return priority_; }
18 
19  bool finished() const { return finished_; }
20 
21  protected:
22  bool finished_;
23 
24  private:
25  const int priority_;
26 };
27 
28 } /* namespace action */
29 
30 } /* namespace ugdk */
31 
32 #endif /* UGDK_ACTION_TASK_H_ */