LLStateDiagram Class Reference

#include <llstatemachine.h>

Collaboration diagram for LLStateDiagram:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLStateDiagram ()
virtual ~LLStateDiagram ()
BOOL saveDotFile (const char *filename)

Protected Types

typedef std::map< LLFSMState *,
Transitions
StateMap

Protected Member Functions

BOOL addState (LLFSMState *state)
BOOL addTransition (LLFSMState &start_state, LLFSMState &end_state, LLFSMTransition &transition)
BOOL addUndirectedTransition (LLFSMState &start_state, LLFSMState &end_state, LLFSMTransition &transition)
void addDefaultTransition (LLFSMState &end_state, LLFSMTransition &transition)
LLFSMStateprocessTransition (LLFSMState &start_state, LLFSMTransition &transition)
void setDefaultState (LLFSMState &default_state)
S32 numDeadendStates ()
BOOL stateIsValid (LLFSMState &state)
LLFSMStategetState (U32 state_id)

Protected Attributes

StateMap mStates
Transitions mDefaultTransitions
LLFSMStatemDefaultState
BOOL mUseDefaultState

Private Types

typedef std::map< LLFSMTransition *,
LLFSMState * > 
Transitions

Friends

class LLStateMachine
std::ostream & operator<< (std::ostream &s, LLStateDiagram &FSM)

Detailed Description

Definition at line 71 of file llstatemachine.h.


Member Typedef Documentation

typedef std::map<LLFSMState*, Transitions> LLStateDiagram::StateMap [protected]

Definition at line 79 of file llstatemachine.h.

typedef std::map<LLFSMTransition*, LLFSMState*> LLStateDiagram::Transitions [private]

Definition at line 73 of file llstatemachine.h.


Constructor & Destructor Documentation

LLStateDiagram::LLStateDiagram (  ) 

Definition at line 54 of file llstatemachine.cpp.

References FALSE, and mUseDefaultState.

LLStateDiagram::~LLStateDiagram (  )  [virtual]

Definition at line 59 of file llstatemachine.cpp.


Member Function Documentation

void LLStateDiagram::addDefaultTransition ( LLFSMState end_state,
LLFSMTransition transition 
) [protected]

Definition at line 116 of file llstatemachine.cpp.

References mDefaultTransitions.

BOOL LLStateDiagram::addState ( LLFSMState state  )  [protected]

Definition at line 65 of file llstatemachine.cpp.

References mStates, and TRUE.

Referenced by addTransition().

BOOL LLStateDiagram::addTransition ( LLFSMState start_state,
LLFSMState end_state,
LLFSMTransition transition 
) [protected]

Definition at line 72 of file llstatemachine.cpp.

References addState(), FALSE, llendl, llerrs, mStates, NULL, and TRUE.

Referenced by addUndirectedTransition().

BOOL LLStateDiagram::addUndirectedTransition ( LLFSMState start_state,
LLFSMState end_state,
LLFSMTransition transition 
) [protected]

Definition at line 104 of file llstatemachine.cpp.

References addTransition().

LLFSMState * LLStateDiagram::getState ( U32  state_id  )  [protected]

Definition at line 196 of file llstatemachine.cpp.

References mStates, and NULL.

Referenced by LLStateMachine::setCurrentState().

S32 LLStateDiagram::numDeadendStates (  )  [protected]

Definition at line 173 of file llstatemachine.cpp.

References mStates, and S32.

LLFSMState * LLStateDiagram::processTransition ( LLFSMState start_state,
LLFSMTransition transition 
) [protected]

Definition at line 122 of file llstatemachine.cpp.

References mDefaultState, mDefaultTransitions, mStates, mUseDefaultState, and NULL.

Referenced by LLStateMachine::processTransition().

BOOL LLStateDiagram::saveDotFile ( const char *  filename  ) 

Definition at line 209 of file llstatemachine.cpp.

References FALSE, LLFSMState::getName(), ll_apr_file_open(), LL_APR_W, llendl, llwarns, mDefaultState, mDefaultTransitions, mStates, and TRUE.

void LLStateDiagram::setDefaultState ( LLFSMState default_state  )  [protected]

Definition at line 167 of file llstatemachine.cpp.

References mDefaultState, mUseDefaultState, and TRUE.

BOOL LLStateDiagram::stateIsValid ( LLFSMState state  )  [protected]

Definition at line 187 of file llstatemachine.cpp.

References FALSE, mStates, and TRUE.

Referenced by LLStateMachine::setCurrentState().


Friends And Related Function Documentation

friend class LLStateMachine [friend]

Definition at line 76 of file llstatemachine.h.

std::ostream& operator<< ( std::ostream &  s,
LLStateDiagram FSM 
) [friend]

Definition at line 265 of file llstatemachine.cpp.


Member Data Documentation

LLFSMState* LLStateDiagram::mDefaultState [protected]

Definition at line 82 of file llstatemachine.h.

Referenced by operator<<(), processTransition(), saveDotFile(), and setDefaultState().

Transitions LLStateDiagram::mDefaultTransitions [protected]

Definition at line 81 of file llstatemachine.h.

Referenced by addDefaultTransition(), operator<<(), processTransition(), and saveDotFile().

StateMap LLStateDiagram::mStates [protected]

Definition at line 80 of file llstatemachine.h.

Referenced by addState(), addTransition(), getState(), numDeadendStates(), operator<<(), processTransition(), saveDotFile(), and stateIsValid().

BOOL LLStateDiagram::mUseDefaultState [protected]

Definition at line 83 of file llstatemachine.h.

Referenced by LLStateDiagram(), processTransition(), and setDefaultState().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:48 2010 for Second Life Viewer by  doxygen 1.4.7