NCBI C++ ToolKit
Public Member Functions | List of all members
CAtomicCounter_WithAutoInit Class Reference

Search Toolkit Book for CAtomicCounter_WithAutoInit

CAtomicCounter_WithAutoInit –. More...

#include <corelib/ncbicntr.hpp>

+ Inheritance diagram for CAtomicCounter_WithAutoInit:
+ Collaboration diagram for CAtomicCounter_WithAutoInit:

Public Member Functions

 CAtomicCounter_WithAutoInit (TValue initial_value=0)
 
- Public Member Functions inherited from CAtomicCounter
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...
 

Additional Inherited Members

- Public Types inherited from CAtomicCounter
typedef TNCBIAtomicValue TValue
 Alias TValue for TNCBIAtomicValue. More...
 

Detailed Description

CAtomicCounter_WithAutoInit –.

Define an atomic counter with guaranteed initialization.

CAtomicCounter does not initialize its value if it's not a static object. CAtomicCounter_WithAutoInit automatically calls Set() in its constructor to set the initial value.

Definition at line 119 of file ncbicntr.hpp.


The documentation for this class was generated from the following file:
Modified on Fri Sep 20 14:57:02 2024 by modify_doxy.py rev. 669887