Base class for thread-safe counting, comes with an exception-safe incrementing/decrementing counter class.
More...
#include </home/werner/origo/vish/memcore/Counter.hpp>
List of all members.
Classes
Public Member Functions
-
Counter () throw ()
- Initialize counter to zero.
- counter_t operator() () const throw ()
- Return the strong reference count, i.e.
-
void operator++ () throw ()
- increment the count
-
bool operator-- () throw ()
- decrement the count, returns true if it is zero after decrement
Protected Types
Protected Member Functions
-
volatile counter_t * counter_ptr () throw ()
Static Protected Member Functions
-
static mutex & counter_mutex () throw ()
Protected Attributes
-
volatile counter_t value
- The count value.
Detailed Description
Base class for thread-safe counting, comes with an exception-safe incrementing/decrementing counter class.
Member Function Documentation
counter_t MemCore::Counter::operator() |
( |
| ) |
const throw () [inline] |
Return the strong reference count, i.e.
how many object keep this object alive.
The documentation for this class was generated from the following files:
- memcore/Counter.hpp
- memcore/Counter.cpp