#include <string>
#include <string_view>
#include <vector>
#include <unordered_map>
#include <optional>
#include <algorithm>
#include <cctype>
#include "dynamic_registry.tpp"
Go to the source code of this file.
|
| namespace | std |
| | Hash specialization for SymbolId<Tag>.
|
| |
|
| std::string | normalize_key (std::string_view s) |
| | Normalizes a string key in a case-insensitive manner.
|
| |
| template<class Tag > |
| bool | operator== (const SymbolId< Tag > &a, const SymbolId< Tag > &b) noexcept |
| | Case-insensitive equality comparison for SymbolId<Tag>.
|
| |
| template<class Tag > |
| bool | operator< (const SymbolId< Tag > &a, const SymbolId< Tag > &b) noexcept |
| | Case-insensitive strict ordering for SymbolId<Tag>.
|
| |
◆ normalize_key()
| std::string normalize_key |
( |
std::string_view |
s | ) |
|
|
inline |
Normalizes a string key in a case-insensitive manner.
The current implementation:
- lowercases all characters using std::tolower,
- preserves all characters (alphanumeric and others).
Optionally, the commented-out line can be enabled to ignore characters that are not alphanumeric (such as spaces or punctuation).
- Parameters
-
| s | Input string view to normalize. |
- Returns
- Lowercased std::string, suitable for use as a canonical key.
Definition at line 96 of file dynamic_registry.h.
◆ operator<()
Case-insensitive strict ordering for SymbolId<Tag>.
The ordering is defined by lexicographic comparison of the normalized names (see normalize_key()). This allows SymbolId<Tag> to be used as keys in ordered containers if needed.
- Template Parameters
-
- Parameters
-
| a | First identifier. |
| b | Second identifier. |
- Returns
- true if the normalized name of
a is lexicographically smaller than that of b.
Definition at line 137 of file dynamic_registry.h.
◆ operator==()
Case-insensitive equality comparison for SymbolId<Tag>.
Two SymbolId<Tag> values are considered equal if their normalized names (as returned by normalize_key()) are equal, independently of original case.
- Template Parameters
-
- Parameters
-
| a | First identifier. |
| b | Second identifier. |
- Returns
- true if both identifiers are equal under normalization.
Definition at line 119 of file dynamic_registry.h.