Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
MapperViewSimple< Concrete > Struct Template Reference

Adapter for mappers with simple no-extra-data registration. More...

#include <mapper_hub.hpp>

Inheritance diagram for MapperViewSimple< Concrete >:
Collaboration diagram for MapperViewSimple< Concrete >:

Public Member Functions

std::string canonical (std::string_view s) const override
 Resolve a name or alias to its canonical string.
 
std::vector< std::string > list_all () const override
 List all known canonical strings.
 
bool register_custom (std::string canonical, std::vector< std::string > aliases) override
 Generic custom registration hook.
 
- Public Member Functions inherited from IMapperView
virtual ~IMapperView ()=default
 

Detailed Description

template<class Concrete>
struct MapperViewSimple< Concrete >

Adapter for mappers with simple no-extra-data registration.

The concrete mapper must expose:

  • id_of(std::string_view),
  • str(id),
  • list_all(),
  • register_custom(std::string, std::vector<std::string>).

Definition at line 101 of file mapper_hub.hpp.

Member Function Documentation

◆ canonical()

template<class Concrete >
std::string MapperViewSimple< Concrete >::canonical ( std::string_view  s) const
inlineoverridevirtual

Resolve a name or alias to its canonical string.

Parameters
sInput name or alias.
Returns
Canonical string stored by the mapper.

Implements IMapperView.

Definition at line 102 of file mapper_hub.hpp.

◆ list_all()

template<class Concrete >
std::vector< std::string > MapperViewSimple< Concrete >::list_all ( ) const
inlineoverridevirtual

List all known canonical strings.

Returns
Builtin and custom canonical strings known to the mapper.

Implements IMapperView.

Definition at line 107 of file mapper_hub.hpp.

◆ register_custom()

template<class Concrete >
bool MapperViewSimple< Concrete >::register_custom ( std::string  canonical,
std::vector< std::string >  aliases 
)
inlineoverridevirtual

Generic custom registration hook.

This is supported only for mappers whose custom symbols need no additional semantic information. For observables and decays, use the dedicated helper functions below so invariants are preserved.

Parameters
canonicalCanonical name.
aliasesAliases.
Returns
true on success, false if unsupported or rejected.

Implements IMapperView.

Definition at line 115 of file mapper_hub.hpp.


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