| 1 |
#ifndef PROBEBREAKPOINT_HH |
| 2 |
#define PROBEBREAKPOINT_HH |
| 3 |
|
| 4 |
#include "BreakPointBase.hh" |
| 5 |
#include "Observer.hh" |
| 6 |
|
| 7 |
namespace openmsx { |
| 8 |
|
| 9 |
class Debugger; |
| 10 |
class ProbeBase; |
| 11 |
|
| 12 |
class ProbeBreakPoint final : public BreakPointBase<ProbeBreakPoint> |
| 13 |
, private Observer<ProbeBase> |
| 14 |
{ |
| 15 |
public: |
| 16 |
static constexpr std::string_view prefix = "pp#"; |
| 17 |
|
| 18 |
public: |
| 19 |
ProbeBreakPoint(TclObject command, |
| 20 |
TclObject condition, |
| 21 |
Debugger& debugger, |
| 22 |
ProbeBase& probe, |
| 23 |
bool once, |
| 24 |
unsigned newId = -1); |
| 25 |
~ProbeBreakPoint(); |
| 26 |
|
| 27 |
[[nodiscard]] const ProbeBase& getProbe() const { return probe; } |
| 28 |
|
| 29 |
private: |
| 30 |
|
| 31 |
void update(const ProbeBase& subject) noexcept override; |
| 32 |
void subjectDeleted(const ProbeBase& subject) override; |
| 33 |
|
| 34 |
private: |
| 35 |
Debugger& debugger; |
| 36 |
ProbeBase& probe; |
| 37 |
}; |
| 38 |
|
| 39 |
} |
| 40 |
|
| 41 |
#endif |