Go to the documentation of this file.
12 #ifndef RTCTK_COMPONENTFRAMEWORK_MODELMANIPULATOR_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_MODELMANIPULATOR_HPP
56 std::string
const&
id,
57 std::string
const& parent_id =
"",
58 std::string
const& activity_id =
"",
59 std::string
const& entry_action_id =
"",
60 std::string
const& exit_action_id =
"");
68 void DelState(std::string
const&
id);
79 void RepState(std::string
const&
id, std::string
const& new_id);
88 void ModStateId(std::string
const& state_id, std::string
const& new_state_id);
105 void ModStateParent(std::string
const& state_id, std::string
const& new_parent_id);
114 void ModStateDoActivity(std::string
const& state_id, std::string
const& new_activity_id);
123 void ModStateEntryAction(std::string
const& state_id, std::string
const& new_entry_action_id);
132 void ModStateExitAction(std::string
const& state_id, std::string
const& new_exit_action_id);
159 void AddTrans(std::string
const& source_id,
160 std::string
const& target_id,
161 std::string
const& event_id =
"",
162 std::string
const& guard_id =
"",
163 std::string
const& action_id =
"");
175 void DelTrans(std::string
const& source_id,
176 std::string
const& target_id,
177 std::string
const& event_id =
"",
178 std::string
const& guard_id =
"");
192 std::string
const& target_id,
193 std::string
const& event_id,
194 std::string
const& guard_id,
195 std::string
const& new_target_id);
209 std::string
const& target_id,
210 std::string
const& event_id,
211 std::string
const& guard_id,
212 std::string
const& new_source_id);
226 std::string
const& target_id,
227 std::string
const& event_id,
228 std::string
const& guard_id,
229 std::string
const& new_event_id);
243 std::string
const& target_id,
244 std::string
const& event_id,
245 std::string
const& guard_id,
246 std::string
const& new_guard_id);
260 std::string
const& target_id,
261 std::string
const& event_id,
262 std::string
const& guard_id,
263 std::string
const& new_action_id);
266 State* GetStatePtr(std::string
const& state_id);
268 State* FindState(std::string
const& state_id);
270 Transition* FindTransition(std::string
const& source_id,
271 std::string
const& target_id,
272 std::string
const& event_id,
273 std::string
const& guard_id);
275 void DelStateRecursive(
State* state);
ModelManipulator(StateMachine &sm)
Constructor.
Definition: modelManipulator.cpp:22
void ModStateExitAction(std::string const &state_id, std::string const &new_exit_action_id)
Modifies the exit-action of a state.
Definition: modelManipulator.cpp:176
void ModTransTarget(std::string const &source_id, std::string const &target_id, std::string const &event_id, std::string const &guard_id, std::string const &new_target_id)
Modifies the target state of a transition.
Definition: modelManipulator.cpp:268
void ModStateEntryAction(std::string const &state_id, std::string const &new_entry_action_id)
Modifies the entry-action of a state.
Definition: modelManipulator.cpp:170
void ModTransGuard(std::string const &source_id, std::string const &target_id, std::string const &event_id, std::string const &guard_id, std::string const &new_guard_id)
Modifies the guard of a transition.
Definition: modelManipulator.cpp:295
void ModTransSource(std::string const &source_id, std::string const &target_id, std::string const &event_id, std::string const &guard_id, std::string const &new_source_id)
Modifies the source state of a transition.
Definition: modelManipulator.cpp:277
void AddTrans(std::string const &source_id, std::string const &target_id, std::string const &event_id="", std::string const &guard_id="", std::string const &action_id="")
Adds a new transition.
Definition: modelManipulator.cpp:227
In-memory representation of the state machine model.
void ModStateType(std::string const &state_id, StateType new_state_type)
Modifies type of state.
Definition: modelManipulator.cpp:122
Definition: commandReplier.cpp:20
void ExtStateToParallel(std::string const &id)
Parallel Extension.
Definition: modelManipulator.cpp:183
void ModStateParent(std::string const &state_id, std::string const &new_parent_id)
Re-parents a state.
Definition: modelManipulator.cpp:148
Class that provides methods to manipulate the state machine model.
Definition: modelManipulator.hpp:24
void RepState(std::string const &id, std::string const &new_id)
Replaces a state with another state.
Definition: modelManipulator.cpp:57
void ModStateId(std::string const &state_id, std::string const &new_state_id)
Renames a state.
Definition: modelManipulator.cpp:117
StateType
Definition: model.hpp:21
void AddState(StateType type, std::string const &id, std::string const &parent_id="", std::string const &activity_id="", std::string const &entry_action_id="", std::string const &exit_action_id="")
Adds a new state.
Definition: modelManipulator.cpp:29
void DelState(std::string const &id)
Deletes an existing state including all of its children and transitions.
Definition: modelManipulator.cpp:82
void ModStateDoActivity(std::string const &state_id, std::string const &new_activity_id)
Modifies the do-activity of a state.
Definition: modelManipulator.cpp:165
void ModTransAction(std::string const &source_id, std::string const &target_id, std::string const &event_id, std::string const &guard_id, std::string const &new_action_id)
Modifies the action of a transition.
Definition: modelManipulator.cpp:304
void ModTransEvent(std::string const &source_id, std::string const &target_id, std::string const &event_id, std::string const &guard_id, std::string const &new_event_id)
Modifies the trigger of a transition.
Definition: modelManipulator.cpp:286
std::string GetParentId(std::string const &id)
Gets the name of the parent state.
Definition: modelManipulator.cpp:25
void DelTrans(std::string const &source_id, std::string const &target_id, std::string const &event_id="", std::string const &guard_id="")
Deletes an existing transition.
Definition: modelManipulator.cpp:249