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>
Public Types | |
typedef uint64_t | changeT |
The integer type of the counter. More... | |
Public Member Functions | |
void | changed () |
Increment the counter. More... | |
changeT | change () |
Get the value of the counter. More... | |
typedef uint64_t mx::base::changeable::changeT |
The integer type of the counter.
Definition at line 31 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 53 of file changeable.hpp.
|
inline |
Increment the counter.
Call this function anytime the derived class changes something important.
Definition at line 44 of file changeable.hpp.