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) noexcept 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
Base class for CPU break and watch points.
Generic Gang-of-Four Observer class, templatized edition.
Definition: Observer.hh:10
ProbeBreakPoint(TclObject command, TclObject condition, Debugger &debugger, ProbeBase &probe, bool once, unsigned newId=-1)
const ProbeBase & getProbe() const
This file implemented 3 utility functions:
Definition: Autofire.cc:9