00001 #ifndef FOLLOW_HH_ 00002 # define FOLLOW_HH_ 00003 00004 # include "task.hh" 00005 # include "objects_fwd.hh" 00006 00007 # include "events.hh" 00008 00009 # include <string> 00010 00011 namespace tasks 00012 { 00013 class Follow : public Task, public events::EventHandler 00014 { 00015 public: 00016 enum Status 00017 { 00018 state_approaching, 00019 state_moving 00020 }; 00021 00022 public: 00023 Follow(const std::string &character_name); 00024 ~Follow(); 00025 00026 virtual void execute(); 00027 virtual void process(); 00028 virtual void terminate(); 00029 00030 virtual const std::string &get_name() const; 00031 00032 void run_event(events::EventManager &em, int event_id); 00033 00034 protected: 00035 Status _status; 00036 int _character_id; 00037 const std::string &_character_name; 00038 00039 virtual void require_sub_task(); 00040 }; 00041 } 00042 00043 #endif