로딩중...
검색중...
일치하는것 없음
instance.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
4#include <map>
5
8
9struct byeolTest;
10
11namespace by {
12
13 class life;
14 class instancer;
15
41 class _nout instance: public typeProvidable, public clonable {
42 BY_ME(instance)
43 BY_INIT_META(me)
44 friend class memliteInternal;
45
46 public:
47 class vault {
48 public:
49 void set(void* ptr, nidx chkN);
50 nidx get(void* ptr);
51 ncnt len() const;
52 nbool rel();
53 std::map<void*, int>& getVaults();
54
55 private:
56 std::map<void*, int> _vaults;
57 };
58
59 // instance:
60 instance();
61 explicit instance(id newId);
62 instance(const me& rhs);
63 virtual ~instance();
64
65 public:
66 me& operator=(const me& rhs) = default;
67 void* operator new(size_t sz) noexcept;
68 void operator delete(void* pt, size_t sz) noexcept;
69
70 public:
71 virtual id getId() const;
77 virtual nbool isHeap() const;
84 const life* getBindTag() const;
85
86 static vault& getVault();
87
88 protected:
89 // instance:
90 nbool _setId(id new1);
91 static instancer* _getMgr();
92
93 private:
94 id _id;
95 static vault _vault;
96 };
97} // namespace by
Interface for objects that can be cloned
Definition clonable.hpp:13
Definition instance.hpp:47
Base class for all managed instances in memlite system
Definition instance.hpp:41
virtual nbool isHeap() const
Checks if this instance is allocated on the heap.
const life * getBindTag() const
Returns a pointer to the associated life object for reference counting.
Singleton manager for instance lifecycle and memory allocation
Definition instancer.hpp:16
Binding tag for instance reference tracking and lifecycle management
Definition life.hpp:21
Definition memliteInternal.hpp:12
Interface for objects that can provide their type information
Definition typeProvidable.hpp:13
Rich logging support with polymorphic type conversion
Definition richLog.hpp:34