LiteFX 0.3.1.2022
Computer Graphics Engine
|
A smart pointer that manages an implementation instance for a public interface class. More...
#include <containers.hpp>
Public Member Functions | |
PimplPtr () noexcept=default | |
Initializes a new pointer to an uninitialized implementation instance. More... | |
PimplPtr (const PimplPtr &src) noexcept | |
Initializes a new pointer to a copy of the implementation instance managed by src . More... | |
PimplPtr (PimplPtr &&src) noexcept=default | |
Initializes a new pointer by taking over the implementation instance managed by src . More... | |
PimplPtr & | operator= (const PimplPtr &src) noexcept |
Initializes a new pointer to a copy of the implementation instance managed by src . More... | |
PimplPtr & | operator= (PimplPtr &&src) noexcept=default |
Initializes a new pointer by taking over the implementation instance managed by src . More... | |
~PimplPtr () noexcept=default | |
void | destroy () |
Destroys the implementation instance managed by this pointer. More... | |
pImpl * | release () noexcept |
Releases the implementation instance managed by this pointer and returns it. More... | |
pImpl & | operator* () const noexcept |
Returns a reference to the managed implementation instance. More... | |
pImpl * | operator-> () const noexcept |
Returns a pointer to the managed implementation instance. More... | |
Friends | |
template<class T , class... Arg> | |
PimplPtr< T > | makePimpl (Arg &&... arg) |
Creates a pointer to an implementation. More... | |
A smart pointer that manages an implementation instance for a public interface class.
pImpl | The type of the implementaion class. |
|
defaultnoexcept |
Initializes a new pointer to an uninitialized implementation instance.
|
inlinenoexcept |
Initializes a new pointer to a copy of the implementation instance managed by src .
Note that this will share ownership between this instance and src . Only use this method, if you release either of both implementation pointers manually!
src | The source pointer to copy the implementation instance from. |
|
defaultnoexcept |
Initializes a new pointer by taking over the implementation instance managed by src .
src | The source pointer to take over. |
|
defaultnoexcept |
|
inline |
Destroys the implementation instance managed by this pointer.
|
inlinenoexcept |
Returns a reference to the managed implementation instance.
|
inlinenoexcept |
Returns a pointer to the managed implementation instance.
|
inlinenoexcept |
Initializes a new pointer to a copy of the implementation instance managed by src .
Note that this will share ownership between this instance and src . Only use this method, if you release either of both implementation pointers manually!
src | The source pointer to copy the implementation instance from. |
|
defaultnoexcept |
Initializes a new pointer by taking over the implementation instance managed by src .
src | The source pointer to take over. |
///
|
inlinenoexcept |
Releases the implementation instance managed by this pointer and returns it.
|
friend |
Creates a pointer to an implementation.
T | The type of the implementation class. |
...Arg | The variadic argument types forwarded to the implementation classes' constructor. |
...arg | The arguments forwarded to the implementation classes' constructor. |