rutz::shared_ptr_aux Namespace Reference


Typedefs

typedef void( 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_functionset_check_function (ptr_check_function *func)
 Install a particular pointer-checking function.
void check_ptr (const void *p)
 Call the current ptr_check_function, if it is non-null, otherwise do nothing.


Function Documentation

ptr_check_function * rutz::shared_ptr_aux::set_check_function ( ptr_check_function *  func  ) 

Install a particular pointer-checking function.

The ptr_check_function is expected to abort or throw an exception if it is passed a pointer that it considers invalid, otherwise it does nothing. set_check_function() returns a pointer to the previously-installed checking function, so that it is possible to save and later restore the previous value.

Definition at line 44 of file shared_ptr.cc.


The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Mon Feb 11 05:09:25 2008 by Doxygen version 1.5.2.