summaryrefslogtreecommitdiffstats
path: root/src/uscxml/util
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-05-26 10:36:49 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-05-26 10:36:49 (GMT)
commit6e13c7b6e0888323223afd5d2e36e86243df57af (patch)
treef558fd45fa499c8bc95041554ecad6be1bf788c1 /src/uscxml/util
parentf6714b1484b641ea61053350b7d156d2da760b8b (diff)
downloaduscxml-6e13c7b6e0888323223afd5d2e36e86243df57af.zip
uscxml-6e13c7b6e0888323223afd5d2e36e86243df57af.tar.gz
uscxml-6e13c7b6e0888323223afd5d2e36e86243df57af.tar.bz2
Minor polishing for Java bindings and first draft of JEXL datamodel
Diffstat (limited to 'src/uscxml/util')
-rw-r--r--src/uscxml/util/DOM.cpp4
-rw-r--r--src/uscxml/util/DOM.h2
-rw-r--r--src/uscxml/util/URL.cpp4
-rw-r--r--src/uscxml/util/URL.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/uscxml/util/DOM.cpp b/src/uscxml/util/DOM.cpp
index 0e1e9fa..ecf0960 100644
--- a/src/uscxml/util/DOM.cpp
+++ b/src/uscxml/util/DOM.cpp
@@ -194,12 +194,12 @@ bool DOMUtils::isMember(const DOMElement* node,
return false;
}
-const DOMNode* DOMUtils::getNearestAncestor(const DOMNode* node, const std::string tagName) {
+const DOMElement* DOMUtils::getNearestAncestor(const DOMNode* node, const std::string tagName) {
const DOMNode* parent = node->getParentNode();
while(parent) {
if (parent->getNodeType() == DOMNode::ELEMENT_NODE &&
iequals(TAGNAME_CAST(parent), tagName)) {
- return parent;
+ return static_cast<const DOMElement*>(parent);
}
parent = parent->getParentNode();
}
diff --git a/src/uscxml/util/DOM.h b/src/uscxml/util/DOM.h
index 0e8621c..f259ea0 100644
--- a/src/uscxml/util/DOM.h
+++ b/src/uscxml/util/DOM.h
@@ -59,7 +59,7 @@ namespace uscxml {
class USCXML_API DOMUtils {
public:
- static const XERCESC_NS::DOMNode* getNearestAncestor(const XERCESC_NS::DOMNode* node, const std::string tagName);
+ static const XERCESC_NS::DOMElement* getNearestAncestor(const XERCESC_NS::DOMNode* node, const std::string tagName);
static bool isDescendant(const XERCESC_NS::DOMNode* s1, const XERCESC_NS::DOMNode* s2);
diff --git a/src/uscxml/util/URL.cpp b/src/uscxml/util/URL.cpp
index 561b9aa..a76c772 100644
--- a/src/uscxml/util/URL.cpp
+++ b/src/uscxml/util/URL.cpp
@@ -144,9 +144,9 @@ URL URLImpl::resolveWithCWD(URLImpl* relative) {
#if WIN32
std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string(currPath)));
#else
- std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string("file://") + currPath + PATH_SEPERATOR));
+ std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string("file://") + currPath + PATH_SEPERATOR));
#endif
-
+
return resolve(relative, cwdURL.get());
}
diff --git a/src/uscxml/util/URL.h b/src/uscxml/util/URL.h
index dba8e3d..8127892 100644
--- a/src/uscxml/util/URL.h
+++ b/src/uscxml/util/URL.h
@@ -191,7 +191,7 @@ protected:
class USCXML_API URL {
public:
PIMPL_OPERATORS(URL);
-
+
URL(const std::string url) : _impl(new URLImpl(url)) {}
bool isAbsolute() {