# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

CAutomataDesc Class Reference

A class which describe a simple success/fail automat. More...

#include <automata_desc.h>

Inheritance diagram for CAutomataDesc

Inheritance graph
[legend]
Collaboration diagram for CAutomataDesc:

Collaboration graph
[legend]
List of all members.

Public Methods

 CAutomataDesc ()
 Constructor. More...

std::string getAutomatName () const
 Give the automat name. More...

const std::list<sint32>& getEntryStates () const
 Gives the States linked to the automat entry. More...

const std::list<sint32>& getSuccessStates (sint32 stateId) const
 Gives the States linked to the stateId success output. More...

const std::list<sint32>& getFailStates (sint32 stateId) const
 Gives the States linked to the stateId fail output. More...

std::string getStateName (sint32 stateId) const
 Gives the name of a state. More...

void generateScript ()
std::string removeSpaces (std::string &)
Build Fonctions
Those functions are used for building a CAutomataDesc.

void setAutomatName (std::string name)
void addState (sint32 id, std::string name)
void addSuccessState (sint32 id, sint32 successId)
void addFailState (sint32 id, sint32 faileId)
void addEntryState (sint32 entryId)
void setVisitedState (sint32 stateId)
bool visitedState (sint32 stateId)
void setExploredState (sint32 stateId)
Derived from NLMISC::IStreamable
void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
std::string getClassName ()

Static Public Attributes

const sint32 IDSUCCESS = -1
const sint32 IDFAIL = -2

Private Methods

bool exploredState (sint32 stateId)

Private Attributes

std::map<sint32,CState_States
std::list<sint32_EntryStates
std::set<sint32_VisitedState
std::set<sint32_ExploredState
std::string _AutomatName

Detailed Description

A class which describe a simple success/fail automat.

Each state is identified by an unique Id. The Id IDSUCCESS (-1) is the automat Success state Id. The Id IDFAIL (-2) is the automat Fail state Id.

Author(s):
Gabriel ROBERT , Nevrax France
Date:
2001

Definition at line 44 of file automata_desc.h.


Constructor & Destructor Documentation

CAutomataDesc::CAutomataDesc ( )
 

Constructor.

Definition at line 35 of file automata_desc.cpp.


Member Function Documentation

void CAutomataDesc::addEntryState ( sint32 entryId )
 

Definition at line 108 of file automata_desc.cpp.

void CAutomataDesc::addFailState ( sint32 id,
sint32 faileId )
 

Definition at line 100 of file automata_desc.cpp.

void CAutomataDesc::addState ( sint32 id,
std::string name )
 

Definition at line 84 of file automata_desc.cpp.

Referenced by CAutomataDesc().

void CAutomataDesc::addSuccessState ( sint32 id,
sint32 successId )
 

Definition at line 92 of file automata_desc.cpp.

bool CAutomataDesc::exploredState ( sint32 stateId ) [private]
 

Definition at line 113 of file automata_desc.cpp.

Referenced by addFailState(), addState(), and addSuccessState().

void CAutomataDesc::generateScript ( )
 

Definition at line 129 of file automata_desc.cpp.

std::string CAutomataDesc::getAutomatName ( ) const
 

Give the automat name.

Definition at line 41 of file automata_desc.cpp.

Referenced by generateScript().

std::string CAutomataDesc::getClassName ( ) [virtual]
 

Reimplemented from NLMISC::IClassable.

Definition at line 124 of file automata_desc.cpp.

const std::list< sint32 >& CAutomataDesc::getEntryStates ( ) const
 

Gives the States linked to the automat entry.

Returns:
A list of state Id.

Definition at line 46 of file automata_desc.cpp.

Referenced by generateScript().

const std::list< sint32 >& CAutomataDesc::getFailStates ( sint32 stateId ) const
 

Gives the States linked to the stateId fail output.

Returns:
A list of state Id.

Definition at line 58 of file automata_desc.cpp.

Referenced by generateScript().

std::string CAutomataDesc::getStateName ( sint32 stateId ) const
 

Gives the name of a state.

Definition at line 65 of file automata_desc.cpp.

Referenced by generateScript().

const std::list< sint32 >& CAutomataDesc::getSuccessStates ( sint32 stateId ) const
 

Gives the States linked to the stateId success output.

Returns:
A list of state Id.

Definition at line 51 of file automata_desc.cpp.

Referenced by generateScript().

std::string CAutomataDesc::removeSpaces ( std::string & txt )
 

Definition at line 241 of file automata_desc.cpp.

Referenced by generateScript().

void CAutomataDesc::serial ( NLMISC::IStream & f ) throw (NLMISC::EStream) [inline, virtual]
 

Reimplemented from NLMISC::IStreamable.

Definition at line 93 of file automata_desc.h.

void CAutomataDesc::setAutomatName ( std::string name )
 

Definition at line 79 of file automata_desc.cpp.

void CAutomataDesc::setExploredState ( sint32 stateId )
 

Definition at line 119 of file automata_desc.cpp.

void CAutomataDesc::setVisitedState ( sint32 stateId )
 

bool CAutomataDesc::visitedState ( sint32 stateId )
 


Member Data Documentation

const sint32 CAutomataDesc::IDFAIL = -2 [static]
 

Definition at line 30 of file automata_desc.cpp.

const sint32 CAutomataDesc::IDSUCCESS = -1 [static]
 

Definition at line 29 of file automata_desc.cpp.

std::string CAutomataDesc::_AutomatName [private]
 

Definition at line 125 of file automata_desc.h.

std::list< sint32 > CAutomataDesc::_EntryStates [private]
 

Definition at line 122 of file automata_desc.h.

std::set< sint32 > CAutomataDesc::_ExploredState [private]
 

Definition at line 124 of file automata_desc.h.

std::map< sint32,CState > CAutomataDesc::_States [private]
 

Definition at line 121 of file automata_desc.h.

std::set< sint32 > CAutomataDesc::_VisitedState [private]
 

Definition at line 123 of file automata_desc.h.


The documentation for this class was generated from the following files: