Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/anim
diff options
context:
space:
mode:
authorrachytski <siarhei.rachytski@gmail.com>2012-08-20 13:43:51 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:42:13 +0300
commitdd9e0287a3a0cca11674c44919b46906725af98a (patch)
treece77351290f051fd386f17d05e92c7c360be9ba7 /anim
parent9ca2c102b916e7aeb54f8616e8a780eaa28d3642 (diff)
added anim/Task.cpp
Diffstat (limited to 'anim')
-rw-r--r--anim/task.cpp58
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;
+ }
+}