TransitionFunctor.hpp

Go to the documentation of this file.
00001 #ifndef WALI_NWA_TRAVERSE_TRANSITION_FUNCTOR_HPP
00002 #define WALI_NWA_TRAVERSE_TRANSITION_FUNCTOR_HPP
00003 
00004 #include <vector>
00005 
00006 #include "opennwa/NwaFwd.hpp"
00007 
00008 namespace opennwa {
00009     namespace traverse {
00010 
00011       class ConstTransitionFunctor
00012       {
00013       public:
00014         virtual ~ConstTransitionFunctor() {}
00015 
00016         virtual void doInternal(Nwa const & nwa, State source, Symbol symbol, State target) = 0;
00017         virtual void doCall(Nwa const & nwa, State source, Symbol symbol, State target) = 0;
00018         virtual void doReturn(Nwa const & nwa, State source, State pred, Symbol symbol, State target) = 0;
00019       };
00020 
00021 
00022       class ConstCallStringTransitionFunctor
00023       {
00024       public:
00025         ///
00026         /// Index [0] is the bottom item on the stack. For main, the call
00027         /// stack will have one item in it with an unspecified value
00028         typedef std::vector<State> CallString;
00029 
00030         virtual ~ConstCallStringTransitionFunctor() {}
00031 
00032         virtual void doInternal(Nwa const & nwa, CallString const & cs,
00033                                 State source, Symbol symbol, State target) = 0;
00034         virtual void doCall(Nwa const & nwa, CallString const & cs,
00035                             State source, Symbol symbol, State target) = 0;
00036         virtual void doReturn(Nwa const & nwa, CallString const & cs,
00037                               State source, State pred, Symbol symbol, State target) = 0;
00038       };
00039       
00040   }
00041 }
00042 
00043 
00044 
00045 // Yo, Emacs!
00046 // Local Variables:
00047 //   c-file-style: "ellemtel"
00048 //   c-basic-offset: 2
00049 // End:
00050 
00051 #endif