XmlWriter.cpp
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarX::
17 * @author Christian Mandery (christian.mandery at kit dot edu)
18 * @date 2014
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #include "XmlWriter.h"
24 
25 #include "../../StatechartViewerPlugin/model/State.h"
26 #include "../../StatechartViewerPlugin/model/stateinstance/EndState.h"
27 #include "../../StatechartViewerPlugin/model/stateinstance/LocalState.h"
28 #include "../../StatechartViewerPlugin/model/stateinstance/RemoteState.h"
29 #include "../../StatechartViewerPlugin/model/stateinstance/DynamicRemoteState.h"
30 
35 
36 #include <SimoxUtility/algorithm/string/string_tools.h>
37 
38 using namespace armarx::statechartio;
39 using namespace armarx::statechartmodel;
40 
42  : variantInfo(variantInfo)
43 { }
44 
45 void XmlWriter::serialize(StateCPtr state, const QMap<QString, StateTreeNodePtr>& uuidToNodeMap)
46 {
47  document.clear();
48 
49  document.append_node(buildXmlDeclaration());
50 
51  rapidxml::xml_node<>* rootNode = document.allocate_node(rapidxml::node_element, "State");
52 
53  rootNode->append_attribute(document.allocate_attribute("version", "1.2"));
54  rootNode->append_attribute(document.allocate_attribute("name", cloneQString(state->getStateName())));
55  rootNode->append_attribute(document.allocate_attribute("uuid", cloneQString(state->getUUID())));
56  rootNode->append_attribute(document.allocate_attribute("width", cloneQString(QString::number(state->getSize().width()))));
57  rootNode->append_attribute(document.allocate_attribute("height", cloneQString(QString::number(state->getSize().height()))));
58  rootNode->append_attribute(document.allocate_attribute("type", cloneQString(statechartmodel::State::StateTypeToString(state->getType()))));
59 
60  const QString& description = state->getDescription();
61 
62  if (!description.isEmpty())
63  {
64  rootNode->append_node(buildDescription(description));
65  }
66 
67  rootNode->append_node(buildParameterList("InputParameters", state->getInputParameters()));
68  rootNode->append_node(buildParameterList("OutputParameters", state->getOutputParameters()));
69  rootNode->append_node(buildParameterList("LocalParameters", state->getLocalParameters()));
70  rootNode->append_node(buildSubstateList(state->getSubstates()));
71  rootNode->append_node(buildEventList(state->getOutgoingEvents()));
72 
73  TransitionCPtr startStateTransition = state->getStartTransition();
74 
75  if (startStateTransition->destinationState)
76  {
77  rootNode->append_node(buildStartState(startStateTransition));
78  }
79  rootNode->append_node(buildTransitionList(state->getTransitions(), uuidToNodeMap));
80 
81  document.append_node(rootNode);
82 }
83 
84 QString XmlWriter::getXmlString(bool indent) const
85 {
86  std::string s;
87  rapidxml::print(std::back_inserter(s), document, indent ? 0 : rapidxml::print_no_indenting);
88 
89  return QString::fromStdString(s);
90 }
91 
93 {
94  substateNode = document.allocate_node(rapidxml::node_element, "LocalState");
95  substateNode->append_attribute(document.allocate_attribute("refuuid", cloneQString(localState->getClassUUID())));
96  substateNode->append_attribute(document.allocate_attribute("left", cloneQString(QString::number(localState->getTopLeft().x()))));
97  substateNode->append_attribute(document.allocate_attribute("top", cloneQString(QString::number(localState->getTopLeft().y()))));
98  substateNode->append_attribute(document.allocate_attribute("boundingSquareSize", cloneQString(QString::number(localState->getBoundingSquareSize()))));
99 }
100 
102 {
103  substateNode = document.allocate_node(rapidxml::node_element, "RemoteState");
104  substateNode->append_attribute(document.allocate_attribute("refuuid", cloneQString(remoteState->getClassUUID())));
105  substateNode->append_attribute(document.allocate_attribute("proxyName", cloneQString(remoteState->proxyName)));
106  substateNode->append_attribute(document.allocate_attribute("left", cloneQString(QString::number(remoteState->getTopLeft().x()))));
107  substateNode->append_attribute(document.allocate_attribute("top", cloneQString(QString::number(remoteState->getTopLeft().y()))));
108  substateNode->append_attribute(document.allocate_attribute("boundingSquareSize", cloneQString(QString::number(remoteState->getBoundingSquareSize()))));
109 }
110 
112 {
113  substateNode = document.allocate_node(rapidxml::node_element, "DynamicRemoteState");
114  substateNode->append_attribute(document.allocate_attribute("refuuid", cloneQString(dynamicRemoteState->getClassUUID())));
115  substateNode->append_attribute(document.allocate_attribute("left", cloneQString(QString::number(dynamicRemoteState->getTopLeft().x()))));
116  substateNode->append_attribute(document.allocate_attribute("top", cloneQString(QString::number(dynamicRemoteState->getTopLeft().y()))));
117  substateNode->append_attribute(document.allocate_attribute("boundingSquareSize", cloneQString(QString::number(dynamicRemoteState->getBoundingSquareSize()))));
118 
119 }
120 
122 {
123  substateNode = document.allocate_node(rapidxml::node_element, "EndState");
124  substateNode->append_attribute(document.allocate_attribute("event", cloneQString(endState->getEventName())));
125  substateNode->append_attribute(document.allocate_attribute("left", cloneQString(QString::number(endState->getTopLeft().x()))));
126  substateNode->append_attribute(document.allocate_attribute("top", cloneQString(QString::number(endState->getTopLeft().y()))));
127  substateNode->append_attribute(document.allocate_attribute("boundingSquareSize", cloneQString(QString::number(endState->getBoundingSquareSize()))));
128 }
129 
130 rapidxml::xml_node<>* XmlWriter::buildDescription(const QString& description)
131 {
132  return document.allocate_node(rapidxml::node_element, "Description", cloneQString(description));
133 }
134 
135 rapidxml::xml_node<>* XmlWriter::buildEventList(const EventList& eventList)
136 {
137  rapidxml::xml_node<>* rootNode = document.allocate_node(rapidxml::node_element, "Events");
138 
139  for (EventList::const_iterator i = eventList.begin(); i != eventList.end(); ++i)
140  {
141  statechartmodel::EventPtr event = *i;
142 
143  rapidxml::xml_node<>* eventNode = document.allocate_node(rapidxml::node_element, "Event");
144  eventNode->append_attribute(document.allocate_attribute("name", cloneQString(event->name)));
145 
146  if (!event->description.isEmpty())
147  {
148  eventNode->append_node(buildDescription(event->description));
149  }
150 
151  rootNode->append_node(eventNode);
152  }
153 
154  return rootNode;
155 }
156 
157 rapidxml::xml_node<>* XmlWriter::buildParameterList(const QString& tagName, const armarx::statechartmodel::StateParameterMap& parameterMap)
158 {
159  rapidxml::xml_node<>* rootNode = document.allocate_node(rapidxml::node_element, cloneQString(tagName));
160 
161  for (armarx::statechartmodel::StateParameterMap::const_iterator i = parameterMap.begin(); i != parameterMap.end(); ++i)
162  {
163  QString parameterName = i.key();
164  statechartmodel::StateParameterPtr parameter = i.value();
165 
166  rapidxml::xml_node<>* parameterNode = document.allocate_node(rapidxml::node_element, "Parameter");
167 
168  parameterNode->append_attribute(document.allocate_attribute("name", cloneQString(parameterName)));
169  parameterNode->append_attribute(document.allocate_attribute("type", cloneQString(parameter->type)));
170  parameterNode->append_attribute(document.allocate_attribute("docType", cloneQString(QString::fromStdString(variantInfo->getNestedHumanNameFromBaseName(parameter->type.toStdString())))));
171  parameterNode->append_attribute(document.allocate_attribute("optional", parameter->optional ? "yes" : "no"));
172 
173  if (!parameter->description.isEmpty())
174  {
175  parameterNode->append_node(buildDescription(parameter->description));
176  }
177 
178  for (auto j = parameter->profileDefaultValues.constBegin(); j != parameter->profileDefaultValues.constEnd(); ++j)
179  {
180  rapidxml::xml_node<>* profileDefaultValueNode = document.allocate_node(rapidxml::node_element, "DefaultValue");
181  QString profileName = j.key();
182 
183  if (profileName.toStdString() != StatechartProfiles::GetRootName())
184  {
185  profileDefaultValueNode->append_attribute(document.allocate_attribute("profile", cloneQString(profileName)));
186  }
187 
188  if (j.value().first)
189  {
190  JSONObjectPtr jsonObject = new JSONObject();
191  jsonObject->serializeIceObject(j.value().first);
192  profileDefaultValueNode->append_attribute(document.allocate_attribute("value", cloneQString(j.value().second)));
193  profileDefaultValueNode->append_attribute(document.allocate_attribute("docValue", cloneQString(QString::fromStdString(escapeString(j.value().first->toString())))));
194  parameterNode->append_node(profileDefaultValueNode);
195  }
196  else if (j.value().second.size() != 0)
197  {
198  profileDefaultValueNode->append_attribute(document.allocate_attribute("value", cloneQString(j.value().second)));
199  parameterNode->append_node(profileDefaultValueNode);
200  }
201  }
202 
203  rootNode->append_node(parameterNode);
204  }
205 
206  return rootNode;
207 }
208 std::string XmlWriter::escapeString(std::string str)
209 {
210  str = simox::alg::replace_all(str, "\\", "\\\\");
211  str = simox::alg::replace_all(str, "\r", "\\r");
212  str = simox::alg::replace_all(str, "\n", "\\n");
213  return str;
214 }
215 
216 rapidxml::xml_node<>* XmlWriter::buildParameterMappingList(const armarx::statechartmodel::ParameterMappingList& parameterMappingList, const QString& mappingName)
217 {
218 
219  rapidxml::xml_node<>* rootNode = document.allocate_node(rapidxml::node_element,
220  document.allocate_string(mappingName.toUtf8().data()));
221 
222  for (ParameterMappingList::const_iterator j = parameterMappingList.begin(); j != parameterMappingList.end(); ++j)
223  {
224  statechartmodel::ParameterMappingPtr parameterMapping = *j;
225 
226  rapidxml::xml_node<>* parameterMappingNode = document.allocate_node(rapidxml::node_element, "ParameterMapping");
227 
228  QString mappingSourceString;
229 
230  mappingSourceString = QString::fromStdString(PM::MappingSourceToString(parameterMapping->source));
231 
232  parameterMappingNode->append_attribute(document.allocate_attribute("sourceType", cloneQString(mappingSourceString)));
233  parameterMappingNode->append_attribute(document.allocate_attribute("from", cloneQString(parameterMapping->sourceKey)));
234  parameterMappingNode->append_attribute(document.allocate_attribute("to", cloneQString(parameterMapping->destinationKey)));
235 
236  for (auto j = parameterMapping->profileValues.constBegin(); j != parameterMapping->profileValues.constEnd(); ++j)
237  {
238  rapidxml::xml_node<>* profileDefaultValueNode = document.allocate_node(rapidxml::node_element, "DefaultValue");
239  QString profileName = j.key();
240 
241  if (profileName.toStdString() != StatechartProfiles::GetRootName())
242  {
243  profileDefaultValueNode->append_attribute(document.allocate_attribute("profile", cloneQString(profileName)));
244  }
245 
246  profileDefaultValueNode->append_attribute(document.allocate_attribute("value", cloneQString(j.value())));
247  parameterMappingNode->append_node(profileDefaultValueNode);
248  }
249 
250 
251  rootNode->append_node(parameterMappingNode);
252  }
253 
254  return rootNode;
255 }
256 
257 rapidxml::xml_node<>* XmlWriter::buildStartState(TransitionCPtr startStateTransition)
258 {
259  rapidxml::xml_node<>* rootNode = document.allocate_node(rapidxml::node_element, "StartState");
260 
261  rootNode->append_attribute(document.allocate_attribute("substateName", cloneQString(startStateTransition->destinationState->getInstanceName())));
262 
263  rapidxml::xml_node<>* parameterMappingsNode = buildParameterMappingList(startStateTransition->mappingToNextStatesInput, "ParameterMappings");
264  rootNode->append_node(parameterMappingsNode);
265 
266  // Support points
267  rapidxml::xml_node<>* supportPointsNode = document.allocate_node(rapidxml::node_element, "SupportPoints");
268  auto supportPoints = startStateTransition->supportPoints.toPointList();
269  for (QList<QPointF>::const_iterator j = supportPoints.begin(); j != supportPoints.end(); ++j)
270  {
271  QPointF supportPoint = *j;
272 
273  rapidxml::xml_node<>* supportPointNode = document.allocate_node(rapidxml::node_element, "SupportPoint");
274  supportPointNode->append_attribute(document.allocate_attribute("posX", cloneQString(QString::number(supportPoint.x()))));
275  supportPointNode->append_attribute(document.allocate_attribute("posY", cloneQString(QString::number(supportPoint.y()))));
276 
277  supportPointsNode->append_node(supportPointNode);
278  }
279 
280  rootNode->append_node(supportPointsNode);
281 
282  return rootNode;
283 }
284 
285 rapidxml::xml_node<>* XmlWriter::buildSubstateList(const StateInstanceMap& substateMap)
286 {
287  rapidxml::xml_node<>* rootNode = document.allocate_node(rapidxml::node_element, "Substates");
288 
289  for (StateInstanceMap::const_iterator i = substateMap.begin(); i != substateMap.end(); ++i)
290  {
291  QString substateName = i.key();
292  StateInstancePtr substate = i.value();
293 
294  substate->accept(*this);
295  substateNode->prepend_attribute(document.allocate_attribute("name", cloneQString(substateName)));
296  rootNode->append_node(substateNode);
297  }
298 
299  return rootNode;
300 }
301 
302 rapidxml::xml_node<>* XmlWriter::buildTransitionList(const CTransitionList& transitionList, const QMap<QString, StateTreeNodePtr>& uuidToNodeMap)
303 {
304  rapidxml::xml_node<>* rootNode = document.allocate_node(rapidxml::node_element, "Transitions");
305 
306  for (CTransitionList::const_iterator i = transitionList.begin(); i != transitionList.end(); ++i)
307  {
308  TransitionCPtr transition = *i;
309  // Create transition node
310  rapidxml::xml_node<>* transitionNode = document.allocate_node(rapidxml::node_element, "Transition");
311  transitionNode->append_attribute(document.allocate_attribute("from", cloneQString(transition->sourceState->getInstanceName())));
312  if (transition->transitionUserCode && transition->destinationState)
313  {
314  transitionNode->append_attribute(document.allocate_attribute("transitionCodeEnabled", "1"));
315  if (transition->destinationState->getStateClass())
316  {
317  auto it = uuidToNodeMap.find(transition->destinationState->getStateClass()->getUUID());
318 
319  if (it != uuidToNodeMap.end())
320  {
321  const StateTreeNodePtr node = it.value();
322  if (node)
323  {
324  transitionNode->append_attribute(document.allocate_attribute("toClass", cloneQString(node->getState()->getStateName())));
325  transitionNode->append_attribute(document.allocate_attribute("toGroup", cloneQString(node->getGroup()->getName())));
326  transitionNode->append_attribute(document.allocate_attribute("toPackage", cloneQString(node->getGroup()->getPackageName())));
327  }
328 
329  }
330  if (transition->sourceState)
331  {
332  if (transition->sourceState->getStateClass())
333  {
334  it = uuidToNodeMap.find(transition->sourceState->getStateClass()->getUUID());
335 
336  if (it != uuidToNodeMap.end())
337  {
338  const StateTreeNodePtr node = it.value();
339  if (node)
340  {
341  transitionNode->append_attribute(document.allocate_attribute("fromClass", cloneQString(node->getState()->getStateName())));
342  transitionNode->append_attribute(document.allocate_attribute("fromGroup", cloneQString(node->getGroup()->getName())));
343  transitionNode->append_attribute(document.allocate_attribute("fromPackage", cloneQString(node->getGroup()->getPackageName())));
344  }
345  }
346  }
347  else
348  {
349  throw LocalException() << ("Could not find source stateclass of instance " + transition->sourceState->getInstanceName() + "! Please open all Remote States in the Statechart Editor before saving.");
350  }
351  }
352  }
353  else
354  {
355  throw LocalException() << ("Could not find destination stateclass of instance " + transition->destinationState->getInstanceName() + "! Please open all Remote States in the Statechart Editor before saving.");
356  }
357  }
358 
359  if (transition->destinationState)
360  {
361  transitionNode->append_attribute(document.allocate_attribute("to", cloneQString(transition->destinationState->getInstanceName())));
362  }
363 
364  transitionNode->append_attribute(document.allocate_attribute("eventName", cloneQString(transition->eventName)));
365 
366  // Parameter mappings
367  rapidxml::xml_node<>* parameterMappingsNode = buildParameterMappingList(transition->mappingToNextStatesInput, "ParameterMappings");
368  transitionNode->append_node(parameterMappingsNode);
369  parameterMappingsNode = buildParameterMappingList(transition->mappingToParentStatesLocal, "ParameterMappingsToParentsLocal");
370  transitionNode->append_node(parameterMappingsNode);
371  parameterMappingsNode = buildParameterMappingList(transition->mappingToParentStatesOutput, "ParameterMappingsToParentsOutput");
372  transitionNode->append_node(parameterMappingsNode);
373 
374 
375  // Support points
376  rapidxml::xml_node<>* supportPointsNode = document.allocate_node(rapidxml::node_element, "SupportPoints");
377  auto supportPoints = transition->supportPoints.toPointList();
378  for (QList<QPointF>::const_iterator j = supportPoints.begin(); j != supportPoints.end(); ++j)
379  {
380  QPointF supportPoint = *j;
381 
382  rapidxml::xml_node<>* supportPointNode = document.allocate_node(rapidxml::node_element, "SupportPoint");
383  supportPointNode->append_attribute(document.allocate_attribute("posX", cloneQString(QString::number(supportPoint.x()))));
384  supportPointNode->append_attribute(document.allocate_attribute("posY", cloneQString(QString::number(supportPoint.y()))));
385 
386  supportPointsNode->append_node(supportPointNode);
387  }
388 
389  transitionNode->append_node(supportPointsNode);
390 
391  rootNode->append_node(transitionNode);
392  }
393 
394  return rootNode;
395 }
396 
397 rapidxml::xml_node<>* XmlWriter::buildXmlDeclaration()
398 {
399  rapidxml::xml_node<>* node = document.allocate_node(rapidxml::node_declaration);
400  node->append_attribute(document.allocate_attribute("version", "1.0"));
401  node->append_attribute(document.allocate_attribute("encoding", "utf-8"));
402 
403  return node;
404 }
405 
406 char* XmlWriter::cloneQString(const QString& string)
407 {
408  // We need to clone all strings because the QByteArrays created be toUtf8() are destroyed immediately after leaving the scope.
409  return document.allocate_string(string.toUtf8());
410 }
str
std::string str(const T &t)
Definition: UserAssistedSegmenterGuiWidgetController.cpp:42
rapidxml::print
OutIt print(OutIt out, const xml_node< Ch > &node, int flags=0)
Prints XML to given output iterator.
Definition: rapidxml_print.hpp:507
armarx::statechartmodel::RemoteStateCPtr
std::shared_ptr< const RemoteState > RemoteStateCPtr
Definition: XmlWriter.h:51
JSONObject.h
armarx::StateTreeNodePtr
std::shared_ptr< StateTreeNode > StateTreeNodePtr
Definition: StatechartGroupDefs.h:31
armarx::statechartio
Definition: StateInstanceFactory.h:31
rapidxml::node_element
@ node_element
An element node. Name contains element name. Value contains text of first data node.
Definition: rapidxml.hpp:147
XmlWriter.h
armarx::statechartmodel::EventList
QList< EventPtr > EventList
Definition: XmlWriter.h:47
rapidxml::node_declaration
@ node_declaration
A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalon...
Definition: rapidxml.hpp:151
armarx::statechartmodel::State::StateTypeToString
static QString StateTypeToString(eStateType type)
Definition: State.cpp:1188
ParameterMapping.h
armarx::statechartmodel::StateInstancePtr
std::shared_ptr< StateInstance > StateInstancePtr
Definition: StateInstance.h:138
armarx::statechartio::XmlWriter::visitEndState
void visitEndState(armarx::statechartmodel::EndStateCPtr endState) override
Definition: XmlWriter.cpp:121
armarx::RemoteGui::toUtf8
std::string toUtf8(QString const &qstring)
Definition: WidgetHandler.cpp:7
armarx::statechartio::XmlWriter::visitRemoteState
void visitRemoteState(armarx::statechartmodel::RemoteStateCPtr remoteState) override
Definition: XmlWriter.cpp:101
armarx::statechartmodel::StateInstanceMap
QMap< QString, StateInstancePtr > StateInstanceMap
Definition: State.h:50
rapidxml::xml_node::prepend_attribute
void prepend_attribute(xml_attribute< Ch > *attribute)
Prepends a new attribute to the node.
Definition: rapidxml.hpp:1366
armarx::statechartio::XmlWriter::visitDynamicRemoteState
void visitDynamicRemoteState(armarx::statechartmodel::DynamicRemoteStateCPtr dynamicRemoteState) override
Definition: XmlWriter.cpp:111
armarx::statechartio::XmlWriter::serialize
void serialize(armarx::statechartmodel::StateCPtr state, const QMap< QString, StateTreeNodePtr > &uuidToNodeMap=QMap< QString, StateTreeNodePtr >())
Builds XML data structures for serialization of the given state object.
Definition: XmlWriter.cpp:45
armarx::statechartmodel::DynamicRemoteStateCPtr
std::shared_ptr< const DynamicRemoteState > DynamicRemoteStateCPtr
Definition: DynamicRemoteState.h:41
armarx::statechartmodel::StateParameterMap
QMap< QString, StateParameterPtr > StateParameterMap
Definition: StateParameter.h:46
armarx::statechartmodel
Definition: XmlWriter.h:36
rapidxml::print_no_indenting
const int print_no_indenting
Printer flag instructing the printer to suppress indenting of XML. See print() function.
Definition: rapidxml_print.hpp:24
armarx::JSONObjectPtr
IceInternal::Handle< JSONObject > JSONObjectPtr
Definition: JSONObject.h:34
StatechartProfiles.h
armarx::statechartio::XmlWriter::visitLocalState
void visitLocalState(armarx::statechartmodel::LocalStateCPtr localState) override
Definition: XmlWriter.cpp:92
armarx::control::hardware_config::tagName
std::string tagName(ConfigTag tag)
Definition: Config.cpp:302
armarx::statechartmodel::StateParameterPtr
std::shared_ptr< StateParameter > StateParameterPtr
Definition: StateParameter.h:45
armarx::statechartio::XmlWriter::XmlWriter
XmlWriter(const VariantInfoPtr &variantInfo)
Definition: XmlWriter.cpp:41
armarx::statechartmodel::CTransitionList
QList< TransitionCPtr > CTransitionList
Definition: State.h:49
armarx::statechartio::XmlWriter::getXmlString
QString getXmlString(bool indent=true) const
Builds the XML document for the state object that has been handled by serialize() before.
Definition: XmlWriter.cpp:84
armarx::ParameterMapping::MappingSourceToString
static std::string MappingSourceToString(MappingSource mappingSource)
Definition: ParameterMapping.cpp:271
rapidxml::xml_node
Class representing a node of XML document.
Definition: rapidxml.hpp:138
armarx::statechartmodel::LocalStateCPtr
std::shared_ptr< const LocalState > LocalStateCPtr
Definition: XmlWriter.h:50
rapidxml::xml_node::append_node
void append_node(xml_node< Ch > *child)
Appends a new child node.
Definition: rapidxml.hpp:1241
armarx::VariantInfoPtr
std::shared_ptr< VariantInfo > VariantInfoPtr
Definition: VariantInfo.h:39
armarx::statechartmodel::TransitionCPtr
std::shared_ptr< const Transition > TransitionCPtr
Definition: Transition.h:94
armarx::statechartmodel::ParameterMappingList
QList< ParameterMappingPtr > ParameterMappingList
Definition: XmlWriter.h:49
armarx::statechartmodel::ParameterMappingPtr
std::shared_ptr< ParameterMapping > ParameterMappingPtr
Definition: XmlWriter.h:48
armarx::statechartmodel::EventPtr
std::shared_ptr< Event > EventPtr
Definition: XmlWriter.h:46
armarx::StatechartProfiles::GetRootName
static std::string GetRootName()
Definition: StatechartProfiles.h:78
rapidxml::xml_node::append_attribute
void append_attribute(xml_attribute< Ch > *attribute)
Appends a new attribute to the node.
Definition: rapidxml.hpp:1388
armarx::statechartmodel::StateCPtr
std::shared_ptr< const State > StateCPtr
Definition: XmlWriter.h:45
armarx::statechartmodel::EndStateCPtr
std::shared_ptr< const EndState > EndStateCPtr
Definition: XmlWriter.h:52
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
rapidxml_print.hpp
rapidxml::xml_document::clear
void clear()
Clears the document by deleting all nodes and clearing the memory pool.
Definition: rapidxml.hpp:1617