dbp::atomic_counter Class Reference

Atomic counter class. More...

#include <atomic_counter.h>

List of all members.

Public Member Functions

 atomic_counter ()
 Constructor.
 atomic_counter (int value)
 Constructor.
 atomic_counter (const atomic_counter &src)
 Copy constructor.
const atomic_counteroperator= (const atomic_counter &src)
 Assignment operator.
void operator++ ()
 Increment the counter.
void operator-- ()
 Decrement the counter.

Detailed Description

Atomic counter class.

This class represents the one of the synchronization object - the atomic counter. The increments and decrements of the counter are serializable, so you can use the shared counter in the multithreaded environment.


Constructor & Destructor Documentation

dbp::atomic_counter::atomic_counter (  )  [inline]

Constructor.

Initialize the counter with zero.

dbp::atomic_counter::atomic_counter ( int  value  )  [inline]

Constructor.

Initialize the counter with value passed.

Parameters:
value the counter initial value.
dbp::atomic_counter::atomic_counter ( const atomic_counter src  )  [inline]

Copy constructor.

Initialize the counter with value of the other counter.

Parameters:
src the source counter.

The documentation for this class was generated from the following file:

 
Support This Project
SourceForge.net Logo