instancer.hpp
Go to the documentation of this file.
1
2#pragma once
3
6
7namespace by {
8
13 class _nout instancer {
14 BY_ME(instancer)
15 BY_INIT_META(me)
16 friend class instance;
17
18 public:
19 ~instancer();
20
21 public:
22 nbool bind(const instance& it);
23 nbool bind(const instance* it) BY_SIDE_FUNC(bind);
24 nbool rel(const instance& old);
25 nbool rel(const instance* it) BY_SIDE_FUNC(rel);
26 const pool& getPool() const;
27 const watcher& getWatcher() const;
30 static me* get();
31
32 private:
33 void* _new1(size_t sz);
34 void _del(void* pt, ncnt sz);
35 nbool _hasBindTag(const instance& it) const;
36
37 private:
38 instancer() = default;
39
40 private:
41 static nbool _isRel;
42 pool _pool;
43 watcher _watcher;
44 };
45} // namespace by
Base class for all managed instances in memlite system.
Definition: instance.hpp:20
Singleton manager for instance lifecycle and memory allocation.
Definition: instancer.hpp:13
static me * get()
Memory pool manager for efficient instance allocation.
Definition: pool.hpp:12
Memory watcher for tracking instance lifecycle and allocation.
Definition: watcher.hpp:13