NCBI C++ ToolKit
|
Search Toolkit Book for CAtomicCounter
#include <corelib/ncbicntr.hpp>
Public Types | |
typedef TNCBIAtomicValue | TValue |
Alias TValue for TNCBIAtomicValue. More... | |
Public Member Functions | |
TValue | Get (void) const THROWS_NONE |
Get atomic counter value. More... | |
void | Set (TValue new_value) THROWS_NONE |
Set atomic counter value. More... | |
TValue | Add (int delta) THROWS_NONE |
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.