cds
2.3.2
|
Sequential non-atomic item counter. More...
#include <cds/opt/options.h>
Public Types | |
typedef size_t | counter_type |
Counter type. | |
Public Member Functions | |
counter_type | value () const |
Returns current value of the counter. | |
operator counter_type () const | |
Same as value() with relaxed memory ordering. | |
counter_type | inc () |
Increments the counter. Semantics: postincrement. | |
counter_type | dec () |
Decrements the counter. Semantics: postdecrement. | |
counter_type | operator++ () |
Preincrement. | |
counter_type | operator++ (int) |
Postincrement. | |
counter_type | operator-- () |
Predecrement. | |
counter_type | operator-- (int) |
Postdecrement. | |
void | reset () |
Resets count to 0. | |
Protected Attributes | |
counter_type | m_nCounter |
Counter. | |
Sequential non-atomic item counter.
This type of opt::item_counter
option is not intended for concurrent containers and may be used only if it is explicitly noted.