Urho3D::UniquePtr< T > Class Template Reference

Unique pointer template class. More...

#include <Urho3D/Container/Ptr.h>

Collaboration diagram for Urho3D::UniquePtr< T >:
[legend]

Public Member Functions

 UniquePtr ()
 Construct empty.
 
 UniquePtr (T *ptr)
 Construct from pointer.
 
UniquePtroperator= (T *ptr)
 Assign from pointer.
 
 UniquePtr (std::nullptr_t)
 Construct empty.
 
 UniquePtr (UniquePtr &&up)
 Move-construct from UniquePtr.
 
UniquePtroperator= (UniquePtr &&up)
 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=0)
 Reset.
 
unsigned ToHash () const
 Return hash value for HashSet & HashMap.
 
 ~UniquePtr ()
 Destruct.
 

Private Member Functions

 UniquePtr (const UniquePtr &)
 
UniquePtroperator= (const 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:
  • Source/Urho3D/Container/Ptr.h