ACE_Bound_Ptr_Counter< ACE_LOCK > Class Template ReferenceAn ACE_Bound_Ptr_Counter<ACE_LOCK> object encapsulates an object reference count. More...
Collaboration diagram for ACE_Bound_Ptr_Counter< ACE_LOCK >:
![]()
Detailed Descriptiontemplate<class ACE_LOCK>
An ACE_Bound_Ptr_Counter<ACE_LOCK> object encapsulates an object reference count.
|
ACE_Bound_Ptr_Counter< ACE_LOCK >::ACE_Bound_Ptr_Counter | ( | long | init_obj_ref_count = 0 |
) | [inline] |
ACE_Bound_Ptr_Counter< ACE_LOCK >::~ACE_Bound_Ptr_Counter | ( | void | ) | [inline] |
ACE_Bound_Ptr_Counter< ACE_LOCK > * ACE_Bound_Ptr_Counter< ACE_LOCK >::create_strong | ( | void | ) | [inline, static] |
Create a ACE_Bound_Ptr_Counter<ACE_LOCK> and initialize the reference count to indicate ownership by a strong pointer.
long ACE_Bound_Ptr_Counter< ACE_LOCK >::attach_strong | ( | ACE_Bound_Ptr_Counter< ACE_LOCK > * | counter | ) | [inline, static] |
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.
long ACE_Bound_Ptr_Counter< ACE_LOCK >::detach_strong | ( | ACE_Bound_Ptr_Counter< ACE_LOCK > * | counter | ) | [inline, static] |
Decreases both the object and counter reference counts and deletes whichever has no more references. Returns the new object reference count.
ACE_Bound_Ptr_Counter< ACE_LOCK > * ACE_Bound_Ptr_Counter< ACE_LOCK >::create_weak | ( | void | ) | [inline, static] |
Create a ACE_Bound_Ptr_Counter<ACE_LOCK> and initialize the reference count to indicate no ownership.
void ACE_Bound_Ptr_Counter< ACE_LOCK >::attach_weak | ( | ACE_Bound_Ptr_Counter< ACE_LOCK > * | counter | ) | [inline, static] |
Increase the counter reference count and return argument.
void ACE_Bound_Ptr_Counter< ACE_LOCK >::detach_weak | ( | ACE_Bound_Ptr_Counter< ACE_LOCK > * | counter | ) | [inline, static] |
Decreases the counter reference count and deletes the counter if it has no more references.
bool ACE_Bound_Ptr_Counter< ACE_LOCK >::object_was_deleted | ( | ACE_Bound_Ptr_Counter< ACE_LOCK > * | counter | ) | [inline, static] |
Determine whether the object has been deleted.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Bound_Ptr_Counter< ACE_LOCK > * ACE_Bound_Ptr_Counter< ACE_LOCK >::internal_create | ( | long | init_obj_ref_count | ) | [inline, static, private] |
Allocate a new ACE_Bound_Ptr_Counter<ACE_LOCK> instance, returning NULL if it cannot be created.
ACE_Bound_Ptr_Counter< ACE_LOCK >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
long ACE_Bound_Ptr_Counter< ACE_LOCK >::obj_ref_count_ [private] |
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.
long ACE_Bound_Ptr_Counter< ACE_LOCK >::self_ref_count_ [private] |
Reference count of this counter.
ACE_LOCK ACE_Bound_Ptr_Counter< ACE_LOCK >::lock_ [private] |
Mutex variable to synchronize access to the reference counts.