XmlReader.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 
26 #include "../../StatechartViewerPlugin/model/stateinstance/RegularState.h"
27 #include "../../StatechartViewerPlugin/model/DynamicRemoteStateClass.h"
30 
31 #include "StateInstanceFactory.h"
32 #include "XmlReader.h"
33 
34 using namespace armarx::exceptions::local;
35 using namespace armarx::statechartio;
36 using namespace armarx::statechartmodel;
37 
38 XmlReader::XmlReader(Ice::CommunicatorPtr iceCommunicator, VariantInfoPtr info) :
39  iceCommunicator(iceCommunicator),
40  info(info) {}
41 
42 void XmlReader::parseXml(const QString& xmlString)
43 {
44  QByteArray utf8Xml = xmlString.toUtf8();
45  rapidxml::xml_document<> document;
46 
47  try
48  {
49  document.parse<rapidxml::parse_validate_closing_tags>(utf8Xml.data());
50  }
51  catch (const rapidxml::parse_error& e)
52  {
53  throw XmlReaderException(std::string("Could not parse XML file: ") + e.what());
54  }
55 
56  rapidxml::xml_node<>* stateNode = XmlNodeIterator(&document, "State", true).getNext();
57  QString version = readAttribute(stateNode, "version");
58 
59  if (version != "1.0" && version != "1.1" && version != "1.2")
60  {
61  throw XmlReaderException("Only statechart XML definition version 1.0 - 1.2 are supported right now!");
62  }
63 
64  if (readAttribute(stateNode, "type", false) == statechartmodel::State::StateTypeToString(eDynamicRemoteState))
65  {
66  loadedState = statechartmodel::StatePtr(new DynamicRemoteStateClass(readAttribute(stateNode, "uuid")));
67  ARMARX_IMPORTANT_S << "Found DynamicRemoteStateClass";
68  }
69  else
70  {
71  loadedState = statechartmodel::StatePtr(new statechartmodel::State(readAttribute(stateNode, "uuid")));
72  }
73 
74  loadedState->setStateName(readAttribute(stateNode, "name"));
75  loadedState->setSize(QSizeF(readAttribute(stateNode, "width").toFloat(), readAttribute(stateNode, "height").toFloat()));
76  loadedState->setDescription(readDescription(stateNode));
77 
78  rapidxml::xml_node<>* curNode;
80 
81  XmlNodeIterator inputParameterNI(stateNode, "InputParameters", false);
82 
83  // parameterList = loadedState->getInputParameters();
84  while ((curNode = inputParameterNI.getNext()))
85  {
86  parameterList.unite(readParameterList(curNode));
87  }
88 
89  loadedState->setInputParameters(parameterList);
90 
91  parameterList.clear();
92  // parameterList = loadedState->getLocalParameters();
93  XmlNodeIterator localParameterNI(stateNode, "LocalParameters", false);
94 
95  while ((curNode = localParameterNI.getNext()))
96  {
97  parameterList.unite(readParameterList(curNode));
98  }
99 
100  loadedState->setLocalParameters(parameterList);
101 
102  parameterList.clear();
103  // parameterList = loadedState->getOutputParameters();
104  XmlNodeIterator outputParameterNI(stateNode, "OutputParameters", false);
105 
106  while ((curNode = outputParameterNI.getNext()))
107  {
108  parameterList.unite(readParameterList(curNode));
109  }
110 
111  loadedState->setOutputParameters(parameterList);
112 
113  StateInstanceMap substateList;
114  XmlNodeIterator substatesNI(stateNode, "Substates", false);
115 
116  while ((curNode = substatesNI.getNext()))
117  {
118  substateList.unite(readSubstateList(curNode));
119  }
120 
121  loadedState->replaceSubstates(substateList);
122 
123  EventList eventList;
124  XmlNodeIterator eventNI(stateNode, "Events", false);
125 
126  while ((curNode = eventNI.getNext()))
127  {
128  eventList.append(readEventList(curNode));
129  }
130 
131  loadedState->setOutgoingEvents(eventList);
132 
133  rapidxml::xml_node<>* startStateNode = XmlNodeIterator(stateNode, "StartState", false).getNext();
134 
135  if (startStateNode)
136  {
137  readStartState(startStateNode);
138  }
139 
140  TransitionList transitionList;
141  XmlNodeIterator transitionNI(stateNode, "Transitions", false);
142 
143  while ((curNode = transitionNI.getNext()))
144  {
145  transitionList.append(readTransitionList(curNode));
146  }
147 
148  loadedState->replaceTransitions(transitionList);
149 }
150 
151 
152 
153 QString XmlReader::readDescription(rapidxml::xml_node<>* rootNode) const
154 {
155  rapidxml::xml_node<>* descriptionNode = XmlNodeIterator(rootNode, "Description", false).getNext();
156  return descriptionNode ? QString::fromUtf8(descriptionNode->value()) : "";
157 }
158 
159 EventList XmlReader::readEventList(rapidxml::xml_node<>* eventListNode) const
160 {
161  EventList eventList;
162  rapidxml::xml_node<>* curNode;
163 
164  XmlNodeIterator eventNI(eventListNode, "Event", false);
165 
166  while ((curNode = eventNI.getNext()))
167  {
169  event->name = readAttribute(curNode, "name");
170  event->description = readDescription(curNode);
171 
172  for (EventList::const_iterator i = eventList.begin(); i != eventList.end(); ++i)
173  {
174  if ((*i)->name == event->name)
175  {
176  throw XmlReaderException("Duplicate event name: " + event->name.toStdString());
177  }
178  }
179 
180  eventList.append(event);
181  }
182 
183  return eventList;
184 }
185 
186 armarx::statechartmodel::StateParameterMap XmlReader::readParameterList(rapidxml::xml_node<>* parameterListNode) const
187 {
189  rapidxml::xml_node<>* curNode;
190 
191  XmlNodeIterator parameterNI(parameterListNode, "Parameter", false);
192 
193  while ((curNode = parameterNI.getNext()))
194  {
195  statechartmodel::StateParameterPtr stateParameter(new statechartmodel::StateParameter());
196  stateParameter->type = readAttribute(curNode, "type");
197  //stateParameter->dataType = readAttribute(curNode, "dataType");
198  stateParameter->description = readDescription(curNode);
199 
200  // Support for legacy "default" attribute
201  stateParameter->setDefaultValueJson(readAttribute(curNode, "default", false));
202 
203  if (!stateParameter->getDefaultValueJson().isEmpty())
204  {
205  std::function<bool(std::string, std::string)> loadVar;
206  loadVar = [&](std::string curType, std::string prevType)
207  {
208  if (curType == prevType)
209  {
210  return false;
211  }
212  try
213  {
214 
215  JSONObjectPtr jsonObject = new JSONObject(iceCommunicator);
216  jsonObject->fromString(stateParameter->getDefaultValueJson().toUtf8().data());
217 
218  stateParameter->profileDefaultValues[QString::fromUtf8(StatechartProfiles::GetRootName().c_str())] =
219  {VariantContainerBasePtr::dynamicCast(jsonObject->deserializeIceObject()), stateParameter->getDefaultValueJson()};
220 
221  }
222  catch (Ice::NoValueFactoryException& e)
223  {
224  ARMARX_INFO_S << "Variant missing - trying to load variant " << e.type << " now";
225  info->loadLibraryOfVariant(e.type);
227  return loadVar(e.type, curType);
228  }
229  return true;
230  };
231 
232  try
233  {
234  loadVar("", "-");
235  }
236  catch (exceptions::user::UnknownTypeException& e)
237  {
238  ARMARX_WARNING_S << "Could not deserialize JSONString for type " << stateParameter->type;
239  }
240  catch (const armarx::JSONException& e)
241  {
242  throw XmlReaderException("Could not parse JSON: " + stateParameter->getDefaultValueJson().toStdString());
243  }
244  }
245 
246  // End of code snippet for legacy support
247 
248  XmlNodeIterator defaultValueNI(curNode, "DefaultValue", false);
249  rapidxml::xml_node<>* defaultValueCurNode;
250 
251  while ((defaultValueCurNode = defaultValueNI.getNext()))
252  {
253  QString profileName = readAttribute(defaultValueCurNode, "profile", false);
254 
255  if (profileName.size() == 0)
256  {
257  profileName = QString::fromUtf8(StatechartProfiles::GetRootName().c_str());
258  }
259 
260  QString valueJson = readAttribute(defaultValueCurNode, "value", true);
261  VariantContainerBasePtr valueVariant;
262  std::function<bool(std::string, std::string)> loadVar;
263  loadVar = [&](std::string curType, std::string prevType)
264  {
265  if (curType == prevType)
266  {
267  return false;
268  }
269  try
270  {
271 
272  JSONObjectPtr jsonObject = new JSONObject(iceCommunicator);
273  jsonObject->fromString(valueJson.toUtf8().data());
274 
275  valueVariant = VariantContainerBasePtr::dynamicCast(jsonObject->deserializeIceObject());
276  }
277  catch (Ice::NoValueFactoryException& e)
278  {
279  ARMARX_INFO_S << "Variant missing - trying to load variant " << e.type << " now";
280  info->loadLibraryOfVariant(e.type);
282  return loadVar(e.type, curType);
283  }
284  return true;
285  };
286 
287  try
288  {
289  loadVar("", "-");
290  }
291  catch (exceptions::user::UnknownTypeException& e)
292  {
293  ARMARX_WARNING_S << "Could not deserialize JSONString for type " << stateParameter->type;
294  }
295  catch (const armarx::JSONException& e)
296  {
297  throw XmlReaderException("Could not parse JSON: " + valueJson.toStdString());
298  }
299 
300  stateParameter->profileDefaultValues[profileName] = QPair<VariantContainerBasePtr, QString>(valueVariant, valueJson);
301  }
302 
303  QString optionalStr = readAttribute(curNode, "optional");
304 
305  if (optionalStr == "yes")
306  {
307  stateParameter->optional = true;
308  }
309  else if (optionalStr == "no")
310  {
311  stateParameter->optional = false;
312  }
313  else
314  {
315  throw XmlReaderException("\"optional\" attribute must have value \"yes\" or \"no\"!");
316  }
317 
318  QString parameterName = readAttribute(curNode, "name");
319 
320  if (stateParameterMap.contains(parameterName))
321  {
322  throw XmlReaderException("Duplicate parameter name: " + parameterName.toStdString());
323  }
324 
325  stateParameterMap[parameterName] = stateParameter;
326  }
327 
328  return stateParameterMap;
329 }
330 
331 ParameterMappingList XmlReader::readParameterMappingList(rapidxml::xml_node<>* parameterMappingListNode) const
332 {
333  ParameterMappingList parameterMappingList;
334  rapidxml::xml_node<>* curNode;
335 
336  XmlNodeIterator parameterMappingNI(parameterMappingListNode, "ParameterMapping", false);
337 
338  while ((curNode = parameterMappingNI.getNext()))
339  {
340  statechartmodel::ParameterMappingPtr parameterMapping(new statechartmodel::ParameterMapping());
341  parameterMapping->sourceKey = readAttribute(curNode, "from");
342  parameterMapping->destinationKey = readAttribute(curNode, "to");
343 
344  QString mappingSourceString = readAttribute(curNode, "sourceType");
345  parameterMapping->source = PM::StringToMappingSource(mappingSourceString.toStdString());
346 
347  if (parameterMapping->source == eMappingSourcesCount)
348  {
349  throw XmlReaderException("Unknown value for sourceType: \"" + mappingSourceString.toStdString() + "\"");
350  }
351 
352 
353 
354  XmlNodeIterator defaultValueNI(curNode, "DefaultValue", false);
355  rapidxml::xml_node<>* defaultValueCurNode;
356 
357  while ((defaultValueCurNode = defaultValueNI.getNext()))
358  {
359  QString profileName = readAttribute(defaultValueCurNode, "profile", false);
360 
361  if (profileName.size() == 0)
362  {
363  profileName = QString::fromUtf8(StatechartProfiles::GetRootName().c_str());
364  }
365 
366  QString valueJson = readAttribute(defaultValueCurNode, "value", true);
367  parameterMapping->profileValues[profileName] = valueJson;
368  }
369 
370 
371  parameterMappingList.append(parameterMapping);
372  }
373 
374  return parameterMappingList;
375 }
376 
377 void XmlReader::readStartState(rapidxml::xml_node<>* startStateNode) const
378 {
379  loadedState->setStartState(getSubstateByInstanceName(readAttribute(startStateNode, "substateName")));
380 
381  rapidxml::xml_node<>* parameterMappingsNode = XmlNodeIterator(startStateNode, "ParameterMappings", false).getNext();
382 
383  if (parameterMappingsNode)
384  {
385  loadedState->setStartStateInputMapping(readParameterMappingList(parameterMappingsNode));
386  StateCPtr state = loadedState;
387  TransitionCPtr transition = state->getStartTransition();
388  rapidxml::xml_node<>* supportPointsNode = XmlNodeIterator(startStateNode, "SupportPoints", false).getNext();
389  SupportPoints points;
390  if (supportPointsNode)
391  {
392  rapidxml::xml_node<>* supportPointNode;
393  XmlNodeIterator supportPointNI(supportPointsNode, "SupportPoint", false);
394  QPointList supportPoints;
395  while ((supportPointNode = supportPointNI.getNext()))
396  {
397  QPointF supportPoint(readAttribute(supportPointNode, "posX").toFloat(), readAttribute(supportPointNode, "posY").toFloat());
398 
399  supportPoints.append(supportPoint);
400  }
401  points.setControlPoints(supportPoints);
402  loadedState->setTransitionSupportPoints(transition, points);
403  }
404  }
405 }
406 
407 StateInstanceMap XmlReader::readSubstateList(rapidxml::xml_node<>* substateListNode) const
408 {
409  StateInstanceMap stateInstanceMap;
410  rapidxml::xml_node<>* curNode = substateListNode->first_node();
411 
412  while (curNode)
413  {
414  StateInstanceFactoryBasePtr stateInstanceFactory = StateInstanceFactoryBase::fromName(curNode->name(), XmlParentPair(curNode, loadedState));
415 
416  if (!stateInstanceFactory)
417  {
418  throw XmlReaderException("Invalid substate type: \"" + std::string(curNode->name()) + "\"");
419  }
420 
421  StateInstancePtr stateInstance = stateInstanceFactory->getStateInstance();
422 
423  QString stateInstanceName = stateInstance->getInstanceName();
424 
425  if (stateInstanceMap.contains(stateInstanceName))
426  {
427  throw XmlReaderException("Duplicate substate name: " + stateInstanceName.toStdString());
428  }
429 
430  stateInstanceMap[stateInstanceName] = stateInstance;
431 
432  curNode = curNode->next_sibling();
433  }
434 
435  return stateInstanceMap;
436 }
437 
438 TransitionList XmlReader::readTransitionList(rapidxml::xml_node<>* transitionListNode) const
439 {
440  TransitionList transitionList;
441  rapidxml::xml_node<>* curNode;
442 
443  XmlNodeIterator transitionNI(transitionListNode, "Transition", false);
444 
445  while ((curNode = transitionNI.getNext()))
446  {
447  TransitionPtr transition(new Transition());
448 
449  QString sourceStateName = readAttribute(curNode, "from");
450  QString eventName = readAttribute(curNode, "eventName");
451 
452  if (!hasSubstateByInstanceName(sourceStateName))
453  {
454  ARMARX_WARNING_S << "Skipping broken transition in state '" << loadedState->getStateName().toStdString() << "'. SourceState '"
455  << sourceStateName << "' of event '" << eventName << "' could not be found in the list of substates. State UUID=" << loadedState->getUUID()
456  << ".\nStatechart group information or state path are not available at this point. Sorry. Use grep.";
457  continue;
458  }
459 
460  transition->sourceState = getSubstateByInstanceName(sourceStateName);
461  transition->destinationState = getSubstateByInstanceName(readAttribute(curNode, "to", false));
462  transition->eventName = eventName;
463  transition->transitionUserCode = readAttribute(curNode, "transitionCodeEnabled", false) == "1";
464 
465  rapidxml::xml_node<>* parameterMappingsNode = XmlNodeIterator(curNode, "ParameterMappings", false).getNext();
466 
467  if (parameterMappingsNode)
468  {
469  transition->mappingToNextStatesInput = readParameterMappingList(parameterMappingsNode);
470  }
471 
472  parameterMappingsNode = XmlNodeIterator(curNode, "ParameterMappingsToParentsLocal", false).getNext();
473 
474  if (parameterMappingsNode)
475  {
476  transition->mappingToParentStatesLocal = readParameterMappingList(parameterMappingsNode);
477  }
478 
479  parameterMappingsNode = XmlNodeIterator(curNode, "ParameterMappingsToParentsOutput", false).getNext();
480 
481  if (parameterMappingsNode)
482  {
483  transition->mappingToParentStatesOutput = readParameterMappingList(parameterMappingsNode);
484  }
485 
486  rapidxml::xml_node<>* supportPointsNode = XmlNodeIterator(curNode, "SupportPoints", false).getNext();
487 
488  if (supportPointsNode)
489  {
490  rapidxml::xml_node<>* supportPointNode;
491  XmlNodeIterator supportPointNI(supportPointsNode, "SupportPoint", false);
492  QPointList supportPoints;
493  while ((supportPointNode = supportPointNI.getNext()))
494  {
495  QPointF supportPoint(readAttribute(supportPointNode, "posX").toFloat(), readAttribute(supportPointNode, "posY").toFloat());
496 
497  supportPoints.append(supportPoint);
498  }
499  transition->supportPoints.setControlPoints(supportPoints);
500  }
501 
502  transitionList.append(transition);
503  }
504 
505  return transitionList;
506 }
507 
508 bool XmlReader::hasSubstateByInstanceName(const QString& name) const
509 {
510  if (name.isEmpty())
511  {
512  return false;
513  }
514 
515  return loadedState->getSubstates().contains(name);
516 }
517 
518 StateInstancePtr XmlReader::getSubstateByInstanceName(const QString& name) const
519 {
520  if (name.isEmpty())
521  {
522  return StateInstancePtr();
523  }
524 
525  StateInstanceMap substates = loadedState->getSubstates();
526 
527  if (!substates.contains(name))
528  {
529  std::stringstream ss;
530  ss << "Available substates (";
531  ss << substates.size();
532  ss << "): ";
533 
534  for (QString s : substates.keys())
535  {
536  ss << s.toStdString() << "; ";
537  }
538 
539  throw XmlReaderException("Referenced substate \"" + name.toStdString() + "\" not found in State \"" + loadedState->getStateName().toStdString() + "\"! " + ss.str());
540  }
541 
542  return substates[name];
543 }
544 
545 QString XmlReader::readAttribute(rapidxml::xml_node<>* node, const QString& attributeName, bool required) const
546 {
547  rapidxml::xml_attribute<>* attribute = node->first_attribute(attributeName.toUtf8());
548 
549  if (!attribute)
550  {
551  if (required)
552  {
553  throw XmlReaderException("Attribute \"" + attributeName.toStdString() + "\" for \"" + node->name() + "\" node not found!");
554  }
555  else
556  {
557  return "";
558  }
559  }
560 
561  return QString::fromUtf8(attribute->value());
562 }
563 
564 XmlNodeIterator::XmlNodeIterator(rapidxml::xml_node<>* parentNode, const QString& nodeName, bool required) :
565  parentNode(parentNode),
566  currentChildNode(0),
567  nodeName(nodeName),
568  nodeNameUtf8(nodeName.toUtf8()),
569  required(required) {}
570 
572 {
573  if (currentChildNode)
574  {
575  rapidxml::xml_node<>* nextChildNode = currentChildNode->next_sibling(nodeNameUtf8.data());
576 
577  if (!nextChildNode)
578  {
579  return 0;
580  }
581 
582  currentChildNode = nextChildNode;
583  }
584  else
585  {
586  currentChildNode = parentNode->first_node(nodeNameUtf8.data());
587 
588  if (required && !currentChildNode)
589  {
590  throw XmlReaderException("Required node \"" + nodeName.toStdString() + "\" not found!");
591  }
592  }
593 
594  return currentChildNode;
595 }
armarx::exceptions::local::XmlReaderException
Definition: XmlReader.h:103
armarx::QPointList
QList< QPointF > QPointList
Definition: Transition.h:39
ARMARX_IMPORTANT_S
#define ARMARX_IMPORTANT_S
Definition: Logging.h:203
XmlReader.h
rapidxml::parse_error::what
const char * what() const noexcept override
Gets human readable description of error.
Definition: rapidxml.hpp:86
rapidxml::xml_node::next_sibling
xml_node< Ch > * next_sibling(const Ch *name=nullptr, std::size_t name_size=0, bool case_sensitive=true) const
Gets next sibling node, optionally matching node name.
Definition: rapidxml.hpp:1121
JSONObject.h
ArmarXManager.h
armarx::statechartio
Definition: StateInstanceFactory.h:31
armarx::statechartmodel::TransitionPtr
std::shared_ptr< Transition > TransitionPtr
Definition: Transition.h:93
armarx::toFloat
float toFloat(const std::string &input)
Converts a string to float and uses always dot as seperator.
Definition: StringHelpers.cpp:97
armarx::AbstractFactoryMethod< StateInstanceFactoryBase, XmlParentPair >::fromName
static SharedPointerType fromName(const std::string &name, XmlParentPair params)
Function which can be used to retrieve an object specified by string name.
Definition: AbstractFactoryMethod.h:76
armarx::statechartmodel::EventList
QList< EventPtr > EventList
Definition: XmlWriter.h:47
armarx::statechartmodel::State::StateTypeToString
static QString StateTypeToString(eStateType type)
Definition: State.cpp:1188
ParameterMapping.h
rapidxml::xml_node::first_attribute
xml_attribute< Ch > * first_attribute(const Ch *name=nullptr, std::size_t name_size=0, bool case_sensitive=true) const
Gets first attribute of node, optionally matching attribute name.
Definition: rapidxml.hpp:1151
armarx::statechartio::XmlReader::parseXml
void parseXml(const QString &xmlString)
Parses the given XML document and builds a State object (that can be retrieved using getRootState()).
Definition: XmlReader.cpp:42
armarx::statechartmodel::StateInstancePtr
std::shared_ptr< StateInstance > StateInstancePtr
Definition: StateInstance.h:138
rapidxml::xml_attribute
Class representing attribute node of XML document.
Definition: rapidxml.hpp:139
armarx::RemoteGui::toUtf8
std::string toUtf8(QString const &qstring)
Definition: WidgetHandler.cpp:7
IceInternal::Handle< ::Ice::Communicator >
armarx::statechartmodel::StateInstanceMap
QMap< QString, StateInstancePtr > StateInstanceMap
Definition: State.h:50
armarx::ParameterMapping::StringToMappingSource
static MappingSource StringToMappingSource(const std::string &mappingSourceString)
Definition: ParameterMapping.cpp:295
armarx::statechartmodel::Transition
Definition: Transition.h:73
armarx::exceptions::local
Definition: DynamicLibraryException.h:31
rapidxml::parse_validate_closing_tags
const int parse_validate_closing_tags
Parse flag instructing the parser to validate closing tag names.
Definition: rapidxml.hpp:231
armarx::statechartmodel::StateParameterMap
QMap< QString, StateParameterPtr > StateParameterMap
Definition: StateParameter.h:46
armarx::statechartmodel
Definition: XmlWriter.h:36
UnknownTypeException.h
armarx::JSONObjectPtr
IceInternal::Handle< JSONObject > JSONObjectPtr
Definition: JSONObject.h:34
StatechartProfiles.h
armarx::statechartmodel::State
Definition: State.h:52
armarx::statechartmodel::StateParameterPtr
std::shared_ptr< StateParameter > StateParameterPtr
Definition: StateParameter.h:45
rapidxml::xml_node::first_node
xml_node< Ch > * first_node(const Ch *name=nullptr, std::size_t name_size=0, bool case_sensitive=true) const
Gets first child node, optionally matching node name.
Definition: rapidxml.hpp:1027
ARMARX_WARNING_S
#define ARMARX_WARNING_S
Definition: Logging.h:206
rapidxml::xml_document
This class represents root of the DOM hierarchy.
Definition: rapidxml.hpp:140
StateInstanceFactory.h
armarx::statechartio::StateInstanceFactoryBasePtr
std::shared_ptr< StateInstanceFactoryBase > StateInstanceFactoryBasePtr
Definition: StateInstanceFactory.h:48
armarx::statechartmodel::TransitionList
QList< TransitionPtr > TransitionList
Definition: State.h:48
rapidxml::xml_node
Class representing a node of XML document.
Definition: rapidxml.hpp:138
armarx::statechartmodel::DynamicRemoteStateClass
Definition: DynamicRemoteStateClass.h:29
armarx::statechartio::XmlNodeIterator
Iterate over all child nodes with a certain name of a given XML node.
Definition: XmlReader.h:86
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::StatePtr
std::shared_ptr< State > StatePtr
Definition: State.h:46
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
ARMARX_INFO_S
#define ARMARX_INFO_S
Definition: Logging.h:195
armarx::statechartio::XmlParentPair
std::pair< rapidxml::xml_node<> *, armarx::statechartmodel::StatePtr > XmlParentPair
Definition: StateInstanceFactory.h:33
armarx::statechartmodel::Event
Definition: Event.h:30
armarx::statechartmodel::StateCPtr
std::shared_ptr< const State > StateCPtr
Definition: XmlWriter.h:45
rapidxml::xml_document::parse
void parse(Ch *text)
Parses zero-terminated XML string according to given flags.
Definition: rapidxml.hpp:1575
rapidxml::parse_error
Parse error exception.
Definition: rapidxml.hpp:72
armarx::ctrlutil::s
double s(double t, double s0, double v0, double a0, double j)
Definition: CtrlUtil.h:33
armarx::ArmarXManager::RegisterKnownObjectFactoriesWithIce
static void RegisterKnownObjectFactoriesWithIce(const Ice::CommunicatorPtr &ic)
Registers all object factories that are known with Ice.
Definition: ArmarXManager.cpp:1204
armarx::statechartio::XmlNodeIterator::getNext
rapidxml::xml_node * getNext()
Definition: XmlReader.cpp:571
armarx::statechartio::XmlNodeIterator::XmlNodeIterator
XmlNodeIterator(rapidxml::xml_node<> *parentNode, const QString &nodeName, bool required)
Definition: XmlReader.cpp:564