로딩중...
검색중...
일치하는것 없음
by::life 클래스 참조

Binding tag for instance reference tracking and lifecycle management 더 자세히 ...

#include <life.hpp>

by::life에 대한 상속 다이어그램 :
by::typeProvidable by::tbindable< instance >

Public 멤버 함수

 life (id newId)
 
instanceoperator-> ()
 
instanceoperator* ()
 
const instanceoperator-> () 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 typegetBindable () const
 
instanceget ()
 
const instanceget () 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 typegetType () 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 lifegetBindTag (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.

멤버 함수 문서화

◆ bind()

nbool by::life::bind ( const instance & new1)
overridevirtual

Binds instance to this life object for lifecycle tracking

반환값
true on success, false if already bound or type mismatch
주의
Initializes _pt pointer and sets up reference counting. Called by instancer.

by::tbindable< instance >(으)로부터 재구현되었습니다.

◆ canBind()

template<typename E >
const E *get() const BY_CONST_FUNC(get< E >()) using tbindable< instance > nbool by::life::canBind ( const type & cls) const
overridevirtual

◆ getBindTag()

static const life * by::life::getBindTag ( id newId)
static

Retrieves life object associated with given id

반환값
Pointer to life object, or nullptr if not found
주의
Used to lookup life objects from watcher by instance id

◆ getStrongCnt()

ncnt by::life::getStrongCnt ( ) const

Returns current strong reference count

반환값
Number of strong references (tstr binders) pointing to this instance

◆ getType()

const type & by::life::getType ( ) const
overridevirtual

by::typeProvidable를 구현.

◆ isBind()

nbool by::life::isBind ( ) const
overridevirtual

◆ onStrong()

nbool by::life::onStrong ( ncnt vote)

Updates strong reference count by vote amount

매개변수
votePositive to increment, negative to decrement reference count
반환값
true on success, false on error
주의
When count reaches 0, triggers instance destruction via instancer

◆ rel()

void by::life::rel ( )
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.

by::tbindable< instance >를 구현.


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: