#include <AtomicCounter.h++>
Public Member Functions | |
| AtomicCounter (int32_t value=0) throw () | |
| Construct a new AtomicCounter with the given initial value. | |
| ~AtomicCounter () throw () | |
| Destructor. | |
| AtomicCounter (const AtomicCounter &other) throw () | |
| Copy constructor. | |
| AtomicCounter & | operator= (const AtomicCounter &other) throw () |
| Assignment operator. | |
| int32_t | operator++ () throw () |
| Increment the counter (prefix). | |
| int32_t | operator++ (int) throw () |
| Increment the counter (postfix). | |
| int32_t | operator-- () throw () |
| Decrement the counter (prefix). | |
| int32_t | operator-- (int) throw () |
| Decrement the counter (postfix). | |
| int32_t | operator+= (int32_t delta) throw () |
| Add a value to the counter. | |
| int32_t | operator-= (int32_t delta) throw () |
| Subtract a value from the counter. | |
| int32_t | operator+ (int32_t delta) const throw () |
| Compute the sum of the counter and a value. | |
| int32_t | operator- (int32_t delta) const throw () |
| Compute the difference between the counter and a value. | |
| int32_t | operator= (int32_t value) throw () |
| Assign a new value to the counter. | |
| int32_t | set (int32_t value) throw () |
| Assign a new value to the counter, returning the new value. | |
| int32_t | swap (int32_t value) throw () |
| Assign a new value to the counter, returning the previous value. | |
| int32_t | testAndSet (int32_t value, int32_t comparand) throw () |
| Test and set the counter value. | |
| int32_t | get () const throw () |
| Get the current value of the counter. | |
| operator int32_t () const throw () | |
| Cast operator. | |
| AtomicCounter | ( | int32_t | value = 0 |
) | throw () |
| ~AtomicCounter | ( | ) | throw () |
Destructor.
| AtomicCounter | ( | const AtomicCounter & | other | ) | throw () |
Copy constructor.
| int32_t get | ( | ) | const throw () |
Get the current value of the counter.
| operator int32_t | ( | ) | const throw () [inline] |
Cast operator.
| int32_t operator+ | ( | int32_t | delta | ) | const throw () |
Compute the sum of the counter and a value.
| int32_t operator++ | ( | int | ) | throw () |
Increment the counter (postfix).
| int32_t operator++ | ( | ) | throw () |
Increment the counter (prefix).
| int32_t operator+= | ( | int32_t | delta | ) | throw () |
Add a value to the counter.
| int32_t operator- | ( | int32_t | delta | ) | const throw () |
Compute the difference between the counter and a value.
| int32_t operator-- | ( | int | ) | throw () |
Decrement the counter (postfix).
| int32_t operator-- | ( | ) | throw () |
Decrement the counter (prefix).
| int32_t operator-= | ( | int32_t | delta | ) | throw () |
Subtract a value from the counter.
| int32_t operator= | ( | int32_t | value | ) | throw () |
Assign a new value to the counter.
| AtomicCounter & operator= | ( | const AtomicCounter & | other | ) | throw () |
Assignment operator.
| int32_t set | ( | int32_t | value | ) | throw () |
Assign a new value to the counter, returning the new value.
| int32_t swap | ( | int32_t | value | ) | throw () |
Assign a new value to the counter, returning the previous value.
| int32_t testAndSet | ( | int32_t | value, | |
| int32_t | comparand | |||
| ) | throw () |
Test and set the counter value.
| comparand | The value to compare the counter to. | |
| value | The value to set the counter to, if the current value is equal to the comparand. |
1.5.9