20 #ifndef FASTMICROSTEP_H_065FE1F7
21 #define FASTMICROSTEP_H_065FE1F7
25 #include "uscxml/config.h"
34 #include <boost/dynamic_bitset.hpp>
39 #define BITSET_BLOCKTYPE size_t
41 #define BITSET_BLOCKTYPE
56 virtual InterpreterState
step(
size_t blockMs);
58 virtual bool isInState(
const std::string& stateId);
59 virtual std::list<XERCESC_NS::DOMElement*> getConfiguration();
60 void markAsCancelled();
62 virtual void deserialize(
const Data& encodedState);
63 virtual Data serialize();
68 Transition() : element(NULL), source(0), onTrans(NULL), type(0) {}
70 XERCESC_NS::DOMElement* element;
71 boost::dynamic_bitset<BITSET_BLOCKTYPE> conflicts;
72 boost::dynamic_bitset<BITSET_BLOCKTYPE> exitSet;
75 boost::dynamic_bitset<BITSET_BLOCKTYPE> target;
77 XERCESC_NS::DOMElement* onTrans;
88 State() : element(NULL), parent(0), documentOrder(0), doneData(NULL), type(0) {}
90 XERCESC_NS::DOMElement* element;
91 boost::dynamic_bitset<BITSET_BLOCKTYPE> completion;
92 boost::dynamic_bitset<BITSET_BLOCKTYPE> children;
93 boost::dynamic_bitset<BITSET_BLOCKTYPE> ancestors;
95 uint32_t documentOrder;
97 std::list<XERCESC_NS::DOMElement*> data;
98 std::list<XERCESC_NS::DOMElement*> invoke;
99 std::list<XERCESC_NS::DOMElement*> onEntry;
100 std::list<XERCESC_NS::DOMElement*> onExit;
101 XERCESC_NS::DOMElement* doneData;
108 std::map<const XERCESC_NS::DOMElement*, std::list<XERCESC_NS::DOMElement*> > exitSet;
111 virtual void init(XERCESC_NS::DOMElement* scxml);
113 std::list<XERCESC_NS::DOMElement*> getCompletion(
const XERCESC_NS::DOMElement* state);
115 unsigned char _flags;
116 std::map<std::string, int> _stateIds;
118 std::vector<State*> _states;
119 std::vector<Transition*> _transitions;
120 std::list<XERCESC_NS::DOMElement*> _globalScripts;
122 boost::dynamic_bitset<BITSET_BLOCKTYPE> _configuration;
123 boost::dynamic_bitset<BITSET_BLOCKTYPE> _invocations;
124 boost::dynamic_bitset<BITSET_BLOCKTYPE> _history;
125 boost::dynamic_bitset<BITSET_BLOCKTYPE> _initializedData;
127 std::set<boost::dynamic_bitset<BITSET_BLOCKTYPE> > _microstepConfigurations;
130 XERCESC_NS::DOMElement* _scxml;
139 std::list<XERCESC_NS::DOMElement*> getHistoryCompletion(
const XERCESC_NS::DOMElement* state);
140 void resortStates(XERCESC_NS::DOMElement* node,
const X& xmlPrefix);
142 bool conflictsCached(
const XERCESC_NS::DOMElement* t1,
const XERCESC_NS::DOMElement* t2,
const XERCESC_NS::DOMElement* root);
144 std::string toBase64(
const boost::dynamic_bitset<BITSET_BLOCKTYPE>& bitset);
145 boost::dynamic_bitset<BITSET_BLOCKTYPE> fromBase64(
const std::string& encoded);
147 std::list<XERCESC_NS::DOMElement*> getExitSetCached(
const XERCESC_NS::DOMElement* transition,
148 const XERCESC_NS::DOMElement* root);
152 #ifdef USCXML_VERBOSE
153 void printStateNames(
const boost::dynamic_bitset<BITSET_BLOCKTYPE>& bitset);
Definition: FastMicroStep.h:50
Definition: MicroStepImpl.h:73
Definition: Breakpoint.cpp:26
Definition: MicroStepImpl.h:40
virtual void reset()
Reset state machine.
Definition: FastMicroStep.cpp:1146
virtual InterpreterState step(size_t blockMs)
Definition: FastMicroStep.cpp:629
Definition: FastMicroStep.h:66
virtual void init(XERCESC_NS::DOMElement *scxml)
Definition: FastMicroStep.cpp:230
Definition: FastMicroStep.h:86
Definition: FastMicroStep.h:106