diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-05-12 13:12:33 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-05-12 13:12:33 (GMT) |
commit | b62e7979600feee23dc7cdb61042a8fc7673122b (patch) | |
tree | f7351372f37979dd2d048e0b68a16a4cd3b2aadb /src/uscxml/util/Predicates.h | |
parent | 1b11b310be61e51b3ac5ebb83f7c8a33aef3d6e8 (diff) | |
download | uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.zip uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.tar.gz uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.tar.bz2 |
Major Refactoring v2.0
Diffstat (limited to 'src/uscxml/util/Predicates.h')
-rw-r--r-- | src/uscxml/util/Predicates.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/uscxml/util/Predicates.h b/src/uscxml/util/Predicates.h new file mode 100644 index 0000000..50c69b6 --- /dev/null +++ b/src/uscxml/util/Predicates.h @@ -0,0 +1,61 @@ +/** + * @file + * @author 2016 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 <http://www.opensource.org/licenses/bsd-license>. + * @endcond + */ + +#ifndef PREDICATES_H_D3A20484 +#define PREDICATES_H_D3A20484 + +#include <string> +#include <list> +#include <xercesc/dom/DOM.hpp> +#include "uscxml/util/DOM.h" +#include "uscxml/util/Convenience.h" + +namespace uscxml { + +std::list<xercesc::DOMElement*> getChildStates(const xercesc::DOMElement* state, bool properOnly = true); +std::list<xercesc::DOMElement*> getChildStates(const std::list<xercesc::DOMElement*>& states, bool properOnly = true); +xercesc::DOMElement* getParentState(const xercesc::DOMElement* element); +xercesc::DOMElement* getSourceState(const xercesc::DOMElement* transition); +xercesc::DOMElement* findLCCA(const std::list<xercesc::DOMElement*>& states); +std::list<xercesc::DOMElement*> getProperAncestors(const xercesc::DOMElement* s1, const xercesc::DOMElement* s2); + +std::list<xercesc::DOMElement*> getTargetStates(const xercesc::DOMElement* transition, const xercesc::DOMElement* root); +std::list<xercesc::DOMElement*> getEffectiveTargetStates(const xercesc::DOMElement* transition); +xercesc::DOMElement* getTransitionDomain(const xercesc::DOMElement* transition, const xercesc::DOMElement* root); + +bool isInEmbeddedDocument(const xercesc::DOMNode* node); + +std::list<xercesc::DOMElement*> getStates(const std::list<std::string>& stateIds, const xercesc::DOMElement* root); +xercesc::DOMElement* getState(const std::string& stateId, const xercesc::DOMElement* root); +std::list<xercesc::DOMElement*> getInitialStates(const xercesc::DOMElement* state, const xercesc::DOMElement* root); +std::list<xercesc::DOMElement*> getReachableStates(const xercesc::DOMElement* root); +std::list<xercesc::DOMElement*> getExitSet(const xercesc::DOMElement* transition, const xercesc::DOMElement* root); +bool conflicts(const xercesc::DOMElement* transition1, const xercesc::DOMElement* transition2, const xercesc::DOMElement* root); + +bool isState(const xercesc::DOMElement* state, bool properOnly = true); +bool isCompound(const xercesc::DOMElement* state); +bool isAtomic(const xercesc::DOMElement* state); +bool isParallel(const xercesc::DOMElement* state); +bool isFinal(const xercesc::DOMElement* state); +bool isHistory(const xercesc::DOMElement* state); + + +} + +#endif /* end of include guard: PREDICATES_H_D3A20484 */ |