summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Interpreter.h
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-05-14 12:07:05 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-05-14 12:07:05 (GMT)
commitcc580e3c27c45f56193e3add35a8cc00dcd19b31 (patch)
tree19d4457365ff7c3a9bc0b161d528fee993fffef4 /src/uscxml/Interpreter.h
parente437da537c85d82e26665837ee7e66a35080eb1e (diff)
downloaduscxml-cc580e3c27c45f56193e3add35a8cc00dcd19b31.zip
uscxml-cc580e3c27c45f56193e3add35a8cc00dcd19b31.tar.gz
uscxml-cc580e3c27c45f56193e3add35a8cc00dcd19b31.tar.bz2
Fixed some bugs with java bindings
Diffstat (limited to 'src/uscxml/Interpreter.h')
-rw-r--r--src/uscxml/Interpreter.h39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h
index a18bc28..6a11c46 100644
--- a/src/uscxml/Interpreter.h
+++ b/src/uscxml/Interpreter.h
@@ -98,6 +98,18 @@ enum Capabilities {
class USCXML_API InterpreterOptions {
public:
+ InterpreterOptions() :
+ withDebugger(false),
+ verbose(false),
+ withHTTP(true),
+ withHTTPS(true),
+ withWS(true),
+ logLevel(0),
+ httpPort(0),
+ httpsPort(0),
+ wsPort(0)
+ {}
+
bool withDebugger;
bool verbose;
bool withHTTP;
@@ -124,31 +136,19 @@ public:
static InterpreterOptions fromCmdLine(int argc, char** argv);
unsigned int getCapabilities();
-protected:
- InterpreterOptions() :
- withDebugger(false),
- verbose(false),
- withHTTP(true),
- withHTTPS(true),
- withWS(true),
- logLevel(0),
- httpPort(0),
- httpsPort(0),
- wsPort(0)
- {}
};
class NameSpaceInfo {
public:
- NameSpaceInfo() {
+ NameSpaceInfo() : nsContext(NULL) {
init(std::map<std::string, std::string>());
}
- NameSpaceInfo(const std::map<std::string, std::string>& nsInfo) {
+ NameSpaceInfo(const std::map<std::string, std::string>& nsInfo) : nsContext(NULL) {
init(nsInfo);
}
- NameSpaceInfo(const NameSpaceInfo& other) {
+ NameSpaceInfo(const NameSpaceInfo& other) : nsContext(NULL) {
init(other.nsInfo);
}
@@ -172,14 +172,19 @@ public:
attribute.setPrefix(nsToPrefix[nsURL]);
}
+ const Arabica::XPath::StandardNamespaceContext<std::string>* getNSContext() {
+ return nsContext;
+ }
+
std::string nsURL; // ough to be "http://www.w3.org/2005/07/scxml" but maybe empty
std::string xpathPrefix; // prefix mapped for xpath, "scxml" is _xmlNSPrefix is empty but _nsURL set
std::string xmlNSPrefix; // the actual prefix for elements in the xml file
- Arabica::XPath::StandardNamespaceContext<std::string>* nsContext;
std::map<std::string, std::string> nsToPrefix; // prefixes for a given namespace
std::map<std::string, std::string> nsInfo; // all xmlns mappings
private:
+ Arabica::XPath::StandardNamespaceContext<std::string>* nsContext;
+
void init(const std::map<std::string, std::string>& nsInfo);
};
@@ -267,7 +272,7 @@ public:
void setNameSpaceInfo(const NameSpaceInfo& nsInfo) {
_nsInfo = nsInfo;
- _xpath.setNamespaceContext(*_nsInfo.nsContext);
+ _xpath.setNamespaceContext(*_nsInfo.getNSContext());
}
NameSpaceInfo getNameSpaceInfo() const {
return _nsInfo;