libmoost
moost::safe_shared_ptr< T > Class Template Reference

#include <safe_shared_ptr.hpp>

List of all members.

Classes

class  const_scoped_lock
class  scoped_lock
class  Tester
 Using strategy from "Modern C++ design", page 178. More...

Public Types

typedef T element_type

Public Member Functions

 safe_shared_ptr ()
template<class Y >
 safe_shared_ptr (Y *p)
template<class Y , class D >
 safe_shared_ptr (Y *p, D d)
template<class Y , class D , class A >
 safe_shared_ptr (Y *p, D d, A a)
 safe_shared_ptr (safe_shared_ptr const &r)
template<class Y >
 safe_shared_ptr (safe_shared_ptr< Y > const &r)
template<class Y >
 safe_shared_ptr (boost::shared_ptr< Y > const &r)
template<class Y >
 safe_shared_ptr (boost::shared_ptr< Y > const &r, T *p)
template<class Y >
 safe_shared_ptr (boost::weak_ptr< Y > const &r)
template<class Y >
 safe_shared_ptr (std::auto_ptr< Y > &r)
safe_shared_ptr< T > & operator= (safe_shared_ptr< T > const &r)
safe_shared_ptr< T > & operator= (boost::shared_ptr< T > const &r)
void reset ()
template<class Y >
void reset (Y *p)
template<class Y , class D >
void reset (Y *p, D d)
template<class Y , class D , class A >
void reset (Y *p, D d, A a)
boost::shared_ptr< T > operator-> () const
boost::shared_ptr< T > get_shared () const
bool unique () const
long use_count () const
bool operator! () const
 operator Tester * () const
void swap (safe_shared_ptr< T > &b)
void swap (boost::shared_ptr< T > &b)

Private Attributes

boost::shared_ptr< T > p_
boost::mutex mutex_

Friends

class safe_shared_ptr
template<class Y , class Z >
bool operator== (safe_shared_ptr< Y > const &, safe_shared_ptr< Z > const &)

Detailed Description

template<class T>
class moost::safe_shared_ptr< T >

safe_shared_ptr is a thread-safe shared ptr

Definition at line 42 of file safe_shared_ptr.hpp.


Member Typedef Documentation

template<class T>
typedef T moost::safe_shared_ptr< T >::element_type

Definition at line 60 of file safe_shared_ptr.hpp.


Constructor & Destructor Documentation

template<class T>
moost::safe_shared_ptr< T >::safe_shared_ptr ( ) [inline]

Definition at line 62 of file safe_shared_ptr.hpp.

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

Definition at line 67 of file safe_shared_ptr.hpp.

template<class T>
template<class Y , class D >
moost::safe_shared_ptr< T >::safe_shared_ptr ( Y *  p,
d 
) [inline, explicit]

Definition at line 73 of file safe_shared_ptr.hpp.

template<class T>
template<class Y , class D , class A >
moost::safe_shared_ptr< T >::safe_shared_ptr ( Y *  p,
d,
a 
) [inline, explicit]

Definition at line 79 of file safe_shared_ptr.hpp.

template<class T>
moost::safe_shared_ptr< T >::safe_shared_ptr ( safe_shared_ptr< T > const &  r) [inline]

Definition at line 84 of file safe_shared_ptr.hpp.

template<class T>
template<class Y >
moost::safe_shared_ptr< T >::safe_shared_ptr ( safe_shared_ptr< Y > const &  r) [inline]

Definition at line 90 of file safe_shared_ptr.hpp.

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

Definition at line 96 of file safe_shared_ptr.hpp.

template<class T>
template<class Y >
moost::safe_shared_ptr< T >::safe_shared_ptr ( boost::shared_ptr< Y > const &  r,
T *  p 
) [inline]

Definition at line 102 of file safe_shared_ptr.hpp.

template<class T>
template<class Y >
moost::safe_shared_ptr< T >::safe_shared_ptr ( boost::weak_ptr< Y > const &  r) [inline, explicit]

Definition at line 108 of file safe_shared_ptr.hpp.

template<class T>
template<class Y >
moost::safe_shared_ptr< T >::safe_shared_ptr ( std::auto_ptr< Y > &  r) [inline, explicit]

Definition at line 114 of file safe_shared_ptr.hpp.


Member Function Documentation

template<class T>
boost::shared_ptr<T> moost::safe_shared_ptr< T >::get_shared ( ) const [inline]

Definition at line 186 of file safe_shared_ptr.hpp.

Here is the caller graph for this function:

template<class T>
moost::safe_shared_ptr< T >::operator Tester * ( ) const [inline]

Definition at line 211 of file safe_shared_ptr.hpp.

template<class T>
bool moost::safe_shared_ptr< T >::operator! ( ) const [inline]

Definition at line 205 of file safe_shared_ptr.hpp.

template<class T>
boost::shared_ptr<T> moost::safe_shared_ptr< T >::operator-> ( ) const [inline]

Definition at line 181 of file safe_shared_ptr.hpp.

template<class T>
safe_shared_ptr<T>& moost::safe_shared_ptr< T >::operator= ( safe_shared_ptr< T > const &  r) [inline]

Definition at line 119 of file safe_shared_ptr.hpp.

template<class T>
safe_shared_ptr<T>& moost::safe_shared_ptr< T >::operator= ( boost::shared_ptr< T > const &  r) [inline]

Definition at line 129 of file safe_shared_ptr.hpp.

template<class T>
void moost::safe_shared_ptr< T >::reset ( ) [inline]

Definition at line 136 of file safe_shared_ptr.hpp.

Here is the caller graph for this function:

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

Definition at line 143 of file safe_shared_ptr.hpp.

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

Definition at line 150 of file safe_shared_ptr.hpp.

template<class T>
template<class Y , class D , class A >
void moost::safe_shared_ptr< T >::reset ( Y *  p,
d,
a 
) [inline]

Definition at line 157 of file safe_shared_ptr.hpp.

template<class T>
void moost::safe_shared_ptr< T >::swap ( safe_shared_ptr< T > &  b) [inline]

Definition at line 229 of file safe_shared_ptr.hpp.

Here is the caller graph for this function:

template<class T>
void moost::safe_shared_ptr< T >::swap ( boost::shared_ptr< T > &  b) [inline]

Definition at line 239 of file safe_shared_ptr.hpp.

template<class T>
bool moost::safe_shared_ptr< T >::unique ( ) const [inline]

Definition at line 192 of file safe_shared_ptr.hpp.

Here is the caller graph for this function:

template<class T>
long moost::safe_shared_ptr< T >::use_count ( ) const [inline]

Definition at line 198 of file safe_shared_ptr.hpp.

Here is the caller graph for this function:


Friends And Related Function Documentation

template<class T>
template<class Y , class Z >
bool operator== ( safe_shared_ptr< Y > const &  a,
safe_shared_ptr< Z > const &  b 
) [friend]

Definition at line 289 of file safe_shared_ptr.hpp.

template<class T>
friend class safe_shared_ptr [friend]

Definition at line 46 of file safe_shared_ptr.hpp.


Member Data Documentation

template<class T>
boost::mutex moost::safe_shared_ptr< T >::mutex_ [mutable, private]

Definition at line 50 of file safe_shared_ptr.hpp.

template<class T>
boost::shared_ptr<T> moost::safe_shared_ptr< T >::p_ [private]

Definition at line 49 of file safe_shared_ptr.hpp.


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