coil::shared_ptr< T > Class Template Reference

#include <memory.h>

List of all members.

Public Types

typedef T element_type
typedef T * Tp

Public Member Functions

 shared_ptr ()
template<class Y>
 shared_ptr (Y *p)
template<class Y, class Deleter>
 shared_ptr (Y *p, Deleter d)
 shared_ptr (shared_ptr const &r)
template<class Y>
 shared_ptr (shared_ptr< Y > const &r)
template<class Y>
 shared_ptr (weak_ptr< Y > const &r)
template<class Y>
 shared_ptr (auto_ptr< Y > &r)
 ~shared_ptr ()
shared_ptroperator= (shared_ptr const &r)
template<class Y>
shared_ptroperator= (shared_ptr< Y > const &r)
template<class Y>
shared_ptroperator= (auto_ptr< Y > &r)
void swap (shared_ptr &r)
void reset ()
template<class Y>
void reset (Y *p)
template<class Y, class D>
void reset (Y *p, D d)
T * get () const
T & operator* () const
T * operator-> () const
long use_count () const
bool unique () const
 operator unspecified_bool_type () const

Classes

class  ref_counter

template<class T>
class coil::shared_ptr< T >


Member Typedef Documentation

template<class T>
typedef T coil::shared_ptr< T >::element_type

template<class T>
typedef T* coil::shared_ptr< T >::Tp


Constructor & Destructor Documentation

template<class T>
coil::shared_ptr< T >::shared_ptr (  )  [inline]

1 Effects: Constructs an empty shared_ptr object. 2 Postconditions: use_count() == 0 && get() == 0. 3 Throws: nothing.

template<class T>
template<class Y>
coil::shared_ptr< T >::shared_ptr ( Y *  p  )  [inline, explicit]

4 Requires: p shall be convertible to T*. Y shall be a complete type. The expression delete p shall be well-formed, shall have well defined behavior, and shall not throw exceptions. 5 Effects: Constructs a shared_ptr object that owns the pointer p. 6 Postconditions: use_count() == 1 && get() == p. 7 Throws: bad_alloc, or an implementation-defined exception when a resource other than memory could not be obtained. 8 Exception safety: If an exception is thrown, delete p is called.

template<class T>
template<class Y, class Deleter>
coil::shared_ptr< T >::shared_ptr ( Y *  p,
Deleter  d 
) [inline]

9 Requires: p shall be convertible to T*. D shall be CopyConstructible. The copy constructor and destructor of D shall not throw exceptions. The expression d(p) shall be well-formed, shall have well defined behavior, and shall not throw exceptions. 10 Effects: Constructs a shared_ptr object that owns the pointer p and the deleter d. 11 Postconditions: use_count() == 1 && get() == p. 12 Throws: bad_alloc, or an implementation-defined exception when a resource other than memory could not be obtained. 13 Exception safety: If an exception is thrown, d(p) is called.

template<class T>
coil::shared_ptr< T >::shared_ptr ( shared_ptr< T > const &  r  )  [inline]

14 Requires: For the second constructor Y* shall be convertible to T*. 15 Effects: If r is empty, constructs an empty shared_ptr object; otherwise, constructs a shared_ptr object that shares ownership with r. 16 Postconditions: get() == r.get() && use_count() == r.use_count(). 17 Throws: nothing.

template<class T>
template<class Y>
coil::shared_ptr< T >::shared_ptr ( shared_ptr< Y > const &  r  )  [inline]

template<class T>
template<class Y>
coil::shared_ptr< T >::shared_ptr ( weak_ptr< Y > const &  r  )  [inline, explicit]

template<class T>
template<class Y>
coil::shared_ptr< T >::shared_ptr ( auto_ptr< Y > &  r  )  [inline, explicit]

template<class T>
coil::shared_ptr< T >::~shared_ptr (  ) 


Member Function Documentation

template<class T>
shared_ptr& coil::shared_ptr< T >::operator= ( shared_ptr< T > const &  r  ) 

template<class T>
template<class Y>
shared_ptr& coil::shared_ptr< T >::operator= ( shared_ptr< Y > const &  r  )  [inline]

template<class T>
template<class Y>
shared_ptr& coil::shared_ptr< T >::operator= ( auto_ptr< Y > &  r  )  [inline]

template<class T>
void coil::shared_ptr< T >::swap ( shared_ptr< T > &  r  ) 

template<class T>
void coil::shared_ptr< T >::reset (  ) 

template<class T>
template<class Y>
void coil::shared_ptr< T >::reset ( Y *  p  )  [inline]

template<class T>
template<class Y, class D>
void coil::shared_ptr< T >::reset ( Y *  p,
d 
) [inline]

template<class T>
T* coil::shared_ptr< T >::get (  )  const

template<class T>
T& coil::shared_ptr< T >::operator* (  )  const

template<class T>
T* coil::shared_ptr< T >::operator-> (  )  const

template<class T>
long coil::shared_ptr< T >::use_count (  )  const

template<class T>
bool coil::shared_ptr< T >::unique (  )  const

template<class T>
coil::shared_ptr< T >::operator unspecified_bool_type (  )  const


Generated on Thu Jan 28 13:25:35 2010 for OpenRTM by  doxygen 1.5.5