Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields
RefCountingObject< T > Class Template Reference

Description

template<class T>
class RefCountingObject< T >

Self reference-counting objects, as requred by AngelScript garbage collector.

Definition at line 26 of file RefCountingObject.h.

Public Member Functions

 RefCountingObject ()
 
virtual ~RefCountingObject ()
 
void AddRef ()
 
void Release ()
 

Static Public Member Functions

static void RegisterRefCountingObject (AS_NAMESPACE_QUALIFIER asIScriptEngine *engine, const char *name)
 
static void RegisterRefCountingObjectGeneric (AS_NAMESPACE_QUALIFIER asIScriptEngine *engine, const char *name)
 
static void AddRefGeneric (AS_NAMESPACE_QUALIFIER asIScriptGeneric *gen)
 
static void ReleaseGeneric (AS_NAMESPACE_QUALIFIER asIScriptGeneric *gen)
 

Data Fields

int m_refcount = 0
 
std::mutex m_refcount_mtx
 

Constructor & Destructor Documentation

◆ RefCountingObject()

template<class T >
RefCountingObject< T >::RefCountingObject ( )
inline

Definition at line 29 of file RefCountingObject.h.

◆ ~RefCountingObject()

template<class T >
virtual RefCountingObject< T >::~RefCountingObject ( )
inlinevirtual

Definition at line 34 of file RefCountingObject.h.

Member Function Documentation

◆ AddRef()

template<class T >
void RefCountingObject< T >::AddRef ( )
inline

Definition at line 39 of file RefCountingObject.h.

◆ AddRefGeneric()

template<class T >
static void RefCountingObject< T >::AddRefGeneric ( AS_NAMESPACE_QUALIFIER asIScriptGeneric *  gen)
inlinestatic

Definition at line 101 of file RefCountingObject.h.

◆ RegisterRefCountingObject()

template<class T >
static void RefCountingObject< T >::RegisterRefCountingObject ( AS_NAMESPACE_QUALIFIER asIScriptEngine *  engine,
const char *  name 
)
inlinestatic

Definition at line 67 of file RefCountingObject.h.

◆ RegisterRefCountingObjectGeneric()

template<class T >
static void RefCountingObject< T >::RegisterRefCountingObjectGeneric ( AS_NAMESPACE_QUALIFIER asIScriptEngine *  engine,
const char *  name 
)
inlinestatic

Same as RegisterRefCountingObject() but uses the generic calling convention (for platforms with AS_MAX_PORTABILITY).

Definition at line 84 of file RefCountingObject.h.

◆ Release()

template<class T >
void RefCountingObject< T >::Release ( )
inline

Definition at line 48 of file RefCountingObject.h.

◆ ReleaseGeneric()

template<class T >
static void RefCountingObject< T >::ReleaseGeneric ( AS_NAMESPACE_QUALIFIER asIScriptGeneric *  gen)
inlinestatic

Definition at line 102 of file RefCountingObject.h.

Field Documentation

◆ m_refcount

template<class T >
int RefCountingObject< T >::m_refcount = 0

Definition at line 104 of file RefCountingObject.h.

◆ m_refcount_mtx

template<class T >
std::mutex RefCountingObject< T >::m_refcount_mtx

Definition at line 105 of file RefCountingObject.h.


The documentation for this class was generated from the following file: