#include <Refcounted_Auto_Ptr.h>
Collaboration diagram for ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >:
Private Member Functions | |
X * | release (void) |
Sets the pointer value to 0 and returns its old value. | |
void | reset (X *p=0) |
X * | get (void) const |
Get the pointer value. | |
int | count (void) const |
Get the reference count value. | |
int | null (void) const |
Allows us to check for NULL on all ACE_Refcounted_Auto_Ptr objects. | |
ACE_Refcounted_Auto_Ptr_Rep (X *p=0) | |
~ACE_Refcounted_Auto_Ptr_Rep (void) | |
Static Private Member Functions | |
static ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > * | internal_create (X *p) |
static ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > * | create (X *p) |
static ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > * | attach (ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > *&rep) |
static void | detach (ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > *&rep) |
static void | assign (ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > *&rep, ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > *new_rep) |
Private Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
ACE_Auto_Basic_Ptr< X > | ptr_ |
Pointer to the result. | |
int | ref_count_ |
Reference count. | |
ACE_LOCK | lock_ |
Synchronization variable for the MT_SAFE <ACE_Hash_Map_Manager_Ex>. | |
Friends | |
class | ACE_Refcounted_Auto_Ptr< X, ACE_LOCK > |
ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::ACE_Refcounted_Auto_Ptr_Rep | ( | X * | p = 0 |
) | [inline, private] |
ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::~ACE_Refcounted_Auto_Ptr_Rep | ( | void | ) | [inline, private] |
void ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::assign | ( | ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > *& | rep, | |
ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > * | new_rep | |||
) | [inline, static, private] |
Decreases the rep's reference count and and deletes rep if there are no more references to rep. Then assigns new_rep to rep.
Precondition (rep != 0 && new_rep != 0)
ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > * ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::attach | ( | ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > *& | rep | ) | [inline, static, private] |
Increase the reference count and return argument. Uses the attribute "ace_lock_" to synchronize reference count updating.
Precondition (rep != 0).
ACE_BEGIN_VERSIONED_NAMESPACE_DECL int ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::count | ( | void | ) | const [inline, private] |
Get the reference count value.
ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > * ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::create | ( | X * | p | ) | [inline, static, private] |
Create a ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> and initialize the reference count.
void ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::detach | ( | ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > *& | rep | ) | [inline, static, private] |
Decreases the reference count and and deletes rep if there are no more references to rep.
Precondition (rep != 0)
X * ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::get | ( | void | ) | const [inline, private] |
Get the pointer value.
ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > * ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::internal_create | ( | X * | p | ) | [inline, static, private] |
Allocate a new ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> instance, returning NULL if it cannot be created.
int ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::null | ( | void | ) | const [inline, private] |
Allows us to check for NULL on all ACE_Refcounted_Auto_Ptr objects.
X * ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::release | ( | void | ) | [inline, private] |
Sets the pointer value to 0 and returns its old value.
void ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::reset | ( | X * | p = 0 |
) | [inline, private] |
Invokes delete on the previous pointer value and then sets the pointer value to the specified value.
friend class ACE_Refcounted_Auto_Ptr< X, ACE_LOCK > [friend] |
ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::ACE_ALLOC_HOOK_DECLARE [private] |
Declare the dynamic allocation hooks.
ACE_LOCK ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::lock_ [mutable, private] |
Synchronization variable for the MT_SAFE <ACE_Hash_Map_Manager_Ex>.
ACE_Auto_Basic_Ptr<X> ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::ptr_ [private] |
Pointer to the result.
int ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK >::ref_count_ [private] |
Reference count.