memento_pattern::Memento

class Memento

The Memento class stores the state of the Originator.

Public Functions

inline explicit Memento(const std::string &state)

Constructor to initialize the Memento with a state.

Parameters:

state – The state to save.

inline std::string getState() const

Retrieves the saved state.

Returns:

The saved state as a string.