Health-GPS
1.2.2.0
Global Health Policy Simulation model (Health-GPS)
|
Defines a two step value data type. More...
#include <two_step_value.h>
Public Member Functions | |
TwoStepValue ()=default | |
Initialise a new instance of the TwoStepValue type. More... | |
TwoStepValue (TYPE value) | |
Initialise a new instance of the TwoStepValue type. More... | |
TYPE | value () const |
Gets the current value. More... | |
TYPE | old_value () const |
Gets the previous value. More... | |
void | set_both_values (TYPE new_value) |
Sets both current and previous values to the same value. More... | |
void | set_value (TYPE new_value) |
Sets the current value. More... | |
TYPE | operator() () const |
Gets the current value. More... | |
void | operator= (TYPE new_value) |
Sets the current value. More... | |
TwoStepValue< TYPE > | clone () |
Creates a new instance from this contents. More... | |
Defines a two step value data type.
Holds the current and previous value for algorithms requiring both values.
TYPE | The value type |
|
default |
Initialise a new instance of the TwoStepValue type.
|
inline |
Initialise a new instance of the TwoStepValue type.
value | Current value |
|
inline |
Creates a new instance from this contents.
|
inline |
Gets the previous value.
|
inline |
Gets the current value.
|
inline |
Sets the current value.
new_value | The new value |
|
inline |
Sets both current and previous values to the same value.
new_value | The new value |
|
inline |
Sets the current value.
new_value | The new value |
|
inline |
Gets the current value.