openMSX
ProbeBreakPoint.hh
Go to the documentation of this file.
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
13  , private Observer<ProbeBase>
14 {
15 public:
16  ProbeBreakPoint(TclObject command,
17  TclObject condition,
18  Debugger& debugger,
19  ProbeBase& probe,
20  bool once,
21  unsigned newId = -1);
23 
24  [[nodiscard]] unsigned getId() const { return id; }
25  [[nodiscard]] const ProbeBase& getProbe() const { return probe; }
26 
27 private:
28  // Observer<ProbeBase>
29  void update(const ProbeBase& subject) override;
30  void subjectDeleted(const ProbeBase& subject) override;
31 
32 private:
33  Debugger& debugger;
34  ProbeBase& probe;
35  const unsigned id;
36 
37  static inline unsigned lastId = 0;
38 };
39 
40 } // namespace openmsx
41 
42 #endif
openmsx::ProbeBreakPoint::getProbe
const ProbeBase & getProbe() const
Definition: ProbeBreakPoint.hh:25
openmsx::Debugger
Definition: Debugger.hh:23
openmsx::ProbeBreakPoint
Definition: ProbeBreakPoint.hh:14
Observer.hh
openmsx::ProbeBreakPoint::~ProbeBreakPoint
~ProbeBreakPoint()
Definition: ProbeBreakPoint.cc:25
openmsx::ProbeBreakPoint::getId
unsigned getId() const
Definition: ProbeBreakPoint.hh:24
openmsx::ProbeBreakPoint::ProbeBreakPoint
ProbeBreakPoint(TclObject command, TclObject condition, Debugger &debugger, ProbeBase &probe, bool once, unsigned newId=-1)
Definition: ProbeBreakPoint.cc:10
BreakPointBase.hh
openmsx::ProbeBase
Definition: Probe.hh:13
openmsx::BreakPointBase
Base class for CPU break and watch points.
Definition: BreakPointBase.hh:15
openmsx::TclObject
Definition: TclObject.hh:22
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::Observer
Generic Gang-of-Four Observer class, templatized edition.
Definition: Observer.hh:10