statemachine05b.h
#ifndef STATEMACHINE05B_H
#define STATEMACHINE05B_H
#include <string>
#include "xf/behavior.h"
class StateMachine05b : public XFBehavior
{
public:
StateMachine05b(std::string text);
~StateMachine05b() override;
protected:
XFEventStatus processEvent() override;
inline std::string getText() const { return text_; }
protected:
typedef enum
{
Timeout_SAY_HELLO_id = 1
} eTimeoutId;
typedef enum
{
STATE_UNKNOWN = 0,
STATE_INITIAL = 1,
STATE_SAY_TEXT = 2
} eMainState;
eMainState currentState_;
std::string text_;
};
#endif // STATEMACHINE05B_H
StateMachine05b
Definition: statemachine05b.h:19
StateMachine05b::processEvent
XFEventStatus processEvent() override
Remplementation from XFReactive.
Definition: statemachine05b.cpp:21
StateMachine05b::eMainState
eMainState
Definition: statemachine05b.h:43
StateMachine05b::STATE_UNKNOWN
@ STATE_UNKNOWN
Unknown state.
Definition: statemachine05b.h:44
StateMachine05b::STATE_SAY_TEXT
@ STATE_SAY_TEXT
Say "text" state.
Definition: statemachine05b.h:46
StateMachine05b::STATE_INITIAL
@ STATE_INITIAL
Initial state.
Definition: statemachine05b.h:45
StateMachine05b::eTimeoutId
eTimeoutId
Definition: statemachine05b.h:34
StateMachine05b::Timeout_SAY_HELLO_id
@ Timeout_SAY_HELLO_id
Timeout id for WAIT.
Definition: statemachine05b.h:35
StateMachine05b::currentState_
eMainState currentState_
Attribute indicating currently active state.
Definition: statemachine05b.h:49
StateMachine05b::text_
std::string text_
Text to display in state machine state.
Definition: statemachine05b.h:51
StateMachine05b::StateMachine05b
StateMachine05b(std::string text)
Definition: statemachine05b.cpp:10
StateMachine05b::getText
std::string getText() const
Returns text. Accessor for #_text.
Definition: statemachine05b.h:27