|
ADTF
|
Default implementation of a reference counter. More...
#include <reference_counted_object.h>
Inherits a_util::result::detail::ReferenceCountedObjectInterface< Interface >.
Public Member Functions | |
| template<typename... Args> | |
| ReferenceCountedObject (Args &&... args) | |
| virtual void | addReference () const |
| Increase the reference count by 1. | |
| virtual void | removeReference () const |
Decrease the reference count by 1, deleting *this if it was the last reference. | |
| virtual const Interface & | getObject () const |
| virtual Interface & | getObject () |
Additional Inherited Members | |
Protected Member Functions inherited from a_util::result::detail::ReferenceCountedObjectInterface< Interface > | |
| ~ReferenceCountedObjectInterface () | |
| DTOR. | |
Default implementation of a reference counter.
| Interface | The interface of the resource to handle |
| Implementation | The type implementing the Interface type |
|
inline |
CTOR constructing the managed resource and the reference counter to an initial value of zero
| Args | Argument types of the resource's constructor |
| [in] | args | Values to forward to the resource's constructor |
|
inlinevirtual |
Increase the reference count by 1.
Implements a_util::result::detail::ReferenceCountedObjectInterface< Interface >.
|
inlinevirtual |
Get a reference to the handled object's interface
Implements a_util::result::detail::ReferenceCountedObjectInterface< Interface >.
|
inlinevirtual |
Get a reference to the handled object's interface - provided for const correctness
Implements a_util::result::detail::ReferenceCountedObjectInterface< Interface >.
|
inlinevirtual |
Decrease the reference count by 1, deleting *this if it was the last reference.
Implements a_util::result::detail::ReferenceCountedObjectInterface< Interface >.