watcher.hpp
Go to the documentation of this file.
1
2#pragma once
3
6
7namespace by {
8
13 class _nout watcher: public chunk {
14 BY_ME(watcher, chunk)
15 BY_INIT_META(me)
16 friend class instancer;
17 friend class bindTag;
18
19 public:
20 // watcher:
21 watcher();
22
23 public:
24 watchCell& operator[](nidx n);
25 const watchCell& operator[](nidx n) const BY_CONST_FUNC(operator[](n));
26 watchCell& operator[](id id);
27 const watchCell& operator[](id id) const BY_CONST_FUNC(operator[](id));
28
29 public:
30 watchCell* get(nidx n);
31 watchCell* get(id newId);
32 const watchCell* get(nidx n) const BY_CONST_FUNC(get(n))
33 const watchCell* get(id newId) const BY_CONST_FUNC(get(newId))
34 // Allocator:
35 void* new1() override;
36
37 nbool del(void* used, ncnt sz) override;
38
39 protected:
40 // watcher:
41 id _genId(void* pt) const;
42 nidx _getIdx(void* it) const;
43 };
44} // namespace by
Binding tag for instance reference tracking and lifecycle management.
Definition: bindTag.hpp:15
Memory chunk for block-based allocation.
Definition: chunk.hpp:12
Singleton manager for instance lifecycle and memory allocation.
Definition: instancer.hpp:13
Memory watcher for tracking instance lifecycle and allocation.
Definition: watcher.hpp:13
Memory watch cell for tracking instance states.
Definition: watchCell.hpp:20