20 #ifndef INTERPRETERMONITOR_H_D3F21429
21 #define INTERPRETERMONITOR_H_D3F21429
29 #define USCXML_MONITOR_CATCH(callback) \
30 catch (Event e) { LOG(ERROR) << "Syntax error when calling " #callback " on monitors: " << std::endl << e << std::endl; } \
31 catch (std::bad_weak_ptr e) { LOG(ERROR) << "Unclean shutdown " << std::endl; } \
32 catch (...) { LOG(ERROR) << "An exception occurred when calling " #callback " on monitors"; } \
33 if (_state == USCXML_DESTROYED) { throw std::bad_weak_ptr(); }
35 #define USCXML_MONITOR_CALLBACK(callback, function) \
36 if (callback) { callback->function(); }
38 #define USCXML_MONITOR_CALLBACK1(callback, function, arg1) \
39 if (callback) { callback->function(arg1); }
41 #define USCXML_MONITOR_CALLBACK2(callback, function, arg1, arg2) \
42 if (callback) { callback->function(arg1, arg2); }
51 virtual void beforeProcessingEvent(
const Event& event) {}
52 virtual void beforeMicroStep() {}
54 virtual void beforeExitingState(
const XERCESC_NS::DOMElement* state) {}
55 virtual void afterExitingState(
const XERCESC_NS::DOMElement* state) {}
57 virtual void beforeExecutingContent(
const XERCESC_NS::DOMElement* execContent) {}
58 virtual void afterExecutingContent(
const XERCESC_NS::DOMElement* execContent) {}
60 virtual void beforeUninvoking(
const XERCESC_NS::DOMElement* invokeElem,
const std::string& invokeid) {}
61 virtual void afterUninvoking(
const XERCESC_NS::DOMElement* invokeElem,
const std::string& invokeid) {}
63 virtual void beforeTakingTransition(
const XERCESC_NS::DOMElement* transition) {}
64 virtual void afterTakingTransition(
const XERCESC_NS::DOMElement* transition) {}
66 virtual void beforeEnteringState(
const XERCESC_NS::DOMElement* state) {}
67 virtual void afterEnteringState(
const XERCESC_NS::DOMElement* state) {}
69 virtual void beforeInvoking(
const XERCESC_NS::DOMElement* invokeElem,
const std::string& invokeid) {}
70 virtual void afterInvoking(
const XERCESC_NS::DOMElement* invokeElem,
const std::string& invokeid) {}
72 virtual void afterMicroStep() {}
73 virtual void onStableConfiguration() {}
75 virtual void beforeCompletion() {}
76 virtual void afterCompletion() {}
80 void copyToInvokers(
bool copy) {
81 _copyToInvokers = copy;
84 bool copyToInvokers() {
85 return _copyToInvokers;
98 virtual void beforeTakingTransition(
const XERCESC_NS::DOMElement* transition);
99 virtual void beforeExecutingContent(
const XERCESC_NS::DOMElement* element);
100 virtual void onStableConfiguration();
101 virtual void beforeProcessingEvent(
const uscxml::Event& event);
102 virtual void beforeExitingState(
const XERCESC_NS::DOMElement* state);
103 virtual void beforeEnteringState(
const XERCESC_NS::DOMElement* state);
104 virtual void beforeMicroStep();
107 static std::recursive_mutex _mutex;
Definition: InterpreterIssue.cpp:33
Definition: InterpreterMonitor.h:46
Identify and report syntactic and semantic problems with a SCXML state-charts.
Definition: InterpreterIssue.h:43
Identifies some common problems with SCXML documents.
Definition: InterpreterMonitor.h:93