1#ifndef MAPPING_DATABASE_PROXY_H
2#define MAPPING_DATABASE_PROXY_H
6#include <unordered_map>
43 static std::shared_ptr<MappingDatabaseProxy>
fromFactory(
46 const std::string& jsonFilePath,
47 std::shared_ptr<IParamMappingSource> loader =
nullptr
59 std::unordered_map<std::string, InterpretedParam>
getParams()
const override;
62 std::optional<InterpretedParam>
getParam(
const std::string& name)
const override;
69 std::shared_ptr<IMappingDatabaseAdapter> adapter_;
Interface for factories creating mapping database adapters.
Interface for read-only access to a mapping database of parameters.
Declares an abstract port for parameter-mapping databases.
Factory interface for building IMappingDatabaseAdapter instances.
Interface for accessing a parameter-mapping database.
Concrete IMappingDatabasePort that delegates to an adapter.
static std::shared_ptr< MappingDatabaseProxy > fromFactory(const IMappingAdapterFactory &factory, const std::string &instanceName, const std::string &jsonFilePath, std::shared_ptr< IParamMappingSource > loader=nullptr)
Factory helper to create a proxy with a given adapter factory.
std::optional< InterpretedParam > getParam(const std::string &name) const override
Retrieves a parameter mapping by name.
std::unordered_map< std::string, InterpretedParam > getParams() const override
Returns all parameters stored in the database.
std::string instanceName() const override
Returns a logical name for this database instance.