Atomic wrapper for integral and floating point types.
More...
#include <Atomic.hpp>
|
|
using | ValueType = NumberType |
|
| | Atomic (ValueType const value) |
| | Construct a new Atomic object.
|
|
| Atomic (Atomic const &)=delete |
|
| Atomic (Atomic &&)=delete |
|
Atomic & | operator= (Atomic const &)=delete |
|
Atomic & | operator= (Atomic &&)=delete |
| void | add (ValueType const value) |
| | Add a value to the current value.
|
| void | set (ValueType const value) |
| | Update the current value to the new value.
|
| ValueType | value () const |
| | Get the current value.
|
template<SomeNumberType NumberType>
class util::Atomic< NumberType >
Atomic wrapper for integral and floating point types.
◆ Atomic()
template<SomeNumberType NumberType>
Construct a new Atomic object.
- Parameters
-
◆ add()
template<SomeNumberType NumberType>
| void util::Atomic< NumberType >::add |
( |
ValueType const | value | ) |
|
|
inline |
Add a value to the current value.
- Parameters
-
◆ set()
template<SomeNumberType NumberType>
| void util::Atomic< NumberType >::set |
( |
ValueType const | value | ) |
|
|
inline |
Update the current value to the new value.
- Parameters
-
◆ value()
template<SomeNumberType NumberType>
Get the current value.
- Returns
- The current value
The documentation for this class was generated from the following file: