summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Interpreter.h
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-12 11:57:08 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-12 11:57:08 (GMT)
commitba050afaaad699e60ca657b311d5c34d038bb89c (patch)
treed4c79e30631c63e8557c6ec893a70dda46aa6cd5 /src/uscxml/Interpreter.h
parent45ab2909e17f7e0348ccfe4179f23a897a2fd305 (diff)
downloaduscxml-ba050afaaad699e60ca657b311d5c34d038bb89c.zip
uscxml-ba050afaaad699e60ca657b311d5c34d038bb89c.tar.gz
uscxml-ba050afaaad699e60ca657b311d5c34d038bb89c.tar.bz2
Refactoring for other datamodels
Diffstat (limited to 'src/uscxml/Interpreter.h')
-rw-r--r--src/uscxml/Interpreter.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h
index 673cba1..5207930 100644
--- a/src/uscxml/Interpreter.h
+++ b/src/uscxml/Interpreter.h
@@ -202,6 +202,7 @@ public:
static bool isDescendant(const Arabica::DOM::Node<std::string>& s1, const Arabica::DOM::Node<std::string>& s2);
static std::vector<std::string> tokenizeIdRefs(const std::string& idRefs);
+ static std::string spaceNormalize(const std::string& text);
bool isInitial(const Arabica::DOM::Node<std::string>& state);
Arabica::XPath::NodeSet<std::string> getInitialStates(Arabica::DOM::Node<std::string> state = Arabica::DOM::Node<std::string>());
@@ -270,8 +271,12 @@ protected:
void processContentElement(const Arabica::DOM::Node<std::string>& element,
Arabica::DOM::Document<std::string>& dom,
std::string& text,
- Data& data);
- void processParamChilds(const Arabica::DOM::Node<std::string>& element, std::multimap<std::string, std::string>& params);
+ std::string& expr);
+ void processParamChilds(const Arabica::DOM::Node<std::string>& element,
+ std::multimap<std::string, std::string>& params);
+ void processDOMorText(const Arabica::DOM::Node<std::string>& node,
+ Arabica::DOM::Document<std::string>& dom,
+ std::string& text);
void send(const Arabica::DOM::Node<std::string>& element);
void invoke(const Arabica::DOM::Node<std::string>& element);
@@ -414,9 +419,22 @@ public:
return _impl->getCurrentEvent();
}
+#ifndef SWIG
Arabica::XPath::NodeSet<std::string> getConfiguration() {
return _impl->getConfiguration();
}
+#else
+ // simplified access to state names for language bindings
+ std::vector<std::string> getConfiguration() {
+ std::vector<std::string> stateNames;
+ Arabica::XPath::NodeSet<std::string> nodeSet = _impl->getConfiguration();
+ for (int i = 0; i < nodeSet.size(); i++) {
+ stateNames.push_back(ATTR(nodeSet[i], "id"));
+ }
+ return stateNames;
+ }
+#endif
+
void setConfiguration(const std::vector<std::string>& states) {
return _impl->setConfiguration(states);
}
@@ -507,6 +525,9 @@ public:
static std::vector<std::string> tokenizeIdRefs(const std::string& idRefs) {
return InterpreterImpl::tokenizeIdRefs(idRefs);
}
+ static std::string spaceNormalize(const std::string& text) {
+ return InterpreterImpl::spaceNormalize(text);
+ }
bool isInitial(const Arabica::DOM::Node<std::string>& state) {
return _impl->isInitial(state);