/** * @file * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) * @copyright Simplified BSD * * @cond * This program is free software: you can redistribute it and/or modify * it under the terms of the FreeBSD license as published by the FreeBSD * project. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You should have received a copy of the FreeBSD license along with this * program. If not, see . * @endcond */ #ifndef INTERPRETERRC_H_WLJEI019 #define INTERPRETERRC_H_WLJEI019 #include "uscxml/Interpreter.h" namespace uscxml { class InterpreterRC : public InterpreterImpl { InterpreterState interpret(); void mainEventLoop(); void exitInterpreter(); void microstep(const Arabica::XPath::NodeSet& enabledTransitions); Arabica::XPath::NodeSet selectEventlessTransitions(); Arabica::XPath::NodeSet selectTransitions(const std::string& event); bool isEnabledTransition(const Arabica::DOM::Node& transition, const std::string& event); bool hasIntersection(const Arabica::XPath::NodeSet& nodeSet1, const Arabica::XPath::NodeSet& nodeSet2); void enterStates(const Arabica::XPath::NodeSet& enabledTransitions); void exitStates(const Arabica::XPath::NodeSet& enabledTransitions); Arabica::XPath::NodeSet computeExitSet(const Arabica::XPath::NodeSet& transitions); Arabica::XPath::NodeSet computeExitSet(const Arabica::DOM::Node& transition); void computeEntrySet(const Arabica::XPath::NodeSet& transitions, Arabica::XPath::NodeSet& statesToEnter, Arabica::XPath::NodeSet& statesForDefaultEntry, std::map > defaultHistoryContent); void computeEntrySet(const Arabica::DOM::Node& transition, Arabica::XPath::NodeSet& statesToEnter, Arabica::XPath::NodeSet& statesForDefaultEntry, std::map > defaultHistoryContent); Arabica::XPath::NodeSet removeConflictingTransitions(const Arabica::XPath::NodeSet& enabledTransitions); Arabica::DOM::Node getTransitionDomain(const Arabica::DOM::Node& transition); void addDescendantStatesToEnter(const Arabica::DOM::Node& state, Arabica::XPath::NodeSet& statesToEnter, Arabica::XPath::NodeSet& statesForDefaultEntry, std::map > defaultHistoryContent); void addAncestorStatesToEnter(const Arabica::DOM::Node& state, const Arabica::DOM::Node& ancestor, Arabica::XPath::NodeSet& statesToEnter, Arabica::XPath::NodeSet& statesForDefaultEntry, std::map > defaultHistoryContent); bool isInFinalState(const Arabica::DOM::Node& state); Arabica::DOM::Node findLCCA(const Arabica::XPath::NodeSet& states); Arabica::XPath::NodeSet getProperAncestors(const Arabica::DOM::Node& s1, const Arabica::DOM::Node& s2); Arabica::XPath::NodeSet getTargetStates(const Arabica::DOM::Node& transition); #if 0 bool isDescendant(const Arabica::DOM::Node& state1, const Arabica::DOM::Node& state2); Arabica::XPath::NodeSet getChildStates(const Arabica::DOM::Node& state); #endif bool _running; }; } #endif /* end of include guard: INTERPRETERRC_H_WLJEI019 */