spot  1.0.2
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
spot::unique_ptr< T > Class Template Reference

Take ownership of a pointer at its construction, and destroy it at the end of the scope. More...

#include <misc/unique_ptr.hh>

Collaboration diagram for spot::unique_ptr< T >:
Collaboration graph

Public Member Functions

 unique_ptr (pointer ptr)
 ~unique_ptr ()
 operator pointer ()
pointer operator-> ()

Private Types

typedef T * pointer

Private Member Functions

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

Private Attributes

pointer ptr_

Friends

template<typename V >
unique_ptr< V > make_unique (V *ptr)

Detailed Description

template<typename T>
class spot::unique_ptr< T >

Take ownership of a pointer at its construction, and destroy it at the end of the scope.

Member Typedef Documentation

template<typename T>
typedef T* spot::unique_ptr< T >::pointer
private

Constructor & Destructor Documentation

template<typename T>
spot::unique_ptr< T >::unique_ptr ( pointer  ptr)
inline
template<typename T>
spot::unique_ptr< T >::~unique_ptr ( )
inline
template<typename T>
spot::unique_ptr< T >::unique_ptr ( const unique_ptr< T > &  up)
inlineprivate

Member Function Documentation

template<typename T>
spot::unique_ptr< T >::operator pointer ( )
inline
template<typename T>
pointer spot::unique_ptr< T >::operator-> ( )
inline
template<typename T>
unique_ptr& spot::unique_ptr< T >::operator= ( const unique_ptr< T > &  )
private

Friends And Related Function Documentation

template<typename T>
template<typename V >
unique_ptr<V> make_unique ( V *  ptr)
friend

Member Data Documentation

template<typename T>
pointer spot::unique_ptr< T >::ptr_
private

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

Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed Mar 6 2013 09:25:15 for spot by doxygen 1.8.1.2