15 explicit Scope(gsl::not_null<IStore*> store) : m_store(store) {}
18 for (
auto const id : m_ids) { m_store->remove_tweakable(
id); }
21 void add_tweakable(std::string_view
const id, gsl::not_null<ITweakable*> tweakable) { m_store->add_tweakable(
id, tweakable); }
24 gsl::not_null<IStore*> m_store;
25 std::vector<std::string_view> m_ids{};
RAII wrapper to erase added IDs on destruction.
Definition scope.hpp:7
auto operator=(Scope &&) -> Scope &=default
auto operator=(Scope const &) -> Scope &=delete
~Scope()
Definition scope.hpp:17
Scope(gsl::not_null< IStore * > store)
Definition scope.hpp:15
void add_tweakable(std::string_view const id, gsl::not_null< ITweakable * > tweakable)
Definition scope.hpp:21
Scope(Scope const &)=delete