ug4
|
Class used to identify a state of adaption of a grid, approx-space, ... More...
#include <revision_counter.h>
Public Member Functions | |
bool | invalid () const |
returns if state is invalid More... | |
void | invalidate () |
invalidates state More... | |
const void * | obj () const |
returns the associated object More... | |
bool | operator!= (const RevisionCounter &rhs) const |
compare two states More... | |
RevisionCounter & | operator++ () |
increase state (prefix) More... | |
RevisionCounter | operator++ (int) |
increase state (postfix) More... | |
bool | operator< (const RevisionCounter &rhs) const |
compare two states More... | |
bool | operator== (const RevisionCounter &rhs) const |
compare two states More... | |
bool | operator> (const RevisionCounter &rhs) const |
compare two states More... | |
RevisionCounter () | |
constructor (with invalid state initialization) More... | |
template<typename T > | |
RevisionCounter (const T *pObj) | |
constructor (with valid state initialization) More... | |
RevisionCounter (const void *pObj) | |
constructor (with valid state initialization) More... | |
bool | valid () const |
returns if state is valid More... | |
Protected Attributes | |
uint64 | m_cnt |
state counter (0 = invalid) More... | |
const void * | m_pObj |
associated object More... | |
Class used to identify a state of adaption of a grid, approx-space, ...
This class is used as a state counter of an object. E.g., this is very useful to track the state of an adaptive multigrid. Based on this counter reinitialization of dependent structures can be triggered, that should only be reinitialized when actually used again (and not on every state change
NOTE: the current implementation allows only std::numeric_limits<unit64>::max() states (approx 10^20 states), which should be pretty enough for most considered uses. If this is not enough a different implementation, handling counter overflow, should be used. (However, if the state is altered every nano-second, the overflow will appear after more than 3000 years)
|
inline |
constructor (with invalid state initialization)
|
inline |
constructor (with valid state initialization)
|
inline |
constructor (with valid state initialization)
|
inline |
|
inline |
returns the associated object
References m_pObj.
Referenced by ug::StdTransfer< TDomain, TAlgebra >::remove_outdated().
|
inline |
compare two states
|
inline |
|
inline |
increase state (postfix)
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
state counter (0 = invalid)
Referenced by invalidate(), operator++(), operator<(), operator==(), operator>(), and valid().
|
protected |
associated object
Referenced by invalidate(), obj(), operator<(), operator==(), operator>(), and valid().