|
CeresEngine 0.2.0
A game development framework
|
A simple reference counter base class. More...
#include <CeresEngine/Foundation/SmartPtr.hpp>
Public Member Functions | |
| template<typename... Args> | |
| RefCounted (Args &&... args) | |
Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it. | |
| void | retain () noexcept |
| Retains the object by increment it's reference count by one. | |
| bool | release () noexcept |
| Relases the object by decrementing it's reference count by one. | |
Private Attributes | |
| Counter | mRefCounter |
| The object's reference counter. | |
| Deleter | mDeleter |
| The deleter object type. | |
A simple reference counter base class.
Can be inherited by classes to provide reference counting semantics that can be used by CountedPtr.
| T | The type that is inheriting from RefCounted |
| Deleter | A deleter class to be called when deallocating the object. |
| Counter | A type used to perform the reference counting. |
|
inlineexplicit |
Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
| Args | the arg types to forward to the Deleter constructor |
| args | The arguments to forward to the Deleter constructor |
|
inlinenoexcept |
Relases the object by decrementing it's reference count by one.
true if the object has been destroyed
|
inlinenoexcept |
Retains the object by increment it's reference count by one.
|
private |
The deleter object type.
|
private |
The object's reference counter.