Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

mpcl::automaton::TExecutableStreamableDfa< TState, TEvent > Class Template Reference

#include <executable_streamable_dfa.hh>

Inheritance diagram for mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >:

mpcl::automaton::TStreamableDfa< TState, TEvent > mpcl::automaton::TDeterministicFiniteAutomaton< TState, TEvent > List of all members.

Public Types

typedef TStreamableDfa< TState,
TEvent >::char_type 
char_type
 Character type.

typedef TStreamableDfa< TState,
TEvent >::traits_type 
traits_type
 Traits type.


Public Methods

 TExecutableStreamableDfa (TEventHandler< TEvent > &rtSOURCE_BASE_EVENT_HANDLER, TActionHandler< TState > &rtSOURCE_ACTION_HANDLER)
void move (const TState &rktSTATE)

Protected Types

typedef TStreamableDfa< TState,
TEvent >::TStringToStateMap 
TStringToStateMap
 Imports class 'TStringToStateMap'.

typedef TActionHandler< TState
>::TActionNamesList 
TActionNamesList
 Imports class 'TActionNamesList'.


Protected Methods

void read (std::basic_istream< char_type, traits_type > &rtSOURCE_ISTREAM)
void readActionList (TMatcher &rtSOURCE_MATCHER)
void write (std::basic_ostream< char_type, traits_type > &rtTARGET_OSTREAM) const
void writeActionList (std::basic_ostream< char_type, traits_type > &rtTARGET_OSTREAM) const

Protected Attributes

TActionHandler< TState > & rtActionHandler
 Action handler.


Detailed Description

template<typename TState, typename TEvent>
class mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >

Executable Streamable Deterministic Finite Automaton. This class extends the concept of deterministic finite automatons, with actions. You can attach one or more actions to a specific state.

Warning:
All string elements contained once read are converted to lowercase.

Definition at line 55 of file executable_streamable_dfa.hh.


Constructor & Destructor Documentation

template<typename TState, typename TEvent>
mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::TExecutableStreamableDfa TEventHandler< TEvent > &    rtSOURCE_BASE_EVENT_HANDLER,
TActionHandler< TState > &    rtSOURCE_ACTION_HANDLER
[inline]
 

Builds a new instance without loading any DFAML document. This is due to that at this stage, it has no information about states nor events.

Definition at line 98 of file executable_streamable_dfa.hh.


Member Function Documentation

template<typename TState, typename TEvent>
void mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::move const TState &    rktSTATE [inline, virtual]
 

Move to the state ktSTATE.

Parameters:
rktSTATE  Next state.

Reimplemented from mpcl::automaton::TDeterministicFiniteAutomaton< TState, TEvent >.

Definition at line 107 of file executable_streamable_dfa.hh.

References mpcl::automaton::TActionHandler< TState >::execute().

template<typename TState, typename TEvent>
void mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::read std::basic_istream< char_type, traits_type > &    rtSOURCE_ISTREAM [inline, protected]
 

Loads the instance from stream rtSOURCE_ISTREAM.

Parameters:
rtSOURCE_ISTREAM  Source stream.

Reimplemented from mpcl::automaton::TStreamableDfa< TState, TEvent >.

Definition at line 173 of file executable_streamable_dfa.hh.

References mpcl::automaton::TStreamableDfa< TState, TEvent >::check(), mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::readActionList(), mpcl::automaton::TStreamableDfa< TState, TEvent >::readFooter(), mpcl::automaton::TStreamableDfa< TState, TEvent >::readHeader(), mpcl::automaton::TStreamableDfa< TState, TEvent >::readTransitionTable(), mpcl::automaton::TDeterministicFiniteAutomaton< TState, TEvent >::tTransitionMap, and mpcl::automaton::TStreamableDfa< TState, TEvent >::yPublic.

template<typename TState, typename TEvent>
void mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::readActionList TMatcher &    rtSOURCE_MATCHER [inline, protected]
 

Reads action list using rtSOURCE_MATCHER for parsing.

Parameters:
rtSOURCE_MATCHER  Source regular expression matcher.

Definition at line 205 of file executable_streamable_dfa.hh.

References mpcl::text::Format(), mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::rtActionHandler, mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::TActionNamesList, mpcl::text::TString, and mpcl::automaton::TStreamableDfa< TState, TEvent >::tStringToStateMap.

Referenced by mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::read().

template<typename TState, typename TEvent>
void mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::write std::basic_ostream< char_type, traits_type > &    rtTARGET_OSTREAM const [inline, protected]
 

Writes the instance onto stream rtTARGET_OSTREAM.

Parameters:
rtTARGET_OSTREAM  Target output stream.

Reimplemented from mpcl::automaton::TStreamableDfa< TState, TEvent >.

Definition at line 146 of file executable_streamable_dfa.hh.

References mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::writeActionList(), mpcl::automaton::TStreamableDfa< TState, TEvent >::writeFooter(), mpcl::automaton::TStreamableDfa< TState, TEvent >::writeHeader(), and mpcl::automaton::TStreamableDfa< TState, TEvent >::writeTransitionTable().

template<typename TState, typename TEvent>
void mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::writeActionList std::basic_ostream< char_type, traits_type > &    rtTARGET_OSTREAM const [inline, protected]
 

Writes action list on stream rtTARGET_OSTREAM.

Parameters:
rtTARGET_OSTREAM  Target output stream.

Definition at line 266 of file executable_streamable_dfa.hh.

References mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::rtActionHandler, mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::TActionNamesList, and mpcl::automaton::TStreamableDfa< TState, TEvent >::tStringToStateMap.

Referenced by mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::write().


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:25 2003 for MPCL by doxygen1.2.18