summaryrefslogtreecommitdiffstats
path: root/src/uscxml/messages
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/messages
parent7212d5a3dbbd2845d09df96b2c345132c8a24931 (diff)
downloaduscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.zip
uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.tar.gz
uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.tar.bz2
Some more refactoring and VHDL transformation
Diffstat (limited to 'src/uscxml/messages')
-rw-r--r--src/uscxml/messages/Data.cpp8
-rw-r--r--src/uscxml/messages/Data.h4
-rw-r--r--src/uscxml/messages/Event.cpp6
-rw-r--r--src/uscxml/messages/InvokeRequest.cpp2
-rw-r--r--src/uscxml/messages/SendRequest.cpp2
5 files changed, 11 insertions, 11 deletions
diff --git a/src/uscxml/messages/Data.cpp b/src/uscxml/messages/Data.cpp
index 53d4571..b555ed8 100644
--- a/src/uscxml/messages/Data.cpp
+++ b/src/uscxml/messages/Data.cpp
@@ -83,7 +83,7 @@ Data::Data(const Arabica::DOM::Node<std::string>& dom) {
if (dom.hasAttributes()) {
Arabica::DOM::NamedNodeMap<std::string> attributes = dom.getAttributes();
- for (int i = 0; i < attributes.getLength(); i++) {
+ for (size_t i = 0; i < attributes.getLength(); i++) {
Arabica::DOM::Node<std::string> attribute = attributes.item(i);
// Interpreter::dump(attribute);
@@ -96,7 +96,7 @@ Data::Data(const Arabica::DOM::Node<std::string>& dom) {
if (dom.hasChildNodes()) {
Arabica::DOM::NodeList<std::string> children = dom.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
+ for (size_t i = 0; i < children.getLength(); i++) {
Arabica::DOM::Node<std::string> child = children.item(i);
// Interpreter::dump(child);
std::string key;
@@ -307,7 +307,7 @@ std::ostream& operator<< (std::ostream& os, const Data& data) {
std::string Data::toJSON(const Data& data) {
std::stringstream os;
std::string indent;
- for (int i = 0; i < _dataIndentation; i++) {
+ for (size_t i = 0; i < _dataIndentation; i++) {
indent += " ";
}
if (false) {
@@ -352,7 +352,7 @@ std::string Data::toJSON(const Data& data) {
// empty string is handled below
if (data.type == Data::VERBATIM) {
os << "\"";
- for (int i = 0; i < data.atom.size(); i++) {
+ for (size_t i = 0; i < data.atom.size(); i++) {
// escape string
if (false) {
} else if (data.atom[i] == '"') {
diff --git a/src/uscxml/messages/Data.h b/src/uscxml/messages/Data.h
index f4d220f..c2e7dcf 100644
--- a/src/uscxml/messages/Data.h
+++ b/src/uscxml/messages/Data.h
@@ -116,7 +116,7 @@ public:
array.push_back(Data("", Data::VERBATIM));
}
std::list<Data>::iterator arrayIter = array.begin();
- for (int i = 0; i < index; i++, arrayIter++) {}
+ for (size_t i = 0; i < index; i++, arrayIter++) {}
return *arrayIter;
}
@@ -134,7 +134,7 @@ public:
const Data item(const size_t index) const {
if (array.size() > index) {
std::list<Data>::const_iterator arrayIter = array.begin();
- for (int i = 0; i < index; i++, arrayIter++) {}
+ for (size_t i = 0; i < index; i++, arrayIter++) {}
return *arrayIter;
}
Data data;
diff --git a/src/uscxml/messages/Event.cpp b/src/uscxml/messages/Event.cpp
index 072c1b9..f247542 100644
--- a/src/uscxml/messages/Event.cpp
+++ b/src/uscxml/messages/Event.cpp
@@ -100,12 +100,12 @@ Event Event::fromXML(const std::string& xmlString) {
Arabica::DOM::Element<std::string> payloadElem = (Arabica::DOM::Element<std::string>)payload;
Arabica::DOM::NodeList<std::string> properties = payloadElem.getElementsByTagName("scxml:property");
if (properties.getLength() > 0) {
- for (int i = 0; i < properties.getLength(); i++) {
+ for (size_t i = 0; i < properties.getLength(); i++) {
if (HAS_ATTR_CAST(properties.item(i), "name")) {
std::string key = ATTR_CAST(properties.item(i), "name");
std::string value;
Arabica::DOM::NodeList<std::string> childs = properties.item(i).getChildNodes();
- for (int j = 0; j < childs.getLength(); j++) {
+ for (size_t j = 0; j < childs.getLength(); j++) {
if (childs.item(j).getNodeType() == Arabica::DOM::Node_base::TEXT_NODE) {
value = childs.item(j).getNodeValue();
break;
@@ -123,7 +123,7 @@ Event Event::fromXML(const std::string& xmlString) {
std::ostream& operator<< (std::ostream& os, const Event& event) {
std::string indent;
- for (int i = 0; i < _dataIndentation; i++) {
+ for (size_t i = 0; i < _dataIndentation; i++) {
indent += " ";
}
diff --git a/src/uscxml/messages/InvokeRequest.cpp b/src/uscxml/messages/InvokeRequest.cpp
index 26d40ce..e56a6ff 100644
--- a/src/uscxml/messages/InvokeRequest.cpp
+++ b/src/uscxml/messages/InvokeRequest.cpp
@@ -48,7 +48,7 @@ InvokeRequest InvokeRequest::fromXML(const std::string& xmlString) {
std::ostream& operator<< (std::ostream& os, const InvokeRequest& invokeReq) {
std::string indent;
- for (int i = 0; i < _dataIndentation; i++) {
+ for (size_t i = 0; i < _dataIndentation; i++) {
indent += " ";
}
diff --git a/src/uscxml/messages/SendRequest.cpp b/src/uscxml/messages/SendRequest.cpp
index 497182c..4759d29 100644
--- a/src/uscxml/messages/SendRequest.cpp
+++ b/src/uscxml/messages/SendRequest.cpp
@@ -89,7 +89,7 @@ SendRequest SendRequest::fromXML(const std::string& xmlString) {
std::ostream& operator<< (std::ostream& os, const SendRequest& sendReq) {
std::string indent;
- for (int i = 0; i < _dataIndentation; i++) {
+ for (size_t i = 0; i < _dataIndentation; i++) {
indent += " ";
}