Code_TYMPAN  4.2.0
Industrial site acoustic simulation
Public Member Functions | Protected Attributes | List of all members
IRefCount Class Reference

#include <smartptr.h>

Inheritance diagram for IRefCount:
Inheritance graph
[legend]

Public Member Functions

 IRefCount ()
 
virtual ~IRefCount ()
 
virtual int incRef ()
 
virtual int decRef ()
 
int getRefCount () const
 

Protected Attributes

int m_refCount
 The reference counter. More...
 

Detailed Description

If you wrap a non-class with the SmartPtr class, you will receive this warning. i.e. int, short, etc... It is a warning you may ignore. This warning is generated when compiling in debug mode. Debug symbols cannot be longer than 255 but when using templates it is usual to have debug symbols longer than 255. You may ignore this warning. This class implements the reference counting. When the reference count drops down to 0 the referenced object is freed.

Definition at line 51 of file smartptr.h.

Constructor & Destructor Documentation

◆ IRefCount()

IRefCount::IRefCount ( )
inline

Definition at line 54 of file smartptr.h.

◆ ~IRefCount()

virtual IRefCount::~IRefCount ( )
inlinevirtual

Definition at line 55 of file smartptr.h.

Member Function Documentation

◆ decRef()

virtual int IRefCount::decRef ( )
inlinevirtual

Decreases the reference count for this object. If there is no more reference to this object, this object is deleted.

Returns
The number of reference for this object.

Definition at line 71 of file smartptr.h.

◆ getRefCount()

int IRefCount::getRefCount ( ) const
inline

Returns the number of reference for this object.

Returns
The number of reference for this object.

Definition at line 87 of file smartptr.h.

Here is the caller graph for this function:

◆ incRef()

virtual int IRefCount::incRef ( )
inlinevirtual

Increases the reference count for this object.

Returns
The number of reference for this object.

Definition at line 62 of file smartptr.h.

Here is the caller graph for this function:

Member Data Documentation

◆ m_refCount

int IRefCount::m_refCount
protected

The reference counter.

Definition at line 92 of file smartptr.h.


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