The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
util::unique_ptr< T > Class Template Reference

#include <util.hpp>

Public Member Functions

 unique_ptr (T *p=nullptr)
 
 ~unique_ptr ()
 
void reset (T *p=nullptr)
 
T * release ()
 
T * get ()
 
T * operator-> () const
 
T & operator* () const
 

Private Member Functions

 unique_ptr (const unique_ptr &)
 
unique_ptroperator= (const unique_ptr &)
 

Private Attributes

T * ptr_
 

Detailed Description

template<class T>
class util::unique_ptr< T >

Definition at line 432 of file util.hpp.

Constructor & Destructor Documentation

template<class T>
util::unique_ptr< T >::unique_ptr ( const unique_ptr< T > &  )
private
template<class T>
util::unique_ptr< T >::unique_ptr ( T *  p = nullptr)
inline

Definition at line 439 of file util.hpp.

template<class T>
util::unique_ptr< T >::~unique_ptr ( )
inline

Definition at line 440 of file util.hpp.

References util::unique_ptr< T >::ptr_.

Member Function Documentation

template<class T>
T* util::unique_ptr< T >::get ( )
inline

Definition at line 455 of file util.hpp.

References util::unique_ptr< T >::ptr_.

template<class T>
T& util::unique_ptr< T >::operator* ( ) const
inline

Definition at line 457 of file util.hpp.

References util::unique_ptr< T >::ptr_.

template<class T>
T* util::unique_ptr< T >::operator-> ( ) const
inline

Definition at line 456 of file util.hpp.

References util::unique_ptr< T >::ptr_.

template<class T>
unique_ptr& util::unique_ptr< T >::operator= ( const unique_ptr< T > &  )
private
template<class T>
T* util::unique_ptr< T >::release ( )
inline
template<class T>
void util::unique_ptr< T >::reset ( T *  p = nullptr)
inline

Definition at line 442 of file util.hpp.

References util::unique_ptr< T >::ptr_.

Referenced by editor::editor_action_starting_position::perform().

Member Data Documentation

template<class T>
T* util::unique_ptr< T >::ptr_
private

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