1#ifndef DEFAULTMAPPINGDATABASEADAPTER_H
2#define DEFAULTMAPPINGDATABASEADAPTER_H
35 std::shared_ptr<MappingDatabase> db)
41 std::unordered_map<std::string, InterpretedParam>
43 return db_->getParams();
52 std::optional<InterpretedParam>
53 getParam(
const std::string& name)
const override {
55 if (
auto it = m.find(name); it != m.end())
return it->second;
66 std::shared_ptr<MappingDatabase> db_;
Interface for read-only access to a mapping database of parameters.
In-memory store of parameter mappings loaded from an external file.
Default implementation of IMappingDatabaseAdapter.
std::string instanceName() const override
Returns the logical instance name of this adapter.
std::unordered_map< std::string, InterpretedParam > getParams() const override
Returns the full parameter map from the backing database.
std::optional< InterpretedParam > getParam(const std::string &name) const override
Returns a single parameter mapping by name, if present.
DefaultMappingDatabaseAdapter(std::string instanceName, std::shared_ptr< MappingDatabase > db)
Constructs an adapter around a MappingDatabase instance.
Abstract view of a parameter mapping database.
Hash specialization for SymbolId<Tag>.