로딩중...
검색중...
일치하는것 없음
watcher.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
6
7namespace by {
8
20 class _nout watcher: public chunk {
21 BY_ME(watcher, chunk)
22 BY_INIT_META(me)
23
24 public:
25 // watcher:
26 watcher();
27
28 public:
29 life& operator[](nidx n);
30 const life& operator[](nidx n) const BY_CONST_FUNC(operator[](n));
31 life& operator[](id id);
32 const life& operator[](id id) const BY_CONST_FUNC(operator[](id));
33
34 public:
35 life* get(nidx n);
36 life* get(id newId);
37 const life* get(nidx n) const BY_CONST_FUNC(get(n))
38 const life* get(id newId) const BY_CONST_FUNC(get(newId))
39 // Allocator:
45 void* new1() override;
46
52 nbool del(void* used, ncnt sz) override;
53
54 protected:
55 // watcher:
61 id _genId(void* pt) const;
62
68 nidx _getIdx(void* it) const;
69 };
70} // namespace by
Memory chunk for block-based allocation
Definition chunk.hpp:57
Binding tag for instance reference tracking and lifecycle management
Definition life.hpp:21
Memory watcher for tracking instance lifecycle and allocation
Definition watcher.hpp:20
nbool del(void *used, ncnt sz) override
Returns life object back to available pool
id _genId(void *pt) const
Generates unique id for instance pointer
const life * get(nidx n) const BY_CONST_FUNC(get(n)) const life *get(id new Id) const BY_CONST_FUNC(get(newId)) void *new 1() override
Allocates new life object from pre-allocated chunk
nidx _getIdx(void *it) const
Calculates index in chunk from pointer address
Rich logging support with polymorphic type conversion
Definition richLog.hpp:34