|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
A simple class to track member data changes.
Maintains a monotonic counter that derived classes increment anytime a member datum is changed. This allows for, say, re-initializing automatically on a subsequent call to a function.
Definition at line 26 of file changeable.hpp.
#include <base/changeable.hpp>
Inheritance diagram for mx::base::changeable< _derivedT >:Public Types | |
| typedef uint64_t | changeT |
| The integer type of the counter. | |
Public Member Functions | |
| void | changed () |
| Increment the counter. | |
| changeT | change () |
| Get the value of the counter. | |
| typedef uint64_t mx::base::changeable< _derivedT >::changeT |
The integer type of the counter.
Definition at line 33 of file changeable.hpp.
|
inline |
Get the value of the counter.
Get this at a checkpoint and compare it later to decide if any action should be taken.
Definition at line 56 of file changeable.hpp.
|
inline |
Increment the counter.
Call this function anytime the derived class changes something important.
Definition at line 47 of file changeable.hpp.