Smart Pointers library
[Libraries]


Detailed Description

Created: 7th July 2006 Updated: 14th January 2007.

This library provides .


Classes

class  interface_ptr
 [DEPRECATED] Manages a COM interface pointer, ensuring that it is released More...
class  proxy_ptr
 This class emulates a pointer in all respects, and is useful as a generic code testing tool, and is simply an aid to self-documentation. More...
class  ref_ptr
 This class provides RAII-safe handling of reference-counted interfaces (RCIs). More...
class  scoped_handle
 Provides automated scope-based cleanup of arbitrary resource types without any memory allocation required to implement the generic support. More...
class  shared_ptr
 This class enables sharing of arbitrary types. More...

Functions

template<typename T>
T * get_ptr (proxy_ptr< T > const &p)
 get_ptr shim
template<typename I>
void add_reference (I *pi)
 Control shim for adding a reference on a reference-counted interface (RCI).
template<typename I>
void release_reference (I *pi)
 Control shim for releasing a reference on a reference-counted interface (RCI).
template<typename T, typename I, typename U>
bool is_empty (ref_ptr< T, I, U > const &p)
 is_empty shim
template<typename T, typename I, typename U>
T * get_ptr (ref_ptr< T, I, U > const &p)
 get_ptr shim
template<typename S, typename T, typename I, typename U>
S & operator<< (S &s, ref_ptr< T, I, U > const &p)
 Insertion operator shim.
template<typename T>
T * get_ptr (shared_ptr< T > const &p)
 get_ptr shim
template<typename S, typename T>
S & operator<< (S &s, shared_ptr< T > const &p)
 Insertion operator shim.


Function Documentation

void stlsoft::add_reference ( I *  pi  )  [inline]

Control shim for adding a reference on a reference-counted interface (RCI).

Note:
The generic shim expects the RCI to have a method named AddRef(), which has either no parameters, or has all default parameters

The behaviour of the ref_ptr is undefined if this method throws an exception

References STLSOFT_ASSERT.

Referenced by ref_ptr< T >::ref_ptr().

T* stlsoft::get_ptr ( shared_ptr< T > const &  p  )  [inline]

get_ptr shim

References shared_ptr::get().

T* stlsoft::get_ptr ( ref_ptr< T, I, U > const &  p  )  [inline]

get_ptr shim

References ref_ptr::get().

T* stlsoft::get_ptr ( proxy_ptr< T > const &  p  )  [inline]

get_ptr shim

References proxy_ptr::get().

bool stlsoft::is_empty ( ref_ptr< T, I, U > const &  p  )  [inline]

is_empty shim

References ref_ptr::get().

Referenced by message_queue_sequence::empty().

S& stlsoft::operator<< ( S &  s,
shared_ptr< T > const &  p 
) [inline]

Insertion operator shim.

S& stlsoft::operator<< ( S &  s,
ref_ptr< T, I, U > const &  p 
) [inline]

Insertion operator shim.

void stlsoft::release_reference ( I *  pi  )  [inline]

Control shim for releasing a reference on a reference-counted interface (RCI).

Note:
The generic shim expects the RCI to have a method named Release(), which has either no parameters, or has all default parameters

The behaviour of the ref_ptr is undefined if this method throws an exception

References STLSOFT_ASSERT.

Referenced by ref_ptr< T >::close(), and ref_ptr< T >::~ref_ptr().


Generated on Thu Jun 10 08:58:18 2010 for STLSoft by  doxygen 1.5.6