Definition for a synchronised refcountable interface. More...
#include <Configurable_Refcount.h>

Public Types | |
| enum | Lock_Type { TAO_NULL_LOCK, TAO_THREAD_LOCK } |
Public Member Functions | |
| TAO_Configurable_Refcount (Lock_Type type=TAO_THREAD_LOCK, unsigned long value=1) | |
| unsigned long | increment (void) |
| unsigned long | decrement (void) |
| unsigned long | value (void) const |
Private Attributes | |
| Lock_Type | type_ |
| ACE_Atomic_Op < ACE_SYNCH_NULL_MUTEX, unsigned long > | null_refcount_ |
| ACE_Atomic_Op< TAO_SYNCH_MUTEX, unsigned long > | mutex_refcount_ |
Definition for a synchronised refcountable interface.
Definition at line 37 of file Configurable_Refcount.h.
Definition at line 40 of file Configurable_Refcount.h.
00041 { 00042 TAO_NULL_LOCK, 00043 TAO_THREAD_LOCK 00044 };
| TAO_Configurable_Refcount::TAO_Configurable_Refcount | ( | TAO_Configurable_Refcount::Lock_Type | type = TAO_THREAD_LOCK, |
|
| unsigned long | value = 1 | |||
| ) |
Definition at line 7 of file Configurable_Refcount.inl.
00010 : type_ (type), 00011 null_refcount_ (value), 00012 mutex_refcount_ (value) 00013 { 00014 }
| unsigned long TAO_Configurable_Refcount::decrement | ( | void | ) |
Definition at line 30 of file Configurable_Refcount.inl.
00031 { 00032 switch(this->type_) 00033 { 00034 case TAO_NULL_LOCK: 00035 return --this->null_refcount_; 00036 case TAO_THREAD_LOCK: 00037 default: 00038 return --this->mutex_refcount_; 00039 } 00040 }
| unsigned long TAO_Configurable_Refcount::increment | ( | void | ) |
Definition at line 17 of file Configurable_Refcount.inl.
00018 { 00019 switch(this->type_) 00020 { 00021 case TAO_NULL_LOCK: 00022 return this->null_refcount_++; 00023 case TAO_THREAD_LOCK: 00024 default: 00025 return this->mutex_refcount_++; 00026 } 00027 }
| unsigned long TAO_Configurable_Refcount::value | ( | void | ) | const |
Definition at line 43 of file Configurable_Refcount.inl.
00044 { 00045 switch(this->type_) 00046 { 00047 case TAO_NULL_LOCK: 00048 return this->null_refcount_.value (); 00049 case TAO_THREAD_LOCK: 00050 default: 00051 return this->mutex_refcount_.value (); 00052 } 00053 }
ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> TAO_Configurable_Refcount::mutex_refcount_ [private] |
Definition at line 57 of file Configurable_Refcount.h.
ACE_Atomic_Op<ACE_SYNCH_NULL_MUTEX, unsigned long> TAO_Configurable_Refcount::null_refcount_ [private] |
Definition at line 56 of file Configurable_Refcount.h.
Lock_Type TAO_Configurable_Refcount::type_ [private] |
Definition at line 55 of file Configurable_Refcount.h.
1.6.1