shared_ptr.h File Reference

#include "rutz/atomic.h"
#include "rutz/traits.h"

Include dependency graph for shared_ptr.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  rutz
namespace  rutz::shared_ptr_aux

Classes

class  rutz::shared_ptr< T >
 A thread-safe smart pointer with reference counted copy semantics. More...

Typedefs

typedef void( rutz::shared_ptr_aux::ptr_check_function )(const void *)
 Function type for checking whether a given pointer is allowed to be used in a shared_ptr.

Functions

rutz::shared_ptr_aux::ptr_check_function * rutz::shared_ptr_aux::set_check_function (ptr_check_function *func)
 Install a particular pointer-checking function.
void rutz::shared_ptr_aux::check_ptr (const void *p)
 Call the current ptr_check_function, if it is non-null, otherwise do nothing.
template<class T, class U>
bool rutz::operator== (const shared_ptr< T > &a, const shared_ptr< U > &b)
 Test whether two shared_ptr's point to the same object.
template<class T, class U>
bool rutz::operator!= (const shared_ptr< T > &a, const shared_ptr< U > &b)
 Test whether two shared_ptr's point to different objects.
template<class T>
shared_ptr< T > rutz::make_shared (T *t)
 A convenience function for making a shared_ptr out of a raw pointer.
template<class Dst, class Src>
shared_ptr< Dst > rutz::dyn_cast (const shared_ptr< Src > &src)
 Do a dynamic cast on a shared ptr.
template<class Dst, class Src>
void rutz::dyn_cast_to_from (shared_ptr< Dst > &dst, const shared_ptr< Src > &src)
 Do a dynamic cast on a shared ptr.
template<class Dst, class Src>
shared_ptr< Dst > rutz::dynCast (const shared_ptr< Src > &src)
 Synonym for dyn_cast.
template<class Dst, class Src>
void rutz::dynCastToFrom (shared_ptr< Dst > &dst, const shared_ptr< Src > &src)
 Synonym for dyn_cast_to_from.


Detailed Description

A thread-safe shared pointer class

Definition in file shared_ptr.h.


The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:52:07 2008 by Doxygen version 1.5.5.