|
NCBI C++ ToolKit
|
Search Toolkit Book for CAtomicCounter
#include <corelib/ncbicntr.hpp>
Inheritance diagram for CAtomicCounter:Public Types | |
| typedef TNCBIAtomicValue | TValue |
| Alias TValue for TNCBIAtomicValue. More... | |
Public Member Functions | |
| TValue | Get (void) const noexcept |
| Get atomic counter value. More... | |
| void | Set (TValue new_value) noexcept |
| Set atomic counter value. More... | |
| TValue | Add (int delta) noexcept |
| Atomically add value (=delta), and return new counter value. More... | |
Private Member Functions | |
| typedef | NCBI_ATOMIC_TYPE (TValue) TData |
| Define NCBI_COUNTER_ADD if one has not been defined. More... | |
Private Attributes | |
| volatile TData | m_Value |
| Internal counter value. More... | |
Friends | |
| class | CObject |
Define a basic atomic counter.
Provide basic counter operations for an atomic counter represented internally by TNCBIAtomicValue.
Definition at line 70 of file ncbicntr.hpp.