Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
DefaultMappingDatabaseAdapter Class Reference

Default implementation of IMappingDatabaseAdapter. More...

#include <DefaultMappingDatabaseAdapter.h>

Inheritance diagram for DefaultMappingDatabaseAdapter:
Collaboration diagram for DefaultMappingDatabaseAdapter:

Public Member Functions

 DefaultMappingDatabaseAdapter (std::string instanceName, std::shared_ptr< MappingDatabase > db)
 Constructs an adapter around a MappingDatabase instance.
 
std::unordered_map< std::string, InterpretedParamgetParams () const override
 Returns the full parameter map from the backing database.
 
std::optional< InterpretedParamgetParam (const std::string &name) const override
 Returns a single parameter mapping by name, if present.
 
std::string instanceName () const override
 Returns the logical instance name of this adapter.
 
- Public Member Functions inherited from IMappingDatabaseAdapter
virtual ~IMappingDatabaseAdapter ()=default
 

Detailed Description

Default implementation of IMappingDatabaseAdapter.

It wraps a MappingDatabase and:

  • delegates getParams() directly,
  • implements getParam(name) as a lookup in the full map,
  • exposes an instanceName() string for higher-level identification.

Definition at line 26 of file DefaultMappingDatabaseAdapter.h.

Constructor & Destructor Documentation

◆ DefaultMappingDatabaseAdapter()

DefaultMappingDatabaseAdapter::DefaultMappingDatabaseAdapter ( std::string  instanceName,
std::shared_ptr< MappingDatabase db 
)
inlineexplicit

Constructs an adapter around a MappingDatabase instance.

Parameters
instanceNameHuman-readable name for this mapping instance.
dbShared pointer to the underlying MappingDatabase.

Definition at line 34 of file DefaultMappingDatabaseAdapter.h.

Member Function Documentation

◆ getParam()

std::optional< InterpretedParam > DefaultMappingDatabaseAdapter::getParam ( const std::string &  name) const
inlineoverridevirtual

Returns a single parameter mapping by name, if present.

Parameters
nameParameter name.
Returns
Optional InterpretedParam, std::nullopt if not found.

Implements IMappingDatabaseAdapter.

Definition at line 53 of file DefaultMappingDatabaseAdapter.h.

◆ getParams()

std::unordered_map< std::string, InterpretedParam > DefaultMappingDatabaseAdapter::getParams ( ) const
inlineoverridevirtual

Returns the full parameter map from the backing database.

Implements IMappingDatabaseAdapter.

Definition at line 42 of file DefaultMappingDatabaseAdapter.h.

◆ instanceName()

std::string DefaultMappingDatabaseAdapter::instanceName ( ) const
inlineoverridevirtual

Returns the logical instance name of this adapter.

Implements IMappingDatabaseAdapter.

Definition at line 62 of file DefaultMappingDatabaseAdapter.h.


The documentation for this class was generated from the following file: