Base Framework
|
Ownership automation pointer. More...
#include <base/mem/OwnershipPointer.h>
Inherits AutomationObject.
Public Member Functions | |
OwnershipPointer () noexcept | |
OwnershipPointer (TYPE *_object) noexcept | |
OwnershipPointer (OwnershipPointer ©) noexcept | |
OwnershipPointer & | operator= (OwnershipPointer &assign) |
template<class POLY > | |
OwnershipPointer & | operator= (OwnershipPointer< POLY > &assign) |
OwnershipPointer & | operator= (TYPE *object) |
TYPE * | relinquishOwnership () noexcept |
TYPE * | getValue () noexcept |
const TYPE * | getValue () const noexcept |
TYPE & | operator* () |
const TYPE & | operator* () const |
TYPE * | operator-> () |
const TYPE * | operator-> () const |
~OwnershipPointer () | |
Ownership automation pointer.
Automation pointer that allows transfer of ownership and automatic deletion of the object. Do not construct more than one automation pointer from the 'normal' pointer.
|
inlinenoexcept |
Initializes the ownership pointer as nullptr.
|
inlinenoexcept |
Initializes the ownership pointer.
object | The object pointer to be automated. |
|
inlinenoexcept |
Copy constructor. Transfers ownership from copy to this object. The original owner loses the ownership.
|
inline |
Destroys the ownership pointer (and the object).
|
inlinenoexcept |
Returns the pointer to constant object.
|
inlinenoexcept |
Returns the pointer to mutable object.
|
inline |
Returns mutable object.
|
inline |
Returns constant object.
|
inline |
Returns object for modifying access.
|
inline |
Returns object for non-modifying access.
|
inline |
Assignment operator.
|
inline |
Assignment operator.
|
inline |
Assignment operator.
|
inlinenoexcept |
Makes the automation pointer relinquish its ownership. Please note that the pointer may not have the ownership to begin with.