summaryrefslogtreecommitdiffstats
path: root/src/uscxml/debug
diff options
context:
space:
mode:
authorStefan Radomski <sradomski@mintwerk.de>2016-02-24 10:50:32 (GMT)
committerStefan Radomski <sradomski@mintwerk.de>2016-02-24 10:50:32 (GMT)
commitcf19f11b8d2bd6d9566c7528fbed40af06928abf (patch)
treea373b8e934fa78a1bf9db8afca2e9854437e45da /src/uscxml/debug
parent7212d5a3dbbd2845d09df96b2c345132c8a24931 (diff)
downloaduscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.zip
uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.tar.gz
uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.tar.bz2
Some more refactoring and VHDL transformation
Diffstat (limited to 'src/uscxml/debug')
-rw-r--r--src/uscxml/debug/Complexity.cpp10
-rw-r--r--src/uscxml/debug/DebugSession.cpp4
-rw-r--r--src/uscxml/debug/Debugger.cpp2
-rw-r--r--src/uscxml/debug/InterpreterIssue.cpp70
-rw-r--r--src/uscxml/debug/SCXMLDotWriter.cpp18
5 files changed, 52 insertions, 52 deletions
diff --git a/src/uscxml/debug/Complexity.cpp b/src/uscxml/debug/Complexity.cpp
index a7f9f93..232260c 100644
--- a/src/uscxml/debug/Complexity.cpp
+++ b/src/uscxml/debug/Complexity.cpp
@@ -35,7 +35,7 @@ std::list<std::set<Element<std::string> > > Complexity::getAllConfigurations(con
bool isAtomic = true;
NodeList<std::string> children = root.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
+ for (size_t i = 0; i < children.getLength(); i++) {
if (children.item(i).getNodeType() != Node_base::ELEMENT_NODE)
continue;
Element<std::string> childElem(children.item(i));
@@ -148,7 +148,7 @@ Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Eleme
bool hasNestedData = false;
Arabica::DOM::NodeList<std::string> childElems = root.getChildNodes();
- for (int i = 0; i < childElems.getLength(); i++) {
+ for (size_t i = 0; i < childElems.getLength(); i++) {
if (childElems.item(i).getNodeType() != Node_base::ELEMENT_NODE)
continue;
Element<std::string> childElem = Element<std::string>(childElems.item(i));
@@ -161,7 +161,7 @@ Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Eleme
}
if (!hasNestedData && childElem.getLocalName() == "datamodel") {
Arabica::DOM::NodeList<std::string> dataElemChilds = childElem.getChildNodes();
- for (int j = 0; j < dataElemChilds.getLength(); j++) {
+ for (size_t j = 0; j < dataElemChilds.getLength(); j++) {
if (dataElemChilds.item(j).getLocalName() == "data")
hasNestedData = true;
}
@@ -176,7 +176,7 @@ Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Eleme
} else if (InterpreterImpl::isCompound(root) || TAGNAME(root) == "scxml") {
// compounds can be in any of the child state -> add
NodeSet<std::string> childs = InterpreterImpl::getChildStates(root);
- for (int i = 0; i < childs.size(); i++) {
+ for (size_t i = 0; i < childs.size(); i++) {
complexity += calculateStateMachineComplexity(Element<std::string>(childs[i]), reachable);
}
if (hasFlatHistory) {
@@ -189,7 +189,7 @@ Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Eleme
// parallels are in all states -> multiply
NodeSet<std::string> childs = InterpreterImpl::getChildStates(root);
complexity.value = 1;
- for (int i = 0; i < childs.size(); i++) {
+ for (size_t i = 0; i < childs.size(); i++) {
complexity *= calculateStateMachineComplexity(Element<std::string>(childs[i]), reachable);
}
if (hasDeepHistory) {
diff --git a/src/uscxml/debug/DebugSession.cpp b/src/uscxml/debug/DebugSession.cpp
index 4d8fda5..6e81563 100644
--- a/src/uscxml/debug/DebugSession.cpp
+++ b/src/uscxml/debug/DebugSession.cpp
@@ -72,7 +72,7 @@ void DebugSession::breakExecution(Data replyData) {
tthread::lock_guard<tthread::recursive_mutex> lock(_mutex);
Arabica::XPath::NodeSet<std::string> basicConf = _interpreter.getBasicConfiguration();
- for (int i = 0; i < basicConf.size(); i++) {
+ for (size_t i = 0; i < basicConf.size(); i++) {
Arabica::DOM::Element<std::string> element = Arabica::DOM::Element<std::string>(basicConf[i]);
if (element.hasAttribute("id")) {
replyData.compound["basicStates"].array.push_back(Data(element.getAttribute("id"), Data::VERBATIM));
@@ -80,7 +80,7 @@ void DebugSession::breakExecution(Data replyData) {
}
Arabica::XPath::NodeSet<std::string> activeConf = _interpreter.getConfiguration();
- for (int i = 0; i < activeConf.size(); i++) {
+ for (size_t i = 0; i < activeConf.size(); i++) {
Arabica::DOM::Element<std::string> element = Arabica::DOM::Element<std::string>(activeConf[i]);
if (element.hasAttribute("id")) {
replyData.compound["activeStates"].array.push_back(Data(element.getAttribute("id"), Data::VERBATIM));
diff --git a/src/uscxml/debug/Debugger.cpp b/src/uscxml/debug/Debugger.cpp
index 1a7d977..f8b13fe 100644
--- a/src/uscxml/debug/Debugger.cpp
+++ b/src/uscxml/debug/Debugger.cpp
@@ -70,7 +70,7 @@ std::list<Breakpoint> getQualifiedTransBreakpoints(Interpreter interpreter, cons
Arabica::DOM::Element<std::string> source(interpreter.getImpl()->getSourceState(transition));
Arabica::XPath::NodeSet<std::string> targets = interpreter.getImpl()->getTargetStates(transition);
- for (int j = 0; j < targets.size(); j++) {
+ for (size_t j = 0; j < targets.size(); j++) {
Arabica::DOM::Element<std::string> target(targets[j]);
Breakpoint bp = breakpointTemplate; // copy base as template
diff --git a/src/uscxml/debug/InterpreterIssue.cpp b/src/uscxml/debug/InterpreterIssue.cpp
index 1fcfc00..1bb14f6 100644
--- a/src/uscxml/debug/InterpreterIssue.cpp
+++ b/src/uscxml/debug/InterpreterIssue.cpp
@@ -278,7 +278,7 @@ std::list<InterpreterIssue> InterpreterIssue::forInterpreter(InterpreterImpl* in
}
- for (int i = 0; i < allStates.size(); i++) {
+ for (size_t i = 0; i < allStates.size(); i++) {
Element<std::string> state = Element<std::string>(allStates[i]);
if (InterpreterImpl::isMember(state, finals) && !HAS_ATTR(state, "id")) // id is not required for finals
@@ -316,7 +316,7 @@ std::list<InterpreterIssue> InterpreterIssue::forInterpreter(InterpreterImpl* in
issues.push_back(InterpreterIssue("Transition in history pseudo-state '" + stateId + "' has no target", transition, InterpreterIssue::USCXML_ISSUE_FATAL));
} else {
NodeSet<std::string> targetStates = interpreter->getTargetStates(transition);
- for (int j = 0; j < targetStates.size(); j++) {
+ for (size_t j = 0; j < targetStates.size(); j++) {
Element<std::string> target = Element<std::string>(targetStates[j]);
if (HAS_ATTR(state, "type") && ATTR(state, "type") == "deep") {
if (!InterpreterImpl::isDescendant(target, state.getParentNode())) {
@@ -345,7 +345,7 @@ std::list<InterpreterIssue> InterpreterIssue::forInterpreter(InterpreterImpl* in
seenStates[ATTR(state, "id")] = state;
}
- for (int i = 0; i < transitions.size(); i++) {
+ for (size_t i = 0; i < transitions.size(); i++) {
Element<std::string> transition = Element<std::string>(transitions[i]);
// check for valid target
@@ -365,15 +365,15 @@ std::list<InterpreterIssue> InterpreterIssue::forInterpreter(InterpreterImpl* in
}
// check for redundancy of transition
- for (int i = 0; i < allStates.size(); i++) {
+ for (size_t i = 0; i < allStates.size(); i++) {
Element<std::string> state = Element<std::string>(allStates[i]);
NodeSet<std::string> transitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", state, false);
transitions.to_document_order();
- for (int j = 1; j < transitions.size(); j++) {
+ for (size_t j = 1; j < transitions.size(); j++) {
Element<std::string> transition = Element<std::string>(transitions[j]);
- for (int k = 0; k < j; k++) {
+ for (size_t k = 0; k < j; k++) {
Element<std::string> earlierTransition = Element<std::string>(transitions[k]);
// will the earlier transition always be enabled when the later is?
@@ -410,7 +410,7 @@ NEXT_TRANSITION:
// check for useless history elements
{
- for (int i = 0; i < histories.size(); i++) {
+ for (size_t i = 0; i < histories.size(); i++) {
Element<std::string> history = Element<std::string>(histories[i]);
if (!history.getParentNode() || history.getParentNode().getNodeType() != Node_base::ELEMENT_NODE)
continue; // syntax check will have catched this
@@ -433,7 +433,7 @@ NEXT_TRANSITION:
withInitialAttr.push_back(allStates);
withInitialAttr.push_back(_scxml);
- for (int i = 0; i < withInitialAttr.size(); i++) {
+ for (size_t i = 0; i < withInitialAttr.size(); i++) {
Element<std::string> state = Element<std::string>(withInitialAttr[i]);
if (HAS_ATTR(state, "initial")) {
@@ -461,7 +461,7 @@ NEXT_TRANSITION:
// check for legal configuration of target sets
{
std::map<Element<std::string>, std::string > targetIdSets;
- for (int i = 0; i < transitions.size(); i++) {
+ for (size_t i = 0; i < transitions.size(); i++) {
Element<std::string> transition = Element<std::string>(transitions[i]);
if (HAS_ATTR(transition, "target")) {
@@ -469,7 +469,7 @@ NEXT_TRANSITION:
}
}
- for (int i = 0; i < initials.size(); i++) {
+ for (size_t i = 0; i < initials.size(); i++) {
Element<std::string> initial = Element<std::string>(initials[i]);
if (HAS_ATTR(initial, "target")) {
@@ -477,7 +477,7 @@ NEXT_TRANSITION:
}
}
- for (int i = 0; i < allStates.size(); i++) {
+ for (size_t i = 0; i < allStates.size(); i++) {
Element<std::string> state = Element<std::string>(allStates[i]);
if (HAS_ATTR(state, "initial")) {
@@ -508,7 +508,7 @@ NEXT_SET:
NodeSet<std::string> initTrans;
// initTrans.push_back(DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", histories, true));
- for (int i = 0; i < initials.size(); i++) {
+ for (size_t i = 0; i < initials.size(); i++) {
Element<std::string> initial = Element<std::string>(initials[i]);
NodeSet<std::string> initTransitions = DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "transition", initial, true);
if (initTransitions.size() != 1) {
@@ -518,7 +518,7 @@ NEXT_SET:
}
- for (int i = 0; i < initTrans.size(); i++) {
+ for (size_t i = 0; i < initTrans.size(); i++) {
Element<std::string> transition = Element<std::string>(initTrans[i]);
/* In a conformant SCXML document, this transition must not contain 'cond' or 'event' attributes, and must specify a non-null 'target'
@@ -557,7 +557,7 @@ NEXT_SET:
// check that all invokers exists
{
- for (int i = 0; i < invokes.size(); i++) {
+ for (size_t i = 0; i < invokes.size(); i++) {
Element<std::string> invoke = Element<std::string>(invokes[i]);
if (HAS_ATTR(invoke, "type") && !_factory->hasInvoker(ATTR(invoke, "type"))) {
// unknown at factory - adhoc extension?
@@ -580,7 +580,7 @@ NEXT_SET:
// check that all io processors exists
{
- for (int i = 0; i < sends.size(); i++) {
+ for (size_t i = 0; i < sends.size(); i++) {
Element<std::string> send = Element<std::string>(sends[i]);
if (HAS_ATTR(send, "type") && !_factory->hasIOProcessor(ATTR(send, "type"))) {
if (interpreter->_ioProcessors.find(ATTR(send, "type")) != interpreter->_ioProcessors.end())
@@ -600,10 +600,10 @@ NEXT_SET:
allExecContentContainers.push_back(transitions);
allExecContentContainers.push_back(finalizes);
- for (int i = 0; i < allExecContentContainers.size(); i++) {
+ for (size_t i = 0; i < allExecContentContainers.size(); i++) {
Element<std::string> block = Element<std::string>(allExecContentContainers[i]);
NodeSet<std::string> execContents = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, block);
- for (int j = 0; j < execContents.size(); j++) {
+ for (size_t j = 0; j < execContents.size(); j++) {
Element<std::string> execContent = Element<std::string>(execContents[j]);
// SCXML specific executable content, always available
if (InterpreterImpl::isMember(execContent, allExecContents)) {
@@ -619,7 +619,7 @@ NEXT_SET:
// check that all SCXML elements have valid parents and required attributes
{
- for (int i = 0; i < allElements.size(); i++) {
+ for (size_t i = 0; i < allElements.size(); i++) {
Element<std::string> element = Element<std::string>(allElements[i]);
std::string localName = LOCALNAME(element);
@@ -655,7 +655,7 @@ NEXT_SET:
// check attribute constraints
{
- for (int i = 0; i < initials.size(); i++) {
+ for (size_t i = 0; i < initials.size(); i++) {
Element<std::string> initial = Element<std::string>(initials[i]);
if (initial.getParentNode() && initial.getParentNode().getNodeType() == Node_base::ELEMENT_NODE) {
Element<std::string> state(initial.getParentNode());
@@ -667,42 +667,42 @@ NEXT_SET:
}
}
}
- for (int i = 0; i < allStates.size(); i++) {
+ for (size_t i = 0; i < allStates.size(); i++) {
Element<std::string> state = Element<std::string>(allStates[i]);
if (InterpreterImpl::isAtomic(state) && HAS_ATTR(state, "initial")) {
issues.push_back(InterpreterIssue("Atomic state cannot have initial attribute ", state, InterpreterIssue::USCXML_ISSUE_WARNING));
}
}
- for (int i = 0; i < assigns.size(); i++) {
+ for (size_t i = 0; i < assigns.size(); i++) {
Element<std::string> assign = Element<std::string>(assigns[i]);
if (HAS_ATTR(assign, "expr") && assign.getChildNodes().getLength() > 0) {
issues.push_back(InterpreterIssue("Assign element cannot have expr attribute and children", assign, InterpreterIssue::USCXML_ISSUE_WARNING));
}
}
- for (int i = 0; i < contents.size(); i++) {
+ for (size_t i = 0; i < contents.size(); i++) {
Element<std::string> content = Element<std::string>(contents[i]);
if (HAS_ATTR(content, "expr") && content.getChildNodes().getLength() > 0) {
issues.push_back(InterpreterIssue("Content element cannot have expr attribute and children", content, InterpreterIssue::USCXML_ISSUE_WARNING));
}
}
- for (int i = 0; i < params.size(); i++) {
+ for (size_t i = 0; i < params.size(); i++) {
Element<std::string> param = Element<std::string>(params[i]);
if (HAS_ATTR(param, "expr") && HAS_ATTR(param, "location")) {
issues.push_back(InterpreterIssue("Param element cannot have both expr and location attribute", param, InterpreterIssue::USCXML_ISSUE_WARNING));
}
}
- for (int i = 0; i < scripts.size(); i++) {
+ for (size_t i = 0; i < scripts.size(); i++) {
Element<std::string> script = Element<std::string>(scripts[i]);
if (HAS_ATTR(script, "src") && script.getChildNodes().getLength() > 0) {
issues.push_back(InterpreterIssue("Script element cannot have src attribute and children", script, InterpreterIssue::USCXML_ISSUE_WARNING));
}
}
- for (int i = 0; i < sends.size(); i++) {
+ for (size_t i = 0; i < sends.size(); i++) {
Element<std::string> send = Element<std::string>(sends[i]);
if (HAS_ATTR(send, "event") && HAS_ATTR(send, "eventexpr")) {
issues.push_back(InterpreterIssue("Send element cannot have both event and eventexpr attribute", send, InterpreterIssue::USCXML_ISSUE_WARNING));
@@ -735,14 +735,14 @@ NEXT_SET:
}
}
- for (int i = 0; i < cancels.size(); i++) {
+ for (size_t i = 0; i < cancels.size(); i++) {
Element<std::string> cancel = Element<std::string>(cancels[i]);
if (HAS_ATTR(cancel, "sendid") && HAS_ATTR(cancel, "sendidexpr")) {
issues.push_back(InterpreterIssue("Cancel element cannot have both sendid and eventexpr sendidexpr", cancel, InterpreterIssue::USCXML_ISSUE_WARNING));
}
}
- for (int i = 0; i < invokes.size(); i++) {
+ for (size_t i = 0; i < invokes.size(); i++) {
Element<std::string> invoke = Element<std::string>(invokes[i]);
if (HAS_ATTR(invoke, "type") && HAS_ATTR(invoke, "typeexpr")) {
issues.push_back(InterpreterIssue("Invoke element cannot have both type and typeexpr attribute", invoke, InterpreterIssue::USCXML_ISSUE_WARNING));
@@ -761,7 +761,7 @@ NEXT_SET:
}
}
- for (int i = 0; i < doneDatas.size(); i++) {
+ for (size_t i = 0; i < doneDatas.size(); i++) {
Element<std::string> donedata = Element<std::string>(doneDatas[i]);
if (DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "content", donedata, false).size() > 0 &&
DOMUtils::filterChildElements(_nsInfo.xmlNSPrefix + "param", donedata, false).size() > 0) {
@@ -798,7 +798,7 @@ NEXT_SET:
// test all scripts for valid syntax
{
- for (int i = 0; i < scripts.size(); i++) {
+ for (size_t i = 0; i < scripts.size(); i++) {
Element<std::string> script = Element<std::string>(scripts[i]);
if (script.hasChildNodes()) {
@@ -823,7 +823,7 @@ NEXT_SET:
withCondAttrs.push_back(ifs);
withCondAttrs.push_back(elseIfs);
- for (int i = 0; i < withCondAttrs.size(); i++) {
+ for (size_t i = 0; i < withCondAttrs.size(); i++) {
Element<std::string> condAttr = Element<std::string>(withCondAttrs[i]);
if (HAS_ATTR(condAttr, "cond")) {
if (!_dataModel.isValidSyntax(ATTR(condAttr, "cond"))) {
@@ -842,7 +842,7 @@ NEXT_SET:
withExprAttrs.push_back(contents);
withExprAttrs.push_back(params);
- for (int i = 0; i < withExprAttrs.size(); i++) {
+ for (size_t i = 0; i < withExprAttrs.size(); i++) {
Element<std::string> withExprAttr = Element<std::string>(withExprAttrs[i]);
if (HAS_ATTR(withExprAttr, "expr")) {
if (InterpreterImpl::isMember(withExprAttr, datas) || InterpreterImpl::isMember(withExprAttr, assigns)) {
@@ -861,7 +861,7 @@ NEXT_SET:
}
{
- for (int i = 0; i < foreachs.size(); i++) {
+ for (size_t i = 0; i < foreachs.size(); i++) {
Element<std::string> foreach = Element<std::string>(foreachs[i]);
if (HAS_ATTR(foreach, "array")) {
if (!_dataModel.isValidSyntax(ATTR(foreach, "array"))) {
@@ -882,7 +882,7 @@ NEXT_SET:
}
{
- for (int i = 0; i < sends.size(); i++) {
+ for (size_t i = 0; i < sends.size(); i++) {
Element<std::string> send = Element<std::string>(sends[i]);
if (HAS_ATTR(send, "eventexpr")) {
if (!_dataModel.isValidSyntax(ATTR(send, "eventexpr"))) {
@@ -914,7 +914,7 @@ NEXT_SET:
}
{
- for (int i = 0; i < invokes.size(); i++) {
+ for (size_t i = 0; i < invokes.size(); i++) {
Element<std::string> invoke = Element<std::string>(invokes[i]);
if (HAS_ATTR(invoke, "typeexpr")) {
if (!_dataModel.isValidSyntax(ATTR(invoke, "typeexpr"))) {
@@ -938,7 +938,7 @@ NEXT_SET:
}
{
- for (int i = 0; i < cancels.size(); i++) {
+ for (size_t i = 0; i < cancels.size(); i++) {
Element<std::string> cancel = Element<std::string>(cancels[i]);
if (HAS_ATTR(cancel, "sendidexpr")) {
if (!_dataModel.isValidSyntax(ATTR(cancel, "sendidexpr"))) {
diff --git a/src/uscxml/debug/SCXMLDotWriter.cpp b/src/uscxml/debug/SCXMLDotWriter.cpp
index a6ec0b6..56de37a 100644
--- a/src/uscxml/debug/SCXMLDotWriter.cpp
+++ b/src/uscxml/debug/SCXMLDotWriter.cpp
@@ -99,7 +99,7 @@ void SCXMLDotWriter::beforeTakingTransition(Interpreter interpreter,
std::string SCXMLDotWriter::getPrefix() {
std::string prefix = "";
- for (int i = 0; i < _indentation; i++)
+ for (size_t i = 0; i < _indentation; i++)
prefix += " ";
return prefix;
}
@@ -200,7 +200,7 @@ void SCXMLDotWriter::assembleGraph(const Element<std::string>& state, int32_t ch
NodeSet<std::string> childElems = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, state);
- for (int i = 0; i < childElems.size(); i++) {
+ for (size_t i = 0; i < childElems.size(); i++) {
Element<std::string> childElem(childElems[i]);
// remember histories we passed
@@ -213,7 +213,7 @@ void SCXMLDotWriter::assembleGraph(const Element<std::string>& state, int32_t ch
if (iequals(TAGNAME(childElem), "transition")) {
_graph[nodeId].transitions.push_back(childElem);
NodeSet<std::string> targetStates = _interpreter.getImpl()->getTargetStates(childElem);
- for (int j = 0; j < targetStates.size(); j++) {
+ for (size_t j = 0; j < targetStates.size(); j++) {
std::string remoteNodeId = idForNode(targetStates[j]);
_graph[nodeId].targets.insert(std::make_pair(remoteNodeId, childElem));
@@ -348,7 +348,7 @@ void SCXMLDotWriter::writeStateElement(std::ostream& os, const Element<std::stri
break;
case PORT_TRANSITION:
nrOutPorts = dotState.transitions.size();
-// for (int i = 0; i < dotState.transitions.size(); i++) {
+// for (size_t i = 0; i < dotState.transitions.size(); i++) {
// outPorts.push_back(idForNode(dotState.transitions[i]));
// }
break;
@@ -400,7 +400,7 @@ void SCXMLDotWriter::writeStateElement(std::ostream& os, const Element<std::stri
// write history states
NodeSet<std::string> histories = DOMUtils::filterChildElements(_xmlNSPrefix + "history", stateElem);
- for (int i = 0; i < histories.size(); i++) {
+ for (size_t i = 0; i < histories.size(); i++) {
os << " <tr><td port=\"" << portEscape(ATTR_CAST(histories[i], "id")) << "\" balign=\"left\" colspan=\"" << (nrOutPorts == 0 ? 1 : 2) << "\"><b>history: </b>" << ATTR_CAST(histories[i], "id") << "</td></tr>" << std::endl;
}
@@ -422,7 +422,7 @@ void SCXMLDotWriter::writeStateElement(std::ostream& os, const Element<std::stri
// recurse into children and search others to draw
NodeSet<std::string> childElems = DOMUtils::filterChildType(Node_base::ELEMENT_NODE, stateElem);
- for (int i = 0; i < childElems.size(); i++) {
+ for (size_t i = 0; i < childElems.size(); i++) {
Element<std::string> childElem(childElems[i]);
if (InterpreterImpl::isState(Element<std::string>(childElem))) {
writeStateElement(os, childElem);
@@ -598,7 +598,7 @@ std::string SCXMLDotWriter::getDetailedLabel(const Element<std::string>& elem, i
std::list<struct ElemDetails> content;
NodeList<std::string > childElems = elem.getChildNodes();
- for (int i = 0; i < childElems.getLength(); i++) {
+ for (size_t i = 0; i < childElems.getLength(); i++) {
if (childElems.item(i).getNodeType() != Node_base::ELEMENT_NODE)
continue;
Element<std::string> elem = Element<std::string>(childElems.item(i));
@@ -637,7 +637,7 @@ std::string SCXMLDotWriter::getDetailedLabel(const Element<std::string>& elem, i
if (HAS_ATTR(elem, "expr"))
details.name += " = " + ATTR(elem, "expr");
NodeList<std::string > grandChildElems = elem.getChildNodes();
- for (int j = 0; j < grandChildElems.getLength(); j++) {
+ for (size_t j = 0; j < grandChildElems.getLength(); j++) {
if (grandChildElems.item(j).getNodeType() == Node_base::TEXT_NODE) {
details.name += dotEscape(grandChildElems.item(j).getNodeValue());
}
@@ -700,7 +700,7 @@ std::string SCXMLDotWriter::getDetailedLabel(const Element<std::string>& elem, i
if (HAS_ATTR(elem, "src"))
details.name += ATTR(elem, "src");
NodeList<std::string > grandChildElems = childElems.item(i).getChildNodes();
- for (int j = 0; j < grandChildElems.getLength(); j++) {
+ for (size_t j = 0; j < grandChildElems.getLength(); j++) {
if (grandChildElems.item(j).getNodeType() == Node_base::TEXT_NODE) {
details.name += dotEscape(grandChildElems.item(j).getNodeValue());
}