The Vish Visualization Shell 0.3
Vish
Classes | Public Member Functions | Protected Attributes | List of all members
MemCore::Counter Class Reference

Base class for thread-safe counting, comes with an exception-safe incrementing/decrementing counter class. More...

#include <elementary/memcore/Counter.hpp>

Inheritance diagram for MemCore::Counter:
Wizt::VCreatorMap

Classes

class  Incrementer
 Exception-safe incrementing/decrementing of a counter. More...
 

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 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

◆ operator()()

counter_t MemCore::Counter::operator() ( ) const
throw (
)
inline

Return the strong reference count, i.e.

how many object keep this object alive.