17 State(
const std::string& name,
State* parent =
nullptr);
20 const std::string& name()
const;
21 void setName(
const std::string& name);
24 const State* parentState()
const;
26 State* initialSubState();
27 const State* initialSubState()
const;
28 void setInitialSubState(
State* initialSubState);
30 State* finalSubState();
31 const State* finalSubState()
const;
32 void setFinalSubState(
State* finalSubState);
34 State* currentSubState();
35 const State* currentSubState()
const;
36 void setCurrentSubState(
State* substate);
38 bool finished()
const;
40 std::list<State*>& substates();
41 const std::list<State*>& substates()
const;
42 void addSubState(
State* state);
43 void removeSubState(
State* state);
45 std::list<Transition*>& transitions();
46 const std::list<Transition*>& transitions()
const;
54 virtual void update(
float deltaSec);
73 std::list<State*> m_subStates;
74 std::list<Transition*> m_transitions;
76 State* m_initialSubState;
77 State* m_finalSubState;
78 State* m_currentSubState;
virtual void onLeft()
Definition: state.cpp:209
virtual void update(float deltaSec)
Definition: state.cpp:144
void transit(State *target)
Definition: state.cpp:181
virtual void onEntered()
Definition: state.cpp:205
State * pathToDescendant(State *descendant)
Definition: state.cpp:166
Definition: transition.h:15