Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Namespace Members   Compound Members   File Members  

arg::generic_reference Class Reference

Implementation class supporting counted_ptr/uncounted_ptr templates. More...

#include <arg_shared.h>

Class diagram for arg::generic_reference:

arg::typed_reference arg::uncounted_ptr arg::counted_ptr

List of all members.


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.


Detailed Description

Implementation class supporting counted_ptr/uncounted_ptr templates.

Factored code for shared ownership management. This manages the shared body (containing pointer to referenced body and the strong reference count).

Author(s):
Alan Griffiths

Member Typedef Documentation

typedef void (* arg::generic_reference::delete_ftn)(void* pointee)


Member Function Documentation

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]

Increment the strong reference count.

Reimplemented in arg::typed_reference.

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]

Get with pointer to referenced object.

Reimplemented in arg::counted_ptr, and arg::uncounted_ptr.

void * arg::generic_reference::get (const generic_reference & rhs) [inline, static, protected]

Get with pointer to object referenced by rhs.


The documentation for this class was generated from the following file:
Copyright 1999-2000 Alan Griffiths