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

Default implementation of IMappingAdapterFactory. More...

#include <DefaultMappingAdapterFactory.h>

Inheritance diagram for DefaultMappingAdapterFactory:
Collaboration diagram for DefaultMappingAdapterFactory:

Public Member Functions

std::shared_ptr< IMappingDatabaseAdaptercreate (const std::string &instanceName, const std::string &jsonFilePath, std::shared_ptr< IParamMappingSource > loader) const override
 Creates a mapping database adapter from a JSON file.
 
- Public Member Functions inherited from IMappingAdapterFactory
virtual ~IMappingAdapterFactory ()=default
 

Detailed Description

Default implementation of IMappingAdapterFactory.

This factory is meant as a convenient, ready-to-use adapter builder for the common case:

Definition at line 31 of file DefaultMappingAdapterFactory.h.

Member Function Documentation

◆ create()

std::shared_ptr< IMappingDatabaseAdapter > DefaultMappingAdapterFactory::create ( const std::string &  instanceName,
const std::string &  jsonFilePath,
std::shared_ptr< IParamMappingSource loader 
) const
inlineoverridevirtual

Creates a mapping database adapter from a JSON file.

Parameters
instanceNameLogical name for the mapping database.
jsonFilePathPath to the JSON (or JSON-like) mapping file.
loaderOptional parameter loader; if null, a JsonParamMappingAdapter with a JSONParser will be constructed.
Returns
Shared pointer to an IMappingDatabaseAdapter wrapping a MappingDatabase instance.
Exceptions
std::runtime_errorif the MappingDatabase cannot be created.

Implements IMappingAdapterFactory.

Definition at line 47 of file DefaultMappingAdapterFactory.h.


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