28 static const std::map<WGroup, std::string> empty{};
61 std::hash<std::string>,
63 group_external_mapping
95 std::vector<std::string> aliases = {},
96 std::optional<std::string> ext = std::nullopt)
115 return str_impl(gid.
str(), s, b);
const std::map< WGroup, std::string > & group_mapping()
Returns the mapping between WGroup and its string representation.
Static mappings between enum classes and string (or FLHA) identifiers.
static std::string str(const IdOf< ScaleTypeTag > &id)
Returns the string representation associated with an identifier.
Generic enum↔string mapper with external keys and dynamic aliases.
static void init_builtins()
Explicitly initializes builtin entries.
static bool register_custom(std::string canonical, std::vector< std::string > aliases={}, std::optional< std::string > ext=std::nullopt)
Registers a custom entry with optional external key.
static std::vector< IdOf< WGroupTag > > list_all()
Lists all distinct identifiers currently registered.
static WGroup enum_elt_legacy(std::string_view s)
Legacy enum lookup using only the static MapFn() table.
static std::optional< std::string > external_of(const IdOf< WGroupTag > &id)
Returns the external key associated with a given identifier.
static std::optional< WGroup > enum_of(const IdOf< WGroupTag > &id)
Attempts to recover the enum value associated with an identifier.
static IdOf< WGroupTag > enum_elt(std::string_view s)
Alias for id_of(), kept for compatibility.
static std::optional< IdOf< WGroupTag > > from_external(const std::string &k)
Resolves an external key into an identifier.
static IdOf< WGroupTag > to_id(WGroup e)
Converts an enum value to an IdOf<Tag>.
static IdOf< WGroupTag > id_of(std::string_view s)
Resolves a string into an IdOf<Tag> via the registry.
static std::string str(const IdOf< WGroupTag > &id)
Returns the string representation of an identifier.
Mapper for WGroup <-> WGroupId <-> optional external string.
static std::string str(const WGroupId &gid, ScaleType s, WilsonBasis b=WilsonBasis::B_STANDARD)
Builds a composite block name using a WGroupId, scale and basis.
static bool register_custom(std::string canonical, std::vector< std::string > aliases={}, std::optional< std::string > ext=std::nullopt)
Registers a custom Wilson group with optional external label.
static std::string str(WGroup g, ScaleType s, WilsonBasis b=WilsonBasis::B_STANDARD)
Builds a composite block name using a WGroup enum, scale and basis.
Returns an uppercase copy of the input string.
const std::string & str() const
Returns the underlying string.
Generic enum↔string (and optional external key) mappers built on DynamicRegistry.
Tag type for Wilson-group identifiers.
const std::map< WGroup, std::string > & group_external_mapping()
Placeholder for a WGroup -> external string mapping.