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

Central factory for building concrete IDBNodeProvider objects. More...

#include <DBNodeProviderFactory.h>

Public Types

enum class  Type { DICT , LHA }
 High-level type of node provider. More...
 

Static Public Member Functions

static std::shared_ptr< IDBNodeProvidercreateDBNodeProvider (fs::path src_path)
 Creates an IDBNodeProvider for a given file path.
 

Detailed Description

Central factory for building concrete IDBNodeProvider objects.

DBNodeProviderFactory hides the logic of choosing which provider to use for a given source path. It relies on DBManager::EXTENSIONS to map file extensions to parser families.

Definition at line 28 of file DBNodeProviderFactory.h.

Member Enumeration Documentation

◆ Type

enum class DBNodeProviderFactory::Type
strong

High-level type of node provider.

Currently two families are supported:

  • DICT: dictionary-style formats (JSON / YAML),
  • LHA : LHA / SLHA / FLHA text files.
Enumerator
DICT 
LHA 

Definition at line 37 of file DBNodeProviderFactory.h.

Member Function Documentation

◆ createDBNodeProvider()

std::shared_ptr< IDBNodeProvider > DBNodeProviderFactory::createDBNodeProvider ( fs::path  src_path)
static

Creates an IDBNodeProvider for a given file path.

The extension of src_path is inspected and compared against the extension sets registered in DBManager::EXTENSIONS:

If the extension cannot be recognized, a fatal error is logged.

Parameters
src_pathPath to the source file whose contents should be exposed via an IDBNodeProvider.
Returns
Shared pointer to a concrete IDBNodeProvider.

Definition at line 3 of file DBNodeProviderFactory.cpp.


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