diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2012-08-20 13:43:51 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:42:13 +0300 |
commit | dd9e0287a3a0cca11674c44919b46906725af98a (patch) | |
tree | ce77351290f051fd386f17d05e92c7c360be9ba7 /anim | |
parent | 9ca2c102b916e7aeb54f8616e8a780eaa28d3642 (diff) |
added anim/Task.cpp
Diffstat (limited to 'anim')
-rw-r--r-- | anim/task.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/anim/task.cpp b/anim/task.cpp new file mode 100644 index 0000000000..8b8726ba7c --- /dev/null +++ b/anim/task.cpp @@ -0,0 +1,58 @@ +#include "task.hpp" + +namespace anim +{ + Task::Task() + : m_State(EStarted) + {} + + Task::~Task() + {} + + Task::EState Task::State() const + { + return m_State; + } + + void Task::SetState(EState State) + { + m_State = State; + } + + void Task::OnStart(double ts) + { + SetState(EInProgress); + } + + void Task::OnStep(double ts) + { + } + + void Task::OnCancel(double ts) + { + } + + void Task::OnEnd(double ts) + { + } + + void Task::Cancel() + { + SetState(ECancelled); + } + + void Task::End() + { + SetState(EEnded); + } + + bool Task::IsEnded() const + { + return State() == EEnded; + } + + bool Task::IsCancelled() const + { + return State() == ECancelled; + } +} |