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

State Class Reference

Stores information about a State. More...

#include <State.h>

Inheritance diagram for State::

GState List of all members.

Public Methods

 State (Machine *m, const QString, QString, int cd, bool ends)
 Constructor. More...

 State (Machine *m)
 Constructor.

 State (const State &)
 Copy constructor.

 State ()
 Standard constructor.

 ~State ()
 Destructor.

State & operator= (const State &)
 Overloaded assignment operator.

void setName (QString n)
 Sets the name of the state.

QString getName ()
 Returns the name of the state.

void setDescription (QString d)
 Sets the description of the state.

QString getDescription ()
 Returns the description of the state.

void setCode (int c)
 Sets the code of the state.

int getCode ()
 Returns the code of the state.

void setEndState (bool es=TRUE)
 Sets/clears the 'end state' flag.

void toggleEndState ()
 Toggles the 'end state' flag.

bool isEndState ()
 Returns TRUE if this state is an end state, otherwise FALSE.

QString getCodeStr (int type=-1)
 Returns a string representing the coding of the state. More...


Static Public Methods

bool codeValid (int mtype, QString)
 Validates the code in string s. More...


Protected Attributes

Machinemachine
 Pointer to the machine this state belongs to.

QString sname
 Name.

QString sdescription
 Description.

int code
 Coding of the state (equals moore outputs).

bool endstate
 If TRUE, this state is an end state.


Detailed Description

Stores information about a State.


Constructor & Destructor Documentation

State::State Machine * m,
const QString n,
QString d,
int c,
bool ends
 

Constructor.

Initialises a state object with name n and code c.


Member Function Documentation

bool State::codeValid int mtype,
QString s
[static]
 

Validates the code in string s.

If code valid returns TRUE otherwise returns FALSE.

QString State::getCodeStr int type = -1
 

Returns a string representing the coding of the state.

Parameters:
type   If 'Binary' a binary string is returned, otherwise an integer string.
Returns:
The resulting string


The documentation for this class was generated from the following files:
Generated at Fri Apr 11 22:37:17 2003 for Qfsm by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001