#include <arg_shared.h>
Class diagram for arg::generic_reference:
Public Members | |||
typedef void (* | delete_ftn )(void* pointee) | ||
Protected Members | |||
void | swap (generic_reference& with) throw () | ||
Swap state with another reference. | |||
generic_reference (void* pointee, delete_ftn do_delete) | |||
Create a reference to pointee & record the delete function. | |||
generic_reference (const generic_reference& rhs) | |||
Copy rhs. | |||
virtual | ~generic_reference () throw () | ||
Destructor. | |||
generic_reference& | operator= (const generic_reference& rhs) | ||
Take a share in what rhs references (delete old if appropriate). | |||
void | increment_strong_references () const | ||
Increment the strong reference count. | |||
void | decrement_strong_references () const | ||
Decrement the strong reference count. | |||
bool | less (void*) const throw () | ||
Compare with pointer to referenced object. | |||
void* | get () const | ||
Get with pointer to referenced object. | |||
Static Protected Members | |||
void* | get (const generic_reference& rhs) | ||
Get with pointer to object referenced by rhs. |
Factored code for shared ownership management. This manages the shared body (containing pointer to referenced body and the strong reference count).
typedef void (* arg::generic_reference::delete_ftn)(void* pointee) |
void arg::generic_reference::swap (generic_reference & with) throw () [protected]
|
Swap state with another reference.
arg::generic_reference::generic_reference (void * pointee, delete_ftn do_delete) [protected]
|
Create a reference to pointee & record the delete function.
arg::generic_reference::generic_reference (const generic_reference & rhs) [protected]
|
Copy rhs.
virtual arg::generic_reference::~generic_reference () throw () [protected, virtual]
|
Destructor.
generic_reference & arg::generic_reference::operator= (const generic_reference & rhs) [protected]
|
Take a share in what rhs references (delete old if appropriate).
void arg::generic_reference::increment_strong_references () const [protected]
|
void arg::generic_reference::decrement_strong_references () const [protected]
|
Decrement the strong reference count.
bool arg::generic_reference::less (void *) const throw () [protected]
|
Compare with pointer to referenced object.
void * arg::generic_reference::get () const [protected]
|
void * arg::generic_reference::get (const generic_reference & rhs) [inline, static, protected]
|
Get with pointer to object referenced by rhs.