#include <AIFSM.h>
Public Member Functions | |
AIFSM (AI_FSM_IDS FSMID_) | |
AIFSM (AI_FSM_IDS FSMID_, AIState &initialstate_) | |
AI_FSM_IDS | getFSMID () const |
bool | setInitialState (AIState &initialstate_) |
AIState *& | getInitialState () |
bool | addState (AIState ¤tstate_, int input_, AIState &nextstate_) |
AIState * | getStateByID (int ID_) const |
int | serialize (std::ofstream &fout_) const |
int | assemble (std::ifstream &fin_) |
Static Public Member Functions | |
void | initAIFSMFileIO () |
|
constructor
|
|
ensures that all state transitions added maintain a connected graph with the initial state returns true if operation succeeded
|
|
assigns this object to one read from a binary file and returns the number of bytes read
|
|
returns the FSMID for this machine |
|
returns a pointer to the initial state if it has been set for this finite state machine, 0 otherwise
|
|
returns 0 if ID_ is not found in the fsm
|
|
must be called before any call to this classes' serialize or assemble methods
|
|
writes this object to a binary file and returns the number of bytes written
|
|
the initial state MUST be set before any call to addState, either by this method, or by passing the initial state to the constructor. returns true if operation succeeded. the initial state is only set ONCE per instance of the class
|