summaryrefslogtreecommitdiffstats
path: root/src/uscxml/transform/ChartToFSM.h
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-11 14:12:28 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-11 14:12:28 (GMT)
commitc30b602cdb5ede809b960e35fc7e702b7f1f76e2 (patch)
treea7935d13b35abde551d7b06836b4bc617fc5274e /src/uscxml/transform/ChartToFSM.h
parentb95a9c2d23c4bfba84dfac8683c47153d598e09f (diff)
downloaduscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.zip
uscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.tar.gz
uscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.tar.bz2
Reformatted w3c tests with xmllint
Diffstat (limited to 'src/uscxml/transform/ChartToFSM.h')
-rw-r--r--src/uscxml/transform/ChartToFSM.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/uscxml/transform/ChartToFSM.h b/src/uscxml/transform/ChartToFSM.h
index 64b3640..923304c 100644
--- a/src/uscxml/transform/ChartToFSM.h
+++ b/src/uscxml/transform/ChartToFSM.h
@@ -31,7 +31,8 @@
namespace uscxml {
class GlobalState;
class GlobalTransition;
-
+class FlatteningInterpreter;
+
class USCXML_API GlobalState {
public:
@@ -69,7 +70,7 @@ public:
Arabica::DOM::Element<std::string> uninvoke;
};
- GlobalTransition(const Arabica::XPath::NodeSet<std::string>& transitions, DataModel dataModel);
+ GlobalTransition(const Arabica::XPath::NodeSet<std::string>& transitions, DataModel dataModel, FlatteningInterpreter* flattener);
bool isValid; // constructor will determine, calling code will delete if not
bool isEventless; // whether or not all our transitions are eventless
@@ -100,6 +101,10 @@ public:
std::string destination;
std::string index;
+ FlatteningInterpreter* interpreter;
+
+ bool operator< (const GlobalTransition& other) const;
+
protected:
std::list<std::string> getCommonEvents(const Arabica::XPath::NodeSet<std::string>& transitions);
};
@@ -112,6 +117,8 @@ public:
Arabica::DOM::Document<std::string> getDocument() const; // overwrite to return flat FSM
InterpreterState interpret();
+ std::list<Arabica::DOM::Element<std::string> > indexedTransitions;
+
protected:
// gather executable content per microstep
void executeContent(const Arabica::DOM::Element<std::string>& content, bool rethrow = false);
@@ -136,7 +143,10 @@ protected:
void weightTransitions();
void createDocument();
- Arabica::DOM::Node<std::string> globalStateToNode(GlobalState* globalState);
+ void indexTransitions(const Arabica::DOM::Element<std::string>& root);
+ std::list<GlobalTransition*> sortTransitions(std::list<GlobalTransition*> list);
+
+ void appendGlobalStateNode(GlobalState* globalState);
Arabica::DOM::Node<std::string> globalTransitionToNode(GlobalTransition* globalTransition);
GlobalState* _start;
@@ -149,6 +159,8 @@ protected:
int maxDepth;
int maxOrder;
+ size_t _lastTransientStateId;
+
Arabica::DOM::Document<std::string> _flatDoc;
std::map<std::string, GlobalState*> _globalConf;
};