Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ObjectImpl Class Reference

Base class for an object with a reference counter. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/Collection.h>

Inheritance diagram for Arcane::ObjectImpl:
Collaboration diagram for Arcane::ObjectImpl:

Public Member Functions

 ObjectImpl (const ObjectImpl &rhs)=delete
ObjectImpl & operator= (const ObjectImpl &rhs)=delete
void addRef ()
 Increments the reference counter.
void removeRef ()
 Decrements the reference counter.
Int32 refCount () const
 Returns the value of the reference counter.
virtual void deleteMe ()
 Destroys this object.

Static Private Member Functions

static void _noReferenceErrorCallTerminate (const void *ptr)

Private Attributes

std::atomic< Int32m_ref_count
 Number of references on the object.

Detailed Description

Base class for an object with a reference counter.

These objects are managed by a reference counter.

Definition at line 39 of file arccore/src/common/arccore/common/Collection.h.

Constructor & Destructor Documentation

◆ ObjectImpl()

Arcane::ObjectImpl::ObjectImpl ( )
inline

◆ ~ObjectImpl()

virtual Arcane::ObjectImpl::~ObjectImpl ( )
inlinevirtual

Member Function Documentation

◆ _noReferenceErrorCallTerminate()

void Arcane::ObjectImpl::_noReferenceErrorCallTerminate ( const void * ptr)
staticprivate

Definition at line 43 of file Collection.cc.

◆ addRef()

void Arcane::ObjectImpl::addRef ( )
inline

Increments the reference counter.

Definition at line 53 of file arccore/src/common/arccore/common/Collection.h.

References m_ref_count.

◆ deleteMe()

virtual void Arcane::ObjectImpl::deleteMe ( )
inlinevirtual

Destroys this object.

Reimplemented in Arcane::ProxyItemVariableNull.

Definition at line 69 of file arccore/src/common/arccore/common/Collection.h.

Referenced by removeRef().

Here is the caller graph for this function:

◆ refCount()

Int32 Arcane::ObjectImpl::refCount ( ) const
inline

Returns the value of the reference counter.

Definition at line 64 of file arccore/src/common/arccore/common/Collection.h.

References m_ref_count.

◆ removeRef()

void Arcane::ObjectImpl::removeRef ( )
inline

Decrements the reference counter.

Definition at line 55 of file arccore/src/common/arccore/common/Collection.h.

References deleteMe(), and m_ref_count.

Here is the call graph for this function:

Member Data Documentation

◆ m_ref_count

std::atomic<Int32> Arcane::ObjectImpl::m_ref_count
private

Number of references on the object.

Definition at line 73 of file arccore/src/common/arccore/common/Collection.h.

Referenced by addRef(), refCount(), and removeRef().


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