dune-fem 2.8.0
|
A counter only present if NDEBUG is not defined. More...
#include <dune/fem/misc/debug.hh>
Public Types | |
typedef CounterImp | CounterType |
integral type for the actual counting | |
Public Member Functions | |
DebugCounter (const CounterType count=0) | |
constructor | |
DebugCounter (const ThisType &other) | |
copy constructor | |
ThisType & | operator++ () |
increment operator | |
ThisType & | operator-- () |
decrement operator | |
bool | operator== (const ThisType &other) |
comparison for equality | |
bool | operator!= (const ThisType &other) |
comparison for inequality | |
Protected Attributes | |
CounterType | count_ |
A counter only present if NDEBUG is not defined.
There are several cases, where we need a counter for debugging purposes that should only be present, if NDEBUG is not defined.
In debug mode, this counter wraps a standard integer type, otherwise its size is zero.
typedef CounterImp Dune::Fem::DebugCounter< CounterImp >::CounterType |
integral type for the actual counting
|
inline |
constructor
[in] | count | value to initialize the counter with (defaults to 0) |
|
inline |
copy constructor
|
inline |
comparison for inequality
Compares to DebugCounters for inequality. If USE_DEBUG_CNT is defined, the result will be true.
[in] | other | DebugCounter to compare this one to |
|
inline |
increment operator
If USE_DEBUG_CNT is not defined, the counter is incremented by 1. Otherwise nothing happens (and the entire call will be removed during oprimization).
|
inline |
decrement operator
If USE_DEBUG_CNT is not defined, the counter is decremented by 1. Otherwise nothing happens (and the entire call will be removed during oprimization).
|
inline |
comparison for equality
Compares to DebugCounters for equality. If USE_DEBUG_CNT is defined, the result will be true.
[in] | other | DebugCounter to compare this one to |
|
protected |