diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-12 15:10:36 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-12 15:10:36 (GMT) |
commit | 72fb2cd0bd89eb40d4a96f86d464d9801ad91f59 (patch) | |
tree | ea6ec14f4da720b2ec80d9b1c10904f13ee43d32 /src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp | |
parent | ba050afaaad699e60ca657b311d5c34d038bb89c (diff) | |
download | uscxml-72fb2cd0bd89eb40d4a96f86d464d9801ad91f59.zip uscxml-72fb2cd0bd89eb40d4a96f86d464d9801ad91f59.tar.gz uscxml-72fb2cd0bd89eb40d4a96f86d464d9801ad91f59.tar.bz2 |
Got prolog datamodel to compile again
Diffstat (limited to 'src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp')
-rw-r--r-- | src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp index f3af4b6..fcd606d 100644 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp +++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp @@ -134,38 +134,25 @@ std::string SWIDataModel::evalAsString(const std::string& expr) { return std::string(compound); } -void SWIDataModel::assign(const std::string& location, +void SWIDataModel::assign(const Arabica::DOM::Element<std::string>& assignElem, const Arabica::DOM::Document<std::string>& doc, - const Arabica::DOM::Element<std::string>& assignElem) { - + const std::string& content) { + std::string expr = content; + if (HAS_ATTR(assignElem, "expr")) { + expr = ATTR(assignElem, "expr"); + } + if (expr.length() > 0) + eval(expr); } -void SWIDataModel::assign(const std::string& location, - const std::string& expr, - const Arabica::DOM::Element<std::string>& assignElem) { - eval(expr); -} -void SWIDataModel::assign(const std::string& location, - const Data& data, - const Arabica::DOM::Element<std::string>& assignElem) { +void SWIDataModel::assign(const std::string& location, const Data& data) { eval(data.atom); } -void SWIDataModel::init(const std::string& location, +void SWIDataModel::init(const Arabica::DOM::Element<std::string>& dataElem, const Arabica::DOM::Document<std::string>& doc, - const Arabica::DOM::Element<std::string>& dataElem) { - -} -void SWIDataModel::init(const std::string& location, - const std::string& expr, - const Arabica::DOM::Element<std::string>& dataElem) { - -} -void SWIDataModel::init(const std::string& location, - const Data& data, - const Arabica::DOM::Element<std::string>& dataElem) { - -} + const std::string& content) {} +void SWIDataModel::init(const std::string& location, const Data& data) {} bool SWIDataModel::isDeclared(const std::string& expr) { return true; |