idle_task.hpp 558 Bytes
Newer Older
louiz’'s avatar
louiz’ committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#ifndef IDLE_TASK_HPP_INCLUDED
#define IDLE_TASK_HPP_INCLUDED

#include <world/task.hpp>

class IdleTask: public Task
{
public:
  static IdleTask that;

  ~IdleTask() = default;
  TaskType get_type() const override final
  {
    return TaskType::None;
  }
  bool tick(World*) override final { return true; }

private:
  IdleTask():
    Task(nullptr) {}
  IdleTask(const IdleTask&) = delete;
  IdleTask(IdleTask&&) = delete;
  IdleTask& operator=(const IdleTask&) = delete;
  IdleTask& operator=(IdleTask&&) = delete;
};

#endif /* IDLE_TASK_HPP_INCLUDED */