diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-30 18:21:11 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-30 18:21:11 (GMT) |
commit | 8544230e7902f2a204877dd9ed4dc8e6115be120 (patch) | |
tree | 2e34430b1dd2136391d442a5dfda6e9a4a148f12 /src/uscxml | |
parent | aa635ecc06213bfb7f4f6c62cbb8e99832d99d48 (diff) | |
download | uscxml-8544230e7902f2a204877dd9ed4dc8e6115be120.zip uscxml-8544230e7902f2a204877dd9ed4dc8e6115be120.tar.gz uscxml-8544230e7902f2a204877dd9ed4dc8e6115be120.tar.bz2 |
Removed conditional SWIG compile and polished PHP API
Diffstat (limited to 'src/uscxml')
-rw-r--r-- | src/uscxml/Interpreter.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h index 1394d59..d88fe10 100644 --- a/src/uscxml/Interpreter.h +++ b/src/uscxml/Interpreter.h @@ -150,6 +150,17 @@ public: tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); return _configuration; } + + Arabica::XPath::NodeSet<std::string> getBasicConfiguration() { + tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); + Arabica::XPath::NodeSet<std::string> basicConfig; + for (int i = 0; i < _configuration.size(); i++) { + if (isAtomic(_configuration[i])) + basicConfig.push_back(_configuration[i]); + } + return basicConfig; + } + void setConfiguration(const std::vector<std::string>& states) { _userDefinedStartConfiguration = states; } @@ -415,21 +426,13 @@ 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; + + Arabica::XPath::NodeSet<std::string> getBasicConfiguration() { + return _impl->getBasicConfiguration(); } -#endif void setConfiguration(const std::vector<std::string>& states) { return _impl->setConfiguration(states); |