Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
NullTrans.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_NullTrans_h_ 00003 #define INCLUDED_NullTrans_h_ 00004 00005 #include "Behaviors/Transition.h" 00006 #include "Events/EventRouter.h" 00007 #include "Shared/MarkScope.h" 00008 00009 //! a transition that occurs (via a 1 msec Timer event) as soon as the source node finishes starting up 00010 class NullTrans : public Transition { 00011 public: 00012 //! constructor 00013 NullTrans(StateNode* destination) : Transition(destination) {} 00014 00015 //! constructor 00016 NullTrans(const std::string& name, StateNode* destination) : 00017 Transition(name,destination) {} 00018 00019 //!starts 1 msec timer, so transition will occur very soon 00020 virtual void preStart() { 00021 Transition::preStart(); 00022 erouter->addTimer(this,9999,0,false); 00023 } 00024 00025 //!when timer event is received, fire() the transition 00026 virtual void doEvent() { fire(); } 00027 00028 }; 00029 00030 /*! @file 00031 * @brief Defines NullTrans, which causes a transition as soon as the source node finishes starting up 00032 * @author dst (Creator) 00033 */ 00034 00035 #endif |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:58:45 2016 by Doxygen 1.6.3 |