00001
00002 #ifndef INCLUDED_NullTrans_h_
00003 #define INCLUDED_NullTrans_h_
00004
00005 #include "Behaviors/Transition.h"
00006 #include "Events/EventRouter.h"
00007
00008
00009 class NullTrans : public Transition {
00010 public:
00011
00012 NullTrans(StateNode* destination) : Transition("NullTrans",destination) {}
00013
00014
00015 NullTrans(const std::string& name, StateNode* destination) :
00016 Transition("NullTrans",name,destination) {}
00017
00018
00019 virtual void DoStart() {
00020 Transition::DoStart();
00021 erouter->addTimer(this,0,0,false);
00022 }
00023
00024
00025 virtual void DoStop() { erouter->removeListener(this); Transition::DoStop(); }
00026
00027
00028 virtual void processEvent(const EventBase&) { fire(); }
00029
00030 protected:
00031
00032 NullTrans(const std::string &classname, const std::string &instancename,
00033 StateNode* destination) :
00034 Transition(classname,instancename,destination) {}
00035
00036 };
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #endif