Open-source, cross-platform 2D and 3D game engine built in C++
No Matches
Urho3D::UniquePtr< T > Class Template Reference

Unique pointer template class. More...

#include </var/dev/u3d/stable/Source/Urho3D/Container/Ptr.h>

Public Member Functions

 UniquePtr ()
 Construct empty.
 UniquePtr (T *ptr)
 Construct from pointer.
 UniquePtr (const UniquePtr &)=delete
 Prevent copy construction.
UniquePtroperator= (const UniquePtr &)=delete
 Prevent assignment.
UniquePtroperator= (T *ptr)
 Assign from pointer.
 UniquePtr (std::nullptr_t)
 Construct empty.
 UniquePtr (UniquePtr &&up) noexcept
 Move-construct from UniquePtr.
UniquePtroperator= (UniquePtr &&up) noexcept
 Move-assign from UniquePtr.
T * operator-> () const
 Point to the object.
T & operator* () const
 Dereference the object.
template<class U >
bool operator< (const UniquePtr< U > &rhs) const
 Test for less than with another unique pointer.
template<class U >
bool operator== (const UniquePtr< U > &rhs) const
 Test for equality with another unique pointer.
template<class U >
bool operator!= (const UniquePtr< U > &rhs) const
 Test for inequality with another unique pointer.
 operator bool () const
 Cast pointer to bool.
void Swap (UniquePtr &up)
 Swap with another UniquePtr.
T * Detach ()
 Detach pointer from UniquePtr without destroying.
bool Null () const
 Check if the pointer is null.
bool NotNull () const
 Check if the pointer is not null.
T * Get () const
 Return the raw pointer.
void Reset (T *ptr=nullptr)
unsigned ToHash () const
 Return hash value for HashSet & HashMap.
 ~UniquePtr ()

Private Attributes

T * ptr_ {}

Detailed Description

template<class T>
class Urho3D::UniquePtr< T >

Unique pointer template class.

The documentation for this class was generated from the following file: