Base storage class for values and variables with history.
More...
#include <eagine/value_with_history.hpp>
|
constexpr | value_with_history_storage ()=default |
| Default constructor.
|
|
template<typename... I, typename = std::enable_if_t<sizeof...(I) == N>> |
constexpr | value_with_history_storage (I &&... initial) |
| Initializes the individual revisions of the value.
|
|
constexpr | value_with_history_storage (const T &initial) noexcept |
| Initializes all revisions with the same initial value.
|
|
constexpr auto | get (std::size_t i) const noexcept -> const T & |
| Returns the i-th revision of the stored value (0 = current value).
|
|
void | set (std::size_t i, const T &value) noexcept |
| Sets the i-th revision of the stored value (0 = current value).
|
|
void | make_history () noexcept |
| Move the stored revisions by one, to make place for new value. More...
|
|
void | sync () noexcept |
| Synchronize the historic revisions to the current value. More...
|
|
template<typename T, std::size_t N>
class eagine::value_with_history_storage< T, N >
Base storage class for values and variables with history.
- Template Parameters
-
T | the type of the value |
N | the number of latest historical revisions of the stored value. |
- See also
- value_with_history
- Note
- Do not use this class directly. Use value_with_history or variable_with_history.
◆ make_history()
template<typename T , std::size_t N>
Move the stored revisions by one, to make place for new value.
- See also
- sync
◆ sync()
template<typename T , std::size_t N>
Synchronize the historic revisions to the current value.
- See also
- make_history
The documentation for this class was generated from the following file: