#include <Atomic_Op_T.h>
Collaboration diagram for ACE_Atomic_Op_Ex< ACE_LOCK, TYPE >:

Public Member Functions | |
| ACE_Atomic_Op_Ex (ACE_LOCK &mtx) | |
| Initialize <value_> to 0. | |
| ACE_Atomic_Op_Ex (ACE_LOCK &mtx, const TYPE &c) | |
| Initialize <value_> to c. | |
| TYPE | operator++ (void) |
| Atomically pre-increment <value_>. | |
| TYPE | operator++ (int) |
| Atomically post-increment <value_>. | |
| TYPE | operator+= (const TYPE &rhs) |
| Atomically increment <value_> by rhs. | |
| TYPE | operator-- (void) |
| Atomically pre-decrement <value_>. | |
| TYPE | operator-- (int) |
| Atomically post-decrement <value_>. | |
| TYPE | operator-= (const TYPE &rhs) |
| Atomically decrement <value_> by rhs. | |
| bool | operator== (const TYPE &rhs) const |
| Atomically compare <value_> with rhs. | |
| bool | operator!= (const TYPE &rhs) const |
| Atomically compare <value_> with rhs. | |
| bool | operator>= (const TYPE &rhs) const |
| Atomically check if <value_> greater than or equal to rhs. | |
| bool | operator> (const TYPE &rhs) const |
| Atomically check if <value_> greater than rhs. | |
| bool | operator<= (const TYPE &rhs) const |
| Atomically check if <value_> less than or equal to rhs. | |
| bool | operator< (const TYPE &rhs) const |
| Atomically check if <value_> less than rhs. | |
| ACE_Atomic_Op_Ex< ACE_LOCK, TYPE > & | operator= (const TYPE &rhs) |
| Atomically assign rhs to <value_>. | |
| ACE_Atomic_Op_Ex< ACE_LOCK, TYPE > & | operator= (const ACE_Atomic_Op_Ex< ACE_LOCK, TYPE > &rhs) |
| Atomically assign <rhs> to <value_>. | |
| TYPE | value (void) const |
| Explicitly return <value_>. | |
| void | dump (void) const |
| Dump the state of an object. | |
| ACE_Atomic_Op_Ex (const ACE_Atomic_Op_Ex< ACE_LOCK, TYPE > &) | |
| Manage copying... | |
| ACE_LOCK & | mutex (void) |
| TYPE & | value_i (void) |
Private Attributes | |
| ACE_LOCK & | mutex_ |
| Type of synchronization mechanism. | |
| TYPE | value_ |
| Current object decorated by the atomic op. | |
This class is described in an article in the July/August 1994 issue of the C++ Report magazine. It implements a templatized version of the Decorator pattern from the GoF book.
ACE_Atomic_Op_Ex objects must be constructed with a reference to an existing lock. A single lock can be shared between multiple ACE_Atomic_Op_Ex objects. If you do not require this ability consider using the ACE_Atomic_Op class instead, which may be able to take advantage of platform-specific optimisations to provide atomic operations without requiring a lock.
|
||||||||||
|
Initialize <value_> to 0.
|
|
||||||||||||||||
|
Initialize <value_> to c.
|
|
||||||||||
|
Manage copying...
|
|
||||||||||
|
Dump the state of an object.
|
|
||||||||||
|
Returns a reference to the underlying <ace_lock>. This makes it possible to acquire the lock explicitly, which can be useful in some cases if you instantiate the <ace_atomic_op_ex> with an <ace_recursive_mutex> or <ace_process_mutex>.
|
|
||||||||||
|
Atomically compare <value_> with rhs.
|
|
||||||||||
|
Atomically post-increment <value_>.
|
|
||||||||||
|
Atomically pre-increment <value_>.
|
|
||||||||||
|
Atomically increment <value_> by rhs.
|
|
||||||||||
|
Atomically post-decrement <value_>.
|
|
||||||||||
|
Atomically pre-decrement <value_>.
|
|
||||||||||
|
Atomically decrement <value_> by rhs.
|
|
||||||||||
|
Atomically check if <value_> less than rhs.
|
|
||||||||||
|
Atomically check if <value_> less than or equal to rhs.
|
|
||||||||||
|
Atomically assign <rhs> to <value_>.
|
|
||||||||||
|
Atomically assign rhs to <value_>.
|
|
||||||||||
|
Atomically compare <value_> with rhs.
|
|
||||||||||
|
Atomically check if <value_> greater than rhs.
|
|
||||||||||
|
Atomically check if <value_> greater than or equal to rhs.
|
|
||||||||||
|
Explicitly return <value_>.
|
|
||||||||||
|
Explicitly return <value_> (by reference). This gives the user full, unrestricted access to the underlying value. This method will usually be used in conjunction with explicit access to the lock. Use with care ;-) |
|
|||||
|
Type of synchronization mechanism.
|
|
|||||
|
Current object decorated by the atomic op.
|
1.3.9.1