Binding tag for instance reference tracking and lifecycle management 더 자세히 ...
#include <life.hpp>
Public 멤버 함수 | |
| life (id newId) | |
| instance * | operator-> () |
| instance & | operator* () |
| const instance * | operator-> () const BY_CONST_FUNC(operator->()) const instance &operator*() const BY_CONST_FUNC(operator*()) public:const chunk *getChunk() const |
| ncnt | getStrongCnt () const |
| Returns current strong reference count | |
| void | rel () override |
| Releases the binding for this life object, decrementing the strong reference count. | |
| nbool | isBind () const override |
| const type & | getBindable () const |
| instance * | get () |
| const instance * | get () const BY_CONST_FUNC(get()) template< typename E > E *get() |
| template<typename E > | |
| const E *get() const BY_CONST_FUNC(get< E >()) using tbindable< instance > nbool | canBind (const type &cls) const override |
| nbool | bind (const instance &new1) override |
| Binds instance to this life object for lifecycle tracking | |
| id | getId () const |
| const type & | getType () const override |
| nbool | onStrong (ncnt vote) |
| Updates strong reference count by vote amount | |
by::typeProvidable(으)로부터 상속된 Public 멤버 함수 | |
| nbool | operator== (const me &rhs) const |
| nbool | operator!= (const me &rhs) const |
| nbool | isSub (const type &it) const |
| nbool | isSub (const type *it) const BY_SIDE_FUNC(isSub) |
| nbool | isSub (const me &it) const |
| nbool | isSub (const me *it) const BY_SIDE_FUNC(isSub) |
| nbool | isSuper (const type &it) const |
| nbool | isSuper (const type *it) const BY_SIDE_FUNC(isSuper) |
| nbool | isSuper (const me &it) const |
| nbool | isSuper (const me *it) const BY_SIDE_FUNC(isSuper) |
| template<typename T > | |
| nint | isSub () const |
| template<typename T > | |
| nint | isSuper () const |
| template<typename T > | |
| T * | cast () |
| template<typename T > | |
| const T * | cast () const BY_CONST_FUNC(cast< T >()) virtual void *cast(const type &to) |
| Safe cast to target type using type hierarchy information | |
| const void * | cast (const type &to) const BY_CONST_FUNC(cast(to)) void *cast(const type *it) BY_SIDE_FUNC(cast) |
by::tbindable< instance >(으)로부터 상속된 Public 멤버 함수 | |
| operator nbool () const | |
| nbool | bind (const instance *it) |
| Bind to instance pointer | |
| nbool | canBind (const instance &it) const |
| nbool | canBind (const instance *it) const BY_SIDE_FUNC(canBind) |
| nbool | canBind (const type *it) const BY_SIDE_FUNC(canBind) |
정적 Public 멤버 함수 | |
| static const life * | getBindTag (id newId) |
| Retrieves life object associated with given id | |
Binding tag for instance reference tracking and lifecycle management
While pool manages memory from a low-level block perspective, the watcher component organically manages information for each block. See watcher first for details. life has an address value (_pt) allocated in pool and values for reference counting.
_strong is for reference counting, _pt directly points to an instance allocated in pool. _id is for identifying objects, see id for details.
Binds instance to this life object for lifecycle tracking
by::tbindable< instance >(으)로부터 재구현되었습니다.
Retrieves life object associated with given id
| ncnt by::life::getStrongCnt | ( | ) | const |
Returns current strong reference count
by::typeProvidable를 구현.
|
overridevirtual |
Updates strong reference count by vote amount
| vote | Positive to increment, negative to decrement reference count |
|
overridevirtual |
Releases the binding for this life object, decrementing the strong reference count.
When the strong count reaches zero, the associated instance is typically destroyed via the instancer.