OpendTect
6.6
|
Updates a variable when changes occur. More...
Public Member Functions | |
ChangeTracker (bool &c) | |
ChangeTracker (bool &c, unsigned int &ci) | |
ChangeTracker (bool *c=0) | |
ChangeTracker (unsigned int &c) | |
ChangeTracker (unsigned int *c) | |
const bool & | boolVar () const |
Don't call if !hasBoolVar() More... | |
unsigned int | changeId () const |
bool | hasBoolVar () const |
bool | hasIntVar () const |
const unsigned int & | intVar () const |
Don't call if !hasIntVar() More... | |
bool | isChanged () const |
bool | set (const char *&, const char *&) |
specialisation for C-strings More... | |
template<class T , class U > | |
bool | set (const T &oldval, const U &newval) |
returns wether this value is changed More... | |
void | setChanged (bool yn=true) |
void | setChangeId (unsigned int c) |
void | setVar (bool &m) |
void | setVar (bool *m) |
void | setVar (unsigned int &m) |
void | setVar (unsigned int *m) |
template<class T , class U > | |
bool | update (T &val, const U &newval) |
Changes and returns wether this value is changed. More... | |
Protected Attributes | |
bool * | chgd_ |
unsigned int * | chgid_ |
Updates a variable when changes occur.
Use if you need to keep track of whether a variable changes when it is assigned to another variable. Example: a 'not saved' flag in a UI. Also facilitates giving unique change stamps.
<>
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Don't call if !hasBoolVar()
|
inline |
|
inline |
|
inline |
|
inline |
Don't call if !hasIntVar()
|
inline |
|
inline |
specialisation for C-strings
|
inline |
returns wether this value is changed
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Changes and returns wether this value is changed.
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022