|
Porytiles
|
A type-safe wrapper for artifact keys. More...
#include <artifact_key.hpp>
Public Member Functions | |
| ArtifactKey (std::string key) | |
| Constructs an ArtifactKey from a string value. | |
| const std::string & | key () const |
| Gets the underlying string value. | |
| bool | operator== (const ArtifactKey &other) const =default |
| Equality comparison operator. | |
| auto | operator<=> (const ArtifactKey &other) const =default |
| Three-way comparison operator for ordered containers. | |
A type-safe wrapper for artifact keys.
The ArtifactKey class provides a strong type wrapper around std::string to represent artifact keys in the compilation system. This improves type safety and makes the concept of artifact keys more explicit in the codebase.
The class supports usage in all standard containers, including std::set, std::map, and std::unordered_map, through appropriate comparison operators and hash specialization.
Definition at line 19 of file artifact_key.hpp.
|
inlineexplicit |
Constructs an ArtifactKey from a string value.
| key | The string value to wrap |
Definition at line 26 of file artifact_key.hpp.
|
inline |
Gets the underlying string value.
Definition at line 33 of file artifact_key.hpp.
|
default |
Three-way comparison operator for ordered containers.
| other | The other ArtifactKey to compare with |
|
default |
Equality comparison operator.
| other | The other ArtifactKey to compare with |