Go to the documentation of this file.
44 #ifndef SMCLIB__STATEMAP_H_
45 #define SMCLIB__STATEMAP_H_
47 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
49 #if defined(SMC_NO_EXCEPTIONS)
51 #endif // SMC_NO_EXCEPTIONS
55 #if defined(SMC_NO_EXCEPTIONS)
57 #endif // SMC_NO_EXCEPTIONS
60 #if defined(SMC_NO_EXCEPTIONS)
62 #endif // SMC_NO_EXCEPTIONS
65 #if !defined(SMC_NO_EXCEPTIONS)
74 #define MAX_NAME_LEN 100
100 #ifndef SMC_NO_EXCEPTIONS
103 public std::runtime_error
116 : std::runtime_error(reason)
172 :
SmcException(
"transition invoked while in transition")
208 const char *transition)
374 #endif // !SMC_NO_EXCEPTIONS
397 State(
const char *name,
int stateId)
538 return(
this == &fsm);
555 #ifdef SMC_USES_IOSTREAMS
557 std::ostream& getDebugStream()
559 return (*_debug_stream);
563 void setDebugStream(std::ostream& debug_stream)
565 _debug_stream = &debug_stream;
568 #endif // SMC_USES_IOSTREAMS
574 return(
_state == NULL ?
true :
false);
620 #ifdef SMC_USES_IOSTREAMS
621 *_debug_stream <<
"ENTER STATE : "
625 TRACE(
"ENTER STATE : %s\n\r",
627 #endif // SMC_USES_IOSTREAMS
646 state_ptr = state_ptr->
getNext(), ++retval)
670 #ifdef SMC_USES_IOSTREAMS
671 *_debug_stream <<
"PUSH TO STATE : "
675 TRACE(
"PUSH TO STATE : %s\n\r",
677 #endif // SMC_USES_IOSTREAMS
688 #ifdef SMC_NO_EXCEPTIONS
695 #endif // SMC_NO_EXCEPTIONS
704 #ifdef SMC_USES_IOSTREAMS
705 *_debug_stream <<
"POP TO STATE : "
709 TRACE(
"POP TO STATE : %s\n\r",
711 #endif // SMC_USES_IOSTREAMS
723 state_ptr = next_ptr)
725 next_ptr = state_ptr->
getNext();
739 #ifdef SMC_USES_IOSTREAMS
741 _debug_stream(&std::cerr)
782 #ifdef SMC_USES_IOSTREAMS
786 std::ostream *_debug_stream;
787 #endif // SMC_USES_IOSTREAMS
855 #endif // SMCLIB__STATEMAP_H_
virtual ~TransitionUndefinedException()
virtual ~PopOnEmptyStateStackException()
IndexOutOfBoundsException(const IndexOutOfBoundsException &ex)
FSMContext(const FSMContext &)
const TransitionUndefinedException & operator=(const TransitionUndefinedException &ex)
virtual void enterStartState()=0
IndexOutOfBoundsException(const int index, const int minIndex, const int maxIndex)
const char * getTransition() const
int same(const FSMContext &fsm) const
TransitionUndefinedException(const TransitionUndefinedException &ex)
int getStateStackDepth() const
bool isStateStackEmpty() const
void setTransition(const char *transition)
bool isInTransition() const
const IndexOutOfBoundsException & operator=(const IndexOutOfBoundsException &ex)
virtual ~StateUndefinedException()
void setState(const State &state)
SmcException(const std::string &reason)
StateUndefinedException()
virtual ~IndexOutOfBoundsException()
char * copyString(const char *s)
State * getPreviousState()
FSMContext(const State &state)
State(const char *name, int stateId)
FSMContext & operator=(const FSMContext &fsm)
TransitionUndefinedException()
const char * getName() const
StateEntry(State *state, StateEntry *next)
PopOnEmptyStateStackException()
void setDebugFlag(bool flag)
void pushState(const State &state)
StateEntry * _state_stack
TransitionUndefinedException(const char *state, const char *transition)
IndexOutOfBoundsException()
const char * getState() const
smclib
Author(s): Various
autogenerated on Tue Mar 1 2022 23:53:36