loose_smart_ptr< T > Class Template Reference

Loose Object Smart Pointer. More...

#include <ETL/smart_ptr>

List of all members.

Public Types

typedef T value_type
typedef T & reference
typedef const T & const_reference
typedef T * pointer
typedef const T * const_pointer
typedef int count_type
typedef int size_type

Public Member Functions

 loose_smart_ptr ()
 Default constructor - empty smart_ptr.
 loose_smart_ptr (const loose_smart_ptr< value_type > &x)
 Default copy constructor.
 loose_smart_ptr (const smart_ptr< value_type > &x)
void reset ()
 operator smart_ptr< value_type > ()
 operator smart_ptr< const value_type > ()
const count_typecount () const
 Returns number of instances.
bool unique () const
reference operator * () const
pointer operator-> () const
pointer get () const
bool operator! () const

Private Attributes

value_typeobj
weak_reference_counter refcount


Detailed Description

template<class T>
class loose_smart_ptr< T >

Loose Object Smart Pointer.

See also:
smart_ptr
Todo:
This needs to be documented

Definition at line 230 of file _smart_ptr.h.


Member Typedef Documentation

template<class T>
typedef T loose_smart_ptr< T >::value_type

Definition at line 234 of file _smart_ptr.h.

template<class T>
typedef T& loose_smart_ptr< T >::reference

Definition at line 235 of file _smart_ptr.h.

template<class T>
typedef const T& loose_smart_ptr< T >::const_reference

Definition at line 236 of file _smart_ptr.h.

template<class T>
typedef T* loose_smart_ptr< T >::pointer

Definition at line 237 of file _smart_ptr.h.

template<class T>
typedef const T* loose_smart_ptr< T >::const_pointer

Definition at line 238 of file _smart_ptr.h.

template<class T>
typedef int loose_smart_ptr< T >::count_type

Definition at line 239 of file _smart_ptr.h.

template<class T>
typedef int loose_smart_ptr< T >::size_type

Definition at line 240 of file _smart_ptr.h.


Constructor & Destructor Documentation

template<class T>
loose_smart_ptr< T >::loose_smart_ptr (  )  [inline]

Default constructor - empty smart_ptr.

Definition at line 249 of file _smart_ptr.h.

template<class T>
loose_smart_ptr< T >::loose_smart_ptr ( const loose_smart_ptr< value_type > &  x  )  [inline]

Default copy constructor.

Definition at line 252 of file _smart_ptr.h.

template<class T>
loose_smart_ptr< T >::loose_smart_ptr ( const smart_ptr< value_type > &  x  )  [inline]

Definition at line 254 of file _smart_ptr.h.


Member Function Documentation

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

Definition at line 256 of file _smart_ptr.h.

References loose_smart_ptr< T >::obj, and loose_smart_ptr< T >::refcount.

template<class T>
loose_smart_ptr< T >::operator smart_ptr< value_type > (  )  [inline]

Definition at line 258 of file _smart_ptr.h.

References loose_smart_ptr< T >::obj, and loose_smart_ptr< T >::refcount.

template<class T>
loose_smart_ptr< T >::operator smart_ptr< const value_type > (  )  [inline]

Definition at line 263 of file _smart_ptr.h.

References loose_smart_ptr< T >::obj, and loose_smart_ptr< T >::refcount.

template<class T>
const count_type& loose_smart_ptr< T >::count (  )  const [inline]

Returns number of instances.

Definition at line 269 of file _smart_ptr.h.

References loose_smart_ptr< T >::refcount.

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

Definition at line 271 of file _smart_ptr.h.

References loose_smart_ptr< T >::refcount, and weak_reference_counter::unique().

template<class T>
reference loose_smart_ptr< T >::operator * (  )  const [inline]

Definition at line 273 of file _smart_ptr.h.

References loose_smart_ptr< T >::obj.

template<class T>
pointer loose_smart_ptr< T >::operator-> (  )  const [inline]

Definition at line 275 of file _smart_ptr.h.

References loose_smart_ptr< T >::obj.

template<class T>
pointer loose_smart_ptr< T >::get (  )  const [inline]

Definition at line 277 of file _smart_ptr.h.

References loose_smart_ptr< T >::obj.

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

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

Definition at line 279 of file _smart_ptr.h.

References loose_smart_ptr< T >::obj.


Member Data Documentation

template<class T>
value_type* loose_smart_ptr< T >::obj [private]

Definition at line 243 of file _smart_ptr.h.

Referenced by loose_smart_ptr< T >::get(), loose_smart_ptr< T >::operator *(), loose_smart_ptr< T >::operator smart_ptr< const value_type >(), loose_smart_ptr< T >::operator smart_ptr< value_type >(), loose_smart_ptr< T >::operator!(), loose_smart_ptr< T >::operator->(), and loose_smart_ptr< T >::reset().

template<class T>
weak_reference_counter loose_smart_ptr< T >::refcount [private]

Definition at line 244 of file _smart_ptr.h.

Referenced by loose_smart_ptr< T >::count(), loose_smart_ptr< T >::operator smart_ptr< const value_type >(), loose_smart_ptr< T >::operator smart_ptr< value_type >(), loose_smart_ptr< T >::reset(), and loose_smart_ptr< T >::unique().


The documentation for this class was generated from the following file:
Generated on Sun Oct 28 01:59:33 2007 for ETL by  doxygen 1.5.3-20071008