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

Factory interface for building IMappingDatabaseAdapter instances. More...

#include <IMappingAdapterFactory.h>

Inheritance diagram for IMappingAdapterFactory:

Public Member Functions

virtual ~IMappingAdapterFactory ()=default
 
virtual std::shared_ptr< IMappingDatabaseAdaptercreate (const std::string &instanceName, const std::string &jsonFilePath, std::shared_ptr< IParamMappingSource > loader) const =0
 Creates a mapping database adapter from an underlying JSON-like file.
 

Detailed Description

Factory interface for building IMappingDatabaseAdapter instances.

A concrete factory typically:

Example implementation:

Definition at line 31 of file IMappingAdapterFactory.h.

Constructor & Destructor Documentation

◆ ~IMappingAdapterFactory()

virtual IMappingAdapterFactory::~IMappingAdapterFactory ( )
virtualdefault

Member Function Documentation

◆ create()

virtual std::shared_ptr< IMappingDatabaseAdapter > IMappingAdapterFactory::create ( const std::string &  instanceName,
const std::string &  jsonFilePath,
std::shared_ptr< IParamMappingSource loader 
) const
pure virtual

Creates a mapping database adapter from an underlying JSON-like file.

Parameters
instanceNameHuman-readable name for the mapping database instance.
jsonFilePathPath to the JSON (or JSON-like) file containing parameter mapping definitions.
loaderOptional mapping source responsible for reading and interpreting the file. If null, the concrete factory is expected to instantiate a sensible default (e.g. JsonParamMappingAdapter + JSONParser).
Returns
Shared pointer to a fully-initialized IMappingDatabaseAdapter.
Exceptions
std::runtime_errorif the underlying database or adapter cannot be created or initialized.

Implemented in DefaultMappingAdapterFactory.


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