CppCMS
Public Member Functions
booster::copy_ptr< T > Class Template Reference

a smart pointer similar to std::auto_ptr but it copies underlying object on pointer copy instead of moving its ownership. More...

#include <booster/booster/copy_ptr.h>

List of all members.

Public Member Functions

 copy_ptr (T *v)
 copy_ptr (copy_ptr const &other)
copy_ptr const & operator= (copy_ptr const &other)
T const * get () const
T * get ()
T const & operator* () const
T & operator* ()
T const * operator-> () const
T * operator-> ()
T * release ()
void reset (T *p=0)
void swap (copy_ptr &other)

Detailed Description

template<typename T>
class booster::copy_ptr< T >

a smart pointer similar to std::auto_ptr but it copies underlying object on pointer copy instead of moving its ownership.

Note: Underlying object has same constness as the pointer itself (not like in ordinary pointer).

Don't use it with polymorphic classes. Prefer clone_ptr instead.


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