Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

syn::shared_ptr< T > Class Template Reference

reference counting smart pointer. More...

#include <smart_ptr.h>

List of all members.

Public Types

typedef T element_type

Public Methods

 shared_ptr (T *p=0)
 shared_ptr (const shared_ptr &r)
 ~shared_ptr ()
shared_ptr & operator= (const shared_ptr &r)
template<typename Y>  shared_ptr (const shared_ptr< Y > &r)
template<typename Y>  shared_ptr (std::auto_ptr< Y > &r)
template<typename Y> shared_ptr & operator= (const shared_ptr< Y > &r)
template<typename Y> shared_ptr & operator= (std::auto_ptr< Y > &r)
void reset (T *p=0)
T & operator * () const
T * operator-> () const
T * get () const
long use_count () const
bool unique () const
void swap (shared_ptr< T > &other)

Friends

class shared_ptr


Detailed Description

template<typename T>
class syn::shared_ptr< T >

reference counting smart pointer.

An enhanced relative of scoped_ptr with reference counted copy semantics. The object pointed to is deleted when the last shared_ptr pointing to it is destroyed or reset.

Definition at line 75 of file smart_ptr.h.


Member Typedef Documentation

template<typename T>
typedef T syn::shared_ptr< T >::element_type
 

Definition at line 77 of file smart_ptr.h.


Constructor & Destructor Documentation

template<typename T>
syn::shared_ptr< T >::shared_ptr T *    p = 0 [inline, explicit]
 

Definition at line 79 of file smart_ptr.h.

template<typename T>
syn::shared_ptr< T >::shared_ptr const shared_ptr< T > &    r [inline]
 

Definition at line 84 of file smart_ptr.h.

template<typename T>
syn::shared_ptr< T >::~shared_ptr   [inline]
 

Definition at line 86 of file smart_ptr.h.

template<typename T>
template<typename Y>
syn::shared_ptr< T >::shared_ptr const shared_ptr< Y > &    r [inline]
 

Definition at line 95 of file smart_ptr.h.

template<typename T>
template<typename Y>
syn::shared_ptr< T >::shared_ptr std::auto_ptr< Y > &    r [inline]
 

Definition at line 100 of file smart_ptr.h.


Member Function Documentation

template<typename T>
shared_ptr& syn::shared_ptr< T >::operator= const shared_ptr< T > &    r [inline]
 

Definition at line 88 of file smart_ptr.h.

References syn::shared_ptr< T >::pn, and syn::shared_ptr< T >::px.

template<typename T>
template<typename Y>
shared_ptr& syn::shared_ptr< T >::operator= const shared_ptr< Y > &    r [inline]
 

Definition at line 106 of file smart_ptr.h.

References syn::shared_ptr< T >::pn, and syn::shared_ptr< T >::px.

template<typename T>
template<typename Y>
shared_ptr& syn::shared_ptr< T >::operator= std::auto_ptr< Y > &    r [inline]
 

Definition at line 112 of file smart_ptr.h.

template<typename T>
void syn::shared_ptr< T >::reset T *    p = 0 [inline]
 

Definition at line 142 of file smart_ptr.h.

template<typename T>
T& syn::shared_ptr< T >::operator *   const [inline]
 

Definition at line 157 of file smart_ptr.h.

template<typename T>
T* syn::shared_ptr< T >::operator->   const [inline]
 

Definition at line 158 of file smart_ptr.h.

template<typename T>
T* syn::shared_ptr< T >::get   const [inline]
 

Definition at line 159 of file smart_ptr.h.

Referenced by syn::operator!=(), and syn::operator==().

template<typename T>
long syn::shared_ptr< T >::use_count   const [inline]
 

Definition at line 165 of file smart_ptr.h.

template<typename T>
bool syn::shared_ptr< T >::unique   const [inline]
 

Definition at line 166 of file smart_ptr.h.

template<typename T>
void syn::shared_ptr< T >::swap shared_ptr< T > &    other [inline]
 

Definition at line 168 of file smart_ptr.h.


Friends And Related Function Documentation

template<typename T>
friend class shared_ptr [friend]
 

Definition at line 183 of file smart_ptr.h.


The documentation for this class was generated from the following file:
Generated on Wed Jun 12 01:54:10 2002 for Animaniac by doxygen1.2.15