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_view>
6
7namespace openmsx {
8
9class Interpreter;
10class GlobalCliComm;
11
15{
16public:
17 [[nodiscard]] TclObject getCondition() const { return condition; }
18 [[nodiscard]] TclObject getCommand() const { return command; }
19 [[nodiscard]] bool onlyOnce() const { return once; }
20
21 bool checkAndExecute(GlobalCliComm& cliComm, Interpreter& interp);
22
23protected:
24 // Note: we require GlobalCliComm here because breakpoint objects can
25 // be transferred to different MSX machines, and so the MSXCliComm
26 // object won't remain valid.
27 BreakPointBase(TclObject command_, TclObject condition_, bool once_)
28 : command(std::move(command_))
29 , condition(std::move(condition_))
30 , once(once_) {}
31
32private:
33 [[nodiscard]] bool isTrue(GlobalCliComm& cliComm, Interpreter& interp) const;
34
35private:
36 TclObject command;
37 TclObject condition;
38 bool once;
39 bool executing = false;
40};
41
42} // namespace openmsx
43
44#endif
Base class for CPU break and watch points.
TclObject getCommand() const
bool checkAndExecute(GlobalCliComm &cliComm, Interpreter &interp)
TclObject getCondition() const
BreakPointBase(TclObject command_, TclObject condition_, bool once_)
This file implemented 3 utility functions:
Definition Autofire.cc:11
STL namespace.