|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Abstract interface for memento-like management of BlockAccessor states. More...
#include <IDBMemento.h>

Public Member Functions | |
| virtual | ~IDBMemento ()=default |
| Virtual destructor for proper polymorphic cleanup. | |
| virtual void | takeSnapshot (std::shared_ptr< BlockAccessor > blocks)=0 |
| Takes a snapshot of the given BlockAccessor. | |
| virtual void | restore (std::size_t n_steps=1)=0 |
| Restores the state n_steps snapshots back. | |
| virtual void | print_snapshot_content (std::size_t n=0)=0 |
| Prints the content of a stored snapshot. | |
| virtual std::size_t | stack_size ()=0 |
| Returns the number of snapshots currently stored. | |
Abstract interface for memento-like management of BlockAccessor states.
This interface provides a minimal set of operations to:
It is intended to be used by higher-level components such as MemoryManager to manage reversible changes to parameter blocks.
Definition at line 36 of file IDBMemento.h.
|
virtualdefault |
Virtual destructor for proper polymorphic cleanup.
|
pure virtual |
Prints the content of a stored snapshot.
Mainly intended for debugging. The exact format is implementation- dependent. If n exceeds the number of snapshots, behavior is implementation-defined (often using the most recent snapshot).
| n | Index of the snapshot to print (0 can mean most recent). |
|
pure virtual |
Restores the state n_steps snapshots back.
Implementations typically:
If n_steps exceeds the number of stored snapshots, behavior is implementation-defined (often a no-op or clamped restore).
| n_steps | Number of snapshots to roll back (default 1). |
|
pure virtual |
Returns the number of snapshots currently stored.
Implemented in DBMemento.
|
pure virtual |
Takes a snapshot of the given BlockAccessor.
The implementation decides whether to deep-copy the data or only capture references. In typical usage (e.g. DBMemento), a deep copy is taken so that later modifications do not affect the stored state.
| blocks | Shared pointer to the BlockAccessor to snapshot. |
Implemented in DBMemento.