Breakpoint.h
Go to the documentation of this file.
1 
20 #ifndef BREAKPOINT_H_VR7K7T1X
21 #define BREAKPOINT_H_VR7K7T1X
22 
23 #include <string> // for string
24 #include "uscxml/Common.h" // for USCXML_API
25 #include "uscxml/Interpreter.h"
26 //#include "DOM/Element.hpp" // for Element
27 #include "uscxml/messages/Data.h" // for Data
28 
29 // forward declare
30 namespace XERCESC_NS {
31 class DOMElement;
32 }
33 
34 namespace uscxml {
35 
36 class USCXML_API Breakpoint {
37 public:
38 
39  enum When {
40  UNDEF_WHEN, AFTER, BEFORE, ON
41  };
42 
43  enum Subject {
44  UNDEF_SUBJECT, STATE, TRANSITION, STABLE, MICROSTEP, EVENT, INVOKER, EXECUTABLE
45  };
46 
47  enum Action {
48  UNDEF_ACTION, ENTER, EXIT, INVOKE, UNINVOKE
49  };
50 
51  Breakpoint() {
52  subject = UNDEF_SUBJECT;
53  when = UNDEF_WHEN;
54  action = UNDEF_ACTION;
55  enabled = true;
56  }
57  Breakpoint(const Data& data);
58 
59  // would we match the given breakpoint as well?
60  bool matches(Interpreter interpreter, const Breakpoint& other) const;
61 
62  Data toData() const;
63 
64  bool operator<(const Breakpoint& other) const {
65  return (toData() < other.toData());
66  }
67 
68  operator bool() {
69  return (subject != UNDEF_SUBJECT ||
70  when != UNDEF_WHEN ||
71  action != UNDEF_ACTION);
72  }
73 
74  mutable bool enabled;
75 
76  When when;
77  Subject subject;
78  Action action;
79 
80  const XERCESC_NS::DOMElement* element = NULL;
81 
82  std::string invokeId;
83  std::string invokeType;
84 
85  std::string eventName;
86 
87  std::string executableName;
88  std::string executableXPath;
89 
90  std::string stateId;
91  std::string transSourceId;
92  std::string transTargetId;
93 
94  std::string condition;
95 };
96 
97 }
98 
99 
100 
101 #endif /* end of include guard: BREAKPOINT_H_VR7K7T1X */
Definition: Breakpoint.cpp:26
Central class to interpret and process SCXML documents.
Definition: Interpreter.h:79
Definition: Breakpoint.h:30
Definition: Breakpoint.h:36
Definition: Data.h:44