soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SSharedCount< T, Disposer > Class Template Reference

Manages the reference count for a shared pointer. More...

#include <SSharedPtr.hpp>

Public Member Functions

 SSharedCount (T *ptr)
 Constructor.
 
 ~SSharedCount ()
 Destructor.
 
void incRefCount ()
 Increments the reference count.
 
void decRefCount ()
 Decrements the reference count.
 

Detailed Description

template<class T, class Disposer = DefaultPtrDisposer<T>>
class SSharedCount< T, Disposer >

Manages the reference count for a shared pointer.

Template Parameters
TThe type of the pointer.
DisposerThe disposer class used to delete the pointer.

This class maintains the reference count and ensures that the pointer is deleted when the reference count reaches zero.

Definition at line 61 of file SSharedPtr.hpp.

Constructor & Destructor Documentation

◆ SSharedCount()

template<class T, class Disposer = DefaultPtrDisposer<T>>
SSharedCount< T, Disposer >::SSharedCount ( T * ptr)
inline

Constructor.

Parameters
ptrPointer to be managed.

Definition at line 68 of file SSharedPtr.hpp.

◆ ~SSharedCount()

template<class T, class Disposer = DefaultPtrDisposer<T>>
SSharedCount< T, Disposer >::~SSharedCount ( )
inline

Destructor.

Deletes the managed pointer using the disposer.

Definition at line 76 of file SSharedPtr.hpp.

Member Function Documentation

◆ decRefCount()

template<class T, class Disposer = DefaultPtrDisposer<T>>
void SSharedCount< T, Disposer >::decRefCount ( )
inline

Decrements the reference count.

Deletes the managed pointer if the reference count reaches zero.

Definition at line 95 of file SSharedPtr.hpp.

◆ incRefCount()

template<class T, class Disposer = DefaultPtrDisposer<T>>
void SSharedCount< T, Disposer >::incRefCount ( )
inline

Increments the reference count.

Definition at line 85 of file SSharedPtr.hpp.


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