|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Generic enum↔string (and optional external key) mappers built on DynamicRegistry. More...
#include <map>#include <optional>#include <string_view>#include <vector>#include "dynamic_registry.h"#include "Map.h"#include "generic_mapper.tpp"

Go to the source code of this file.
Classes | |
| class | GenericMapperNoExt< Tag, EnumT, MapFn > |
| Generic enum↔string mapper without external keys. More... | |
| class | GenericMapperWithExt< Tag, EnumT, ExternalKey, Hash, MapFn, ExtFn > |
| Generic enum↔string mapper with external keys and dynamic aliases. More... | |
Typedefs | |
| template<class Tag > | |
| using | IdOf = SymbolId< Tag > |
| Convenience alias for the identifier type associated with a given tag. | |
Functions | |
| std::string | nk (std::string_view s) |
| Shortcut helper to normalize a string_view into a canonical key. | |
Generic enum↔string (and optional external key) mappers built on DynamicRegistry.
This header provides two templated mapper classes:
Both mappers are parameterized by:
The internal DynamicRegistry uses case-insensitive normalization via normalize_key(), so lookups are case-insensitive and aliases can be added at runtime without interfering with builtin names.
Definition in file generic_mapper.h.
Convenience alias for the identifier type associated with a given tag.
| Tag | Tag used for SymbolId instantiation. |
Definition at line 41 of file generic_mapper.h.
|
inline |
Shortcut helper to normalize a string_view into a canonical key.
This simply forwards to normalize_key().
| s | Input string_view. |
Definition at line 51 of file generic_mapper.h.