openMSX
BreakPointBase.hh
Go to the documentation of this file.
1 #ifndef BREAKPOINTBASE_HH
2 #define BREAKPOINTBASE_HH
3 
4 #include "TclObject.hh"
5 #include "string_ref.hh"
6 
7 namespace openmsx {
8 
9 class Interpreter;
10 class GlobalCliComm;
11 
15 {
16 public:
17  string_ref getCondition() const { return condition.getString(); }
18  string_ref getCommand() const { return command .getString(); }
19  TclObject getConditionObj() const { return condition; }
20  TclObject getCommandObj() const { return command; }
21 
22  void checkAndExecute(GlobalCliComm& cliComm, Interpreter& interp);
23 
24 protected:
25  // Note: we require GlobalCliComm here because breakpoint objects can
26  // be transfered to different MSX machines, and so the MSXCliComm
27  // object won't remain valid.
28  BreakPointBase(TclObject command, TclObject condition);
29 
30 private:
31  bool isTrue(GlobalCliComm& cliComm, Interpreter& interp) const;
32 
33  TclObject command;
34  TclObject condition;
35  bool executing;
36 };
37 
38 } // namespace openmsx
39 
40 #endif
TclObject getConditionObj() const
string_ref getString() const
Definition: TclObject.cc:139
string_ref getCondition() const
string_ref getCommand() const
This class implements a subset of the proposal for std::string_ref (proposed for the next c++ standar...
Definition: string_ref.hh:18
TclObject getCommandObj() const
Base class for CPU break and watch points.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
void checkAndExecute(GlobalCliComm &cliComm, Interpreter &interp)
BreakPointBase(TclObject command, TclObject condition)