UGDK
|
00001 #ifndef UGDK_ACTION_TASK_H_ 00002 #define UGDK_ACTION_TASK_H_ 00003 00004 #include <ugdk/util/uncopyable.h> 00005 00006 namespace ugdk { 00007 namespace action { 00008 00009 class Task : public util::Uncopyable { 00010 public: 00011 Task() : finished_(false), priority_(0) {} 00012 Task(int priority) : finished_(false), priority_(priority) {} 00013 virtual ~Task() {} 00014 00015 virtual void operator()(double dt) = 0; 00016 00017 int priority() const { return priority_; } 00018 00019 bool finished() const { return finished_; } 00020 00021 protected: 00022 bool finished_; 00023 00024 private: 00025 const int priority_; 00026 }; 00027 00028 } /* namespace action */ 00029 00030 } /* namespace ugdk */ 00031 00032 #endif /* UGDK_ACTION_TASK_H_ */