eq::base::Atomic< T > Class Template Reference
An variable with atomic operations.
More...
#include <atomic.h>
List of all members.
|
Public Member Functions |
| | Atomic (T v=0) |
| | Construct a new atomic variable with an initial value.
|
| | operator T (void) const |
|
void | operator= (T v) |
| | Assign a new value.
|
| T | operator+= (T v) |
| | Atomically add a value and return the new value.
|
| T | operator-= (T v) |
| | Atomically substract a value and return the new value.
|
| T | operator++ (void) |
| | Atomically increment by one and return the new value.
|
| T | operator-- (void) |
| | Atomically decrement by one and return the new value.
|
| T | operator++ (int) |
| | Atomically increment by one and return the old value.
|
| T | operator-- (int) |
| | Atomically decrement by one and return the old value.
|
Detailed Description
template<typename T>
class eq::base::Atomic< T >
An variable with atomic operations.
Definition at line 29 of file atomic.h.
Constructor & Destructor Documentation
Construct a new atomic variable with an initial value.
Definition at line 33 of file atomic.h.
Member Function Documentation
- Returns:
- the current value
Definition at line 38 of file atomic.h.
Atomically add a value and return the new value.
Definition at line 51 of file atomic.h.
Atomically substract a value and return the new value.
Definition at line 57 of file atomic.h.
Atomically increment by one and return the new value.
Definition at line 63 of file atomic.h.
Atomically decrement by one and return the new value.
Definition at line 69 of file atomic.h.
Atomically increment by one and return the old value.
Definition at line 75 of file atomic.h.
Atomically decrement by one and return the old value.
Definition at line 81 of file atomic.h.
The documentation for this class was generated from the following file: