#include <Bound_Ptr.h>
Collaboration diagram for ACE_Bound_Ptr_Counter:
Public Methods | |
ACE_Bound_Ptr_Counter (int init_obj_ref_count=0) | |
~ACE_Bound_Ptr_Counter (void) | |
Static Public Methods | |
ACE_Bound_Ptr_Counter< ACE_LOCK > * | create_strong (void) |
Create a ACE_Bound_Ptr_Counter<ACE_LOCK> and initialize the reference count to indicate ownership by a strong pointer. More... | |
int | attach_strong (ACE_Bound_Ptr_Counter< ACE_LOCK > *counter) |
Increase both the object and counter reference counts and return the new object reference count. A return value of -1 indicates that the object has already been destroyed. More... | |
int | detach_strong (ACE_Bound_Ptr_Counter< ACE_LOCK > *counter) |
Decreases both the object and counter reference counts and deletes whichever has no more references. Returns the new object reference count. More... | |
ACE_Bound_Ptr_Counter< ACE_LOCK > * | create_weak (void) |
Create a ACE_Bound_Ptr_Counter<ACE_LOCK> and initialize the reference count to indicate no ownership. More... | |
void | attach_weak (ACE_Bound_Ptr_Counter< ACE_LOCK > *counter) |
Increase the counter reference count and return argument. More... | |
void | detach_weak (ACE_Bound_Ptr_Counter< ACE_LOCK > *counter) |
Decreases the counter reference count and deletes the counter if it has no more references. More... | |
int | object_was_deleted (ACE_Bound_Ptr_Counter< ACE_LOCK > *counter) |
Determine whether the object has been deleted. More... | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Static Private Methods | |
ACE_Bound_Ptr_Counter< ACE_LOCK > * | internal_create (int init_obj_ref_count) |
Allocate a new ACE_Bound_Ptr_Counter<ACE_LOCK> instance, returning NULL if it cannot be created. More... | |
Private Attributes | |
int | obj_ref_count_ |
Reference count of underlying object. Is set to -1 once the object has been destroyed to indicate to all weak pointers that it is no longer valid. More... | |
int | self_ref_count_ |
Reference count of this counter. More... | |
ACE_LOCK | lock_ |
Mutex variable to synchronize access to the reference counts. More... |
Do not use this class directly, use ACE_Strong_Bound_Ptr or ACE_Weak_Bound_Ptr instead.
|
|
|
|
|
Increase both the object and counter reference counts and return the new object reference count. A return value of -1 indicates that the object has already been destroyed.
|
|
Increase the counter reference count and return argument.
|
|
Create a ACE_Bound_Ptr_Counter<ACE_LOCK> and initialize the reference count to indicate ownership by a strong pointer.
|
|
Create a ACE_Bound_Ptr_Counter<ACE_LOCK> and initialize the reference count to indicate no ownership.
|
|
Decreases both the object and counter reference counts and deletes whichever has no more references. Returns the new object reference count.
|
|
Decreases the counter reference count and deletes the counter if it has no more references.
|
|
Allocate a new ACE_Bound_Ptr_Counter<ACE_LOCK> instance, returning NULL if it cannot be created.
|
|
Determine whether the object has been deleted.
|
|
Declare the dynamic allocation hooks.
|
|
Mutex variable to synchronize access to the reference counts.
|
|
Reference count of underlying object. Is set to -1 once the object has been destroyed to indicate to all weak pointers that it is no longer valid.
|
|
Reference count of this counter.
|