00001 00027 #ifndef MSMAZES_CORE_FSM_INPUT_MAKER_DIRECTION_HPP 00028 #define MSMAZES_CORE_FSM_INPUT_MAKER_DIRECTION_HPP 00029 00030 #include <boost/mpl/bool.hpp> // boost::mpl::true_ and boost::mpl::false_ 00031 00032 namespace msmazes { 00033 00035 00061 struct FSMDirectionInputMaker 00062 { 00067 typedef boost::mpl::false_ 00068 RequiresSingleLayer; 00069 00074 typedef boost::mpl::false_ 00075 RequiresLastVisitedMap; 00076 00084 template < 00085 typename Pattern 00086 > 00087 inline static typename Pattern::Direction 00088 getInputCount( 00089 const Pattern& pattern 00090 ) 00091 { 00092 return pattern.getMaxOutDegree(); 00093 } 00094 00105 template < 00106 typename Pattern 00107 > 00108 static typename Pattern::Direction 00109 getInput( 00110 const Pattern& pattern 00111 , const typename Pattern::CellIndex previous_cell_i 00112 , const typename Pattern::CellIndex current_cell_i 00113 , const typename Pattern::CellIndex next_cell_i 00114 ) 00115 { 00116 return pattern.getEdgeDirection(current_cell_i, next_cell_i); 00117 } 00118 }; 00119 } // namespace msmazes 00120 00121 #endif /* MSMAZES_CORE_FSM_INPUT_MAKER_DIRECTION_HPP */
Multi-State Mazes in C++ is hosted by . Use the Table of Contents for navigation.