RefCount

Detailed Description

Classes

class  BinaryNinja::RefCountObject
 
class  BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >
 
class  BinaryNinja::StaticCoreRefCountObject< T >
 
class  BinaryNinja::Ref< T >
 
class  BinaryNinja::CallbackRef< T >
 

Class Documentation

◆ BinaryNinja::RefCountObject

class BinaryNinja::RefCountObject

Public Member Functions

 RefCountObject ()
 
virtual ~RefCountObject ()
 
RefCountObjectGetObject ()
 
void AddRef ()
 
void Release ()
 

Static Public Member Functions

static RefCountObjectGetObject (RefCountObject *obj)
 

Public Attributes

std::atomic< int > m_refs
 

Constructor & Destructor Documentation

◆ RefCountObject()

BinaryNinja::RefCountObject::RefCountObject ( )
inline

◆ ~RefCountObject()

virtual BinaryNinja::RefCountObject::~RefCountObject ( )
inlinevirtual

Member Function Documentation

◆ GetObject() [1/2]

RefCountObject * BinaryNinja::RefCountObject::GetObject ( )
inline

◆ GetObject() [2/2]

static RefCountObject * BinaryNinja::RefCountObject::GetObject ( RefCountObject obj)
inlinestatic

◆ AddRef()

void BinaryNinja::RefCountObject::AddRef ( )
inline

◆ Release()

void BinaryNinja::RefCountObject::Release ( )
inline

Member Data Documentation

◆ m_refs

std::atomic<int> BinaryNinja::RefCountObject::m_refs

◆ BinaryNinja::CoreRefCountObject

class BinaryNinja::CoreRefCountObject
template<class T, T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
class BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >

Public Member Functions

 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
T * GetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Static Public Member Functions

static T * GetObject (CoreRefCountObject *obj)
 
static T * GetObject (const CoreRefCountObject *obj)
 

Public Attributes

std::atomic< int > m_refs
 
bool m_registeredRef = false
 
T * m_object
 

Constructor & Destructor Documentation

◆ CoreRefCountObject()

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::CoreRefCountObject ( )
inline

◆ ~CoreRefCountObject()

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
virtual BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::~CoreRefCountObject ( )
inlinevirtual

Member Function Documentation

◆ GetObject() [1/3]

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
T * BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::GetObject ( ) const
inline

◆ GetObject() [2/3]

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
static T * BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::GetObject ( CoreRefCountObject< T, AddObjectReference, FreeObjectReference > *  obj)
inlinestatic

◆ GetObject() [3/3]

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
static T * BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::GetObject ( const CoreRefCountObject< T, AddObjectReference, FreeObjectReference > *  obj)
inlinestatic

◆ AddRef()

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
void BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::AddRef ( )
inline

◆ Release()

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
void BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::Release ( )
inline

◆ AddRefForRegistration()

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
void BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::AddRefForRegistration ( )
inline

◆ ReleaseForRegistration()

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
void BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::ReleaseForRegistration ( )
inline

◆ AddRefForCallback()

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
void BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::AddRefForCallback ( )
inline

◆ ReleaseForCallback()

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
void BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::ReleaseForCallback ( )
inline

Member Data Documentation

◆ m_refs

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
std::atomic<int> BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::m_refs

◆ m_registeredRef

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
bool BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::m_registeredRef = false

◆ m_object

template<class T , T *(*)(T *) AddObjectReference, void(*)(T *) FreeObjectReference>
T* BinaryNinja::CoreRefCountObject< T, AddObjectReference, FreeObjectReference >::m_object

◆ BinaryNinja::StaticCoreRefCountObject

class BinaryNinja::StaticCoreRefCountObject
template<class T>
class BinaryNinja::StaticCoreRefCountObject< T >

Public Member Functions

 StaticCoreRefCountObject ()
 
virtual ~StaticCoreRefCountObject ()
 
T * GetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Static Public Member Functions

static T * GetObject (StaticCoreRefCountObject *obj)
 

Public Attributes

std::atomic< int > m_refs
 
T * m_object
 

Constructor & Destructor Documentation

◆ StaticCoreRefCountObject()

template<class T >
BinaryNinja::StaticCoreRefCountObject< T >::StaticCoreRefCountObject ( )
inline

◆ ~StaticCoreRefCountObject()

template<class T >
virtual BinaryNinja::StaticCoreRefCountObject< T >::~StaticCoreRefCountObject ( )
inlinevirtual

Member Function Documentation

◆ GetObject() [1/2]

template<class T >
T * BinaryNinja::StaticCoreRefCountObject< T >::GetObject ( ) const
inline

◆ GetObject() [2/2]

template<class T >
static T * BinaryNinja::StaticCoreRefCountObject< T >::GetObject ( StaticCoreRefCountObject< T > *  obj)
inlinestatic

◆ AddRef()

template<class T >
void BinaryNinja::StaticCoreRefCountObject< T >::AddRef ( )
inline

◆ Release()

template<class T >
void BinaryNinja::StaticCoreRefCountObject< T >::Release ( )
inline

◆ AddRefForRegistration()

template<class T >
void BinaryNinja::StaticCoreRefCountObject< T >::AddRefForRegistration ( )
inline

◆ AddRefForCallback()

template<class T >
void BinaryNinja::StaticCoreRefCountObject< T >::AddRefForCallback ( )
inline

◆ ReleaseForCallback()

template<class T >
void BinaryNinja::StaticCoreRefCountObject< T >::ReleaseForCallback ( )
inline

Member Data Documentation

◆ m_refs

template<class T >
std::atomic<int> BinaryNinja::StaticCoreRefCountObject< T >::m_refs

◆ m_object

template<class T >
T* BinaryNinja::StaticCoreRefCountObject< T >::m_object

◆ BinaryNinja::Ref

class BinaryNinja::Ref
template<class T>
class BinaryNinja::Ref< T >

Public Member Functions

 Ref ()
 
 Ref (T *obj)
 
 Ref (const Ref< T > &obj)
 
 Ref (Ref< T > &&other)
 
 ~Ref ()
 
Ref< T > & operator= (const Ref< T > &obj)
 
Ref< T > & operator= (Ref< T > &&other)
 
Ref< T > & operator= (T *obj)
 
 operator T* () const
 
T * operator-> () const
 
T & operator* () const
 
bool operator! () const
 
bool operator== (const T *obj) const
 
bool operator== (const Ref< T > &obj) const
 
bool operator!= (const T *obj) const
 
bool operator!= (const Ref< T > &obj) const
 
bool operator< (const T *obj) const
 
bool operator< (const Ref< T > &obj) const
 
T * GetPtr () const
 

Constructor & Destructor Documentation

◆ Ref() [1/4]

template<class T >
BinaryNinja::Ref< T >::Ref ( )
inline

◆ Ref() [2/4]

template<class T >
BinaryNinja::Ref< T >::Ref ( T *  obj)
inline

◆ Ref() [3/4]

template<class T >
BinaryNinja::Ref< T >::Ref ( const Ref< T > &  obj)
inline

◆ Ref() [4/4]

template<class T >
BinaryNinja::Ref< T >::Ref ( Ref< T > &&  other)
inline

◆ ~Ref()

template<class T >
BinaryNinja::Ref< T >::~Ref ( )
inline

Member Function Documentation

◆ operator=() [1/3]

template<class T >
Ref< T > & BinaryNinja::Ref< T >::operator= ( const Ref< T > &  obj)
inline

◆ operator=() [2/3]

template<class T >
Ref< T > & BinaryNinja::Ref< T >::operator= ( Ref< T > &&  other)
inline

◆ operator=() [3/3]

template<class T >
Ref< T > & BinaryNinja::Ref< T >::operator= ( T *  obj)
inline

◆ operator T*()

template<class T >
BinaryNinja::Ref< T >::operator T* ( ) const
inline

◆ operator->()

template<class T >
T * BinaryNinja::Ref< T >::operator-> ( ) const
inline

◆ operator*()

template<class T >
T & BinaryNinja::Ref< T >::operator* ( ) const
inline

◆ operator!()

template<class T >
bool BinaryNinja::Ref< T >::operator! ( ) const
inline

◆ operator==() [1/2]

template<class T >
bool BinaryNinja::Ref< T >::operator== ( const T *  obj) const
inline

◆ operator==() [2/2]

template<class T >
bool BinaryNinja::Ref< T >::operator== ( const Ref< T > &  obj) const
inline

◆ operator!=() [1/2]

template<class T >
bool BinaryNinja::Ref< T >::operator!= ( const T *  obj) const
inline

◆ operator!=() [2/2]

template<class T >
bool BinaryNinja::Ref< T >::operator!= ( const Ref< T > &  obj) const
inline

◆ operator<() [1/2]

template<class T >
bool BinaryNinja::Ref< T >::operator< ( const T *  obj) const
inline

◆ operator<() [2/2]

template<class T >
bool BinaryNinja::Ref< T >::operator< ( const Ref< T > &  obj) const
inline

◆ GetPtr()

template<class T >
T * BinaryNinja::Ref< T >::GetPtr ( ) const
inline

◆ BinaryNinja::CallbackRef

class BinaryNinja::CallbackRef
template<class T>
class BinaryNinja::CallbackRef< T >

Public Member Functions

 CallbackRef (void *obj)
 
 ~CallbackRef ()
 
 operator T* () const
 
T * operator-> () const
 
T & operator* () const
 
bool operator== (const T *obj) const
 
bool operator== (const Ref< T > &obj) const
 
bool operator!= (const T *obj) const
 
bool operator!= (const Ref< T > &obj) const
 
bool operator< (const T *obj) const
 
bool operator< (const Ref< T > &obj) const
 
T * GetPtr () const
 

Constructor & Destructor Documentation

◆ CallbackRef()

template<class T >
BinaryNinja::CallbackRef< T >::CallbackRef ( void *  obj)
inline

◆ ~CallbackRef()

template<class T >
BinaryNinja::CallbackRef< T >::~CallbackRef ( )
inline

Member Function Documentation

◆ operator T*()

template<class T >
BinaryNinja::CallbackRef< T >::operator T* ( ) const
inline

◆ operator->()

template<class T >
T * BinaryNinja::CallbackRef< T >::operator-> ( ) const
inline

◆ operator*()

template<class T >
T & BinaryNinja::CallbackRef< T >::operator* ( ) const
inline

◆ operator==() [1/2]

template<class T >
bool BinaryNinja::CallbackRef< T >::operator== ( const T *  obj) const
inline

◆ operator==() [2/2]

template<class T >
bool BinaryNinja::CallbackRef< T >::operator== ( const Ref< T > &  obj) const
inline

◆ operator!=() [1/2]

template<class T >
bool BinaryNinja::CallbackRef< T >::operator!= ( const T *  obj) const
inline

◆ operator!=() [2/2]

template<class T >
bool BinaryNinja::CallbackRef< T >::operator!= ( const Ref< T > &  obj) const
inline

◆ operator<() [1/2]

template<class T >
bool BinaryNinja::CallbackRef< T >::operator< ( const T *  obj) const
inline

◆ operator<() [2/2]

template<class T >
bool BinaryNinja::CallbackRef< T >::operator< ( const Ref< T > &  obj) const
inline

◆ GetPtr()

template<class T >
T * BinaryNinja::CallbackRef< T >::GetPtr ( ) const
inline