diff options
Diffstat (limited to 'src/uscxml/transform')
-rw-r--r-- | src/uscxml/transform/ChartToFSM.cpp | 21 | ||||
-rw-r--r-- | src/uscxml/transform/ChartToFSM.h | 6 | ||||
-rw-r--r-- | src/uscxml/transform/FSMToPromela.cpp | 2 |
3 files changed, 6 insertions, 23 deletions
diff --git a/src/uscxml/transform/ChartToFSM.cpp b/src/uscxml/transform/ChartToFSM.cpp index fea97d8..cc94434 100644 --- a/src/uscxml/transform/ChartToFSM.cpp +++ b/src/uscxml/transform/ChartToFSM.cpp @@ -182,7 +182,7 @@ InterpreterState FlatteningInterpreter::interpret() { return _state; } -void FlatteningInterpreter::executeContent(const Arabica::DOM::Node<std::string>& content, bool rethrow) { +void FlatteningInterpreter::executeContent(const Arabica::DOM::Element<std::string>& content, bool rethrow) { // std::cout << content << std::endl; GlobalTransition::Action action; @@ -199,19 +199,6 @@ void FlatteningInterpreter::executeContent(const Arabica::DOM::Node<std::string> _currGlobalTransition->actions.push_back(action); } -void FlatteningInterpreter::executeContent(const Arabica::DOM::NodeList<std::string>& content, bool rethrow) { - for (int i = 0; i < content.getLength(); i++) { - executeContent(content.item(i)); - } - assert(false); -} - -void FlatteningInterpreter::executeContent(const Arabica::XPath::NodeSet<std::string>& content, bool rethrow) { - for (int i = 0; i < content.size(); i++) { - executeContent(content[i]); - } -} - void FlatteningInterpreter::invoke(const Arabica::DOM::Node<std::string>& element) { GlobalTransition::Action action; action.invoke = element; @@ -226,10 +213,8 @@ void FlatteningInterpreter::cancelInvoke(const Arabica::DOM::Node<std::string>& _currGlobalTransition->uninvoke.push_back(element); } -void FlatteningInterpreter::internalDoneSend(const Arabica::DOM::Node<std::string>& state) { +void FlatteningInterpreter::internalDoneSend(const Arabica::DOM::Element<std::string>& state) { - if (!isState(state)) - return; Arabica::DOM::Element<std::string> stateElem = (Arabica::DOM::Element<std::string>)state; // if (parentIsScxmlState(state)) @@ -906,7 +891,7 @@ GlobalState::GlobalState(const Arabica::XPath::NodeSet<std::string>& activeState std::ostringstream idSS; idSS << "active-"; for (int i = 0; i < activeStates.size(); i++) { - if (!InterpreterImpl::isFinal(activeStates[i])) + if (!InterpreterImpl::isFinal(Element<std::string>(activeStates[i]))) isFinal = false; idSS << ATTR(activeStates[i], "id") << "-"; } diff --git a/src/uscxml/transform/ChartToFSM.h b/src/uscxml/transform/ChartToFSM.h index 07531e2..dba8d4d 100644 --- a/src/uscxml/transform/ChartToFSM.h +++ b/src/uscxml/transform/ChartToFSM.h @@ -109,9 +109,7 @@ public: protected: // gather executable content per microstep - void executeContent(const Arabica::DOM::Node<std::string>& content, bool rethrow = false); - void executeContent(const Arabica::DOM::NodeList<std::string>& content, bool rethrow = false); - void executeContent(const Arabica::XPath::NodeSet<std::string>& content, bool rethrow = false); + void executeContent(const Arabica::DOM::Element<std::string>& content, bool rethrow = false); // invoke and uninvoke virtual void invoke(const Arabica::DOM::Node<std::string>& element); @@ -119,7 +117,7 @@ protected: // override to do nothing void send(const Arabica::DOM::Node<std::string>& element) {} - void internalDoneSend(const Arabica::DOM::Node<std::string>& state); + void internalDoneSend(const Arabica::DOM::Element<std::string>& state); // InterpreterMonitor virtual void beforeMicroStep(Interpreter interpreter); diff --git a/src/uscxml/transform/FSMToPromela.cpp b/src/uscxml/transform/FSMToPromela.cpp index d72dccb..3607071 100644 --- a/src/uscxml/transform/FSMToPromela.cpp +++ b/src/uscxml/transform/FSMToPromela.cpp @@ -317,7 +317,7 @@ void FSMToPromela::writeExecutableContent(std::ostream& stream, const Arabica::D } stream << padding << "}" << std::endl; - if (isFinal(newState)) { + if (isFinal(Element<std::string>(newState))) { stream << padding << "goto terminate;" << std::endl; } else { stream << padding << "goto nextStep;" << std::endl; |