|
TGUI 1.11
|
Copyable smart pointer template. More...
#include <TGUI/CopiedPtr.hpp>
Public Member Functions | |
| CopiedPtr () | |
| Default constructor that initializes the object to a nullptr. | |
| CopiedPtr (std::nullptr_t) | |
| Constructor that accepts a nullptr as parameter. | |
| template<typename... Args> | |
| CopiedPtr (CopiedPtrEmplaceTag, Args &&... args) | |
| Constructor that creates a new object. | |
| CopiedPtr (const CopiedPtr &other) | |
| Copy constructor. | |
| template<typename U> | |
| CopiedPtr (const CopiedPtr< U > &other) | |
| Copy constructor that takes a pointer to a derived object. | |
| CopiedPtr (CopiedPtr &&other) | |
| Move constructor. | |
| template<typename U> | |
| CopiedPtr (CopiedPtr &&other) | |
| Move constructor that takes a pointer to a derived object. | |
| void | swap (CopiedPtr &other) |
| Exchanges the values of *this and other. | |
| CopiedPtr & | operator= (const CopiedPtr &other) |
| Copy assignment operator. | |
| template<typename U> | |
| CopiedPtr & | operator= (const CopiedPtr< U > &other) |
| Copy assignment operator for a pointer to a derived object. | |
| CopiedPtr & | operator= (CopiedPtr &&other) |
| Move assignment operator. | |
| template<typename U> | |
| CopiedPtr & | operator= (CopiedPtr< U > &&other) |
| Move assignment operator for a pointer to a derived object. | |
| T & | operator* () |
| Dereferences the pointer. | |
| T * | operator-> () const |
| Dereferences the pointer for member access. | |
| operator bool () const | |
| Returns whether the pointer differs from a nullptr. | |
| T * | get () const |
| Returns a raw pointer to the underlying object. | |
| void | reset () |
| Reset the pointer to a nullptr. | |
Copyable smart pointer template.
The smart pointer behaves as a normal value (i.e. copying the pointer also copies the underlying value), but this object can also represent a nullptr.
|
inline |
Constructor that creates a new object.
This constructor is used by the makeCopied function, which is the intended way to construct a CopiedPtr.