Porytiles
Loading...
Searching...
No Matches
porytiles::ArtifactKey Class Reference

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
 
bool operator== (const ArtifactKey &other) const =default
 
auto operator<=> (const ArtifactKey &other) const =default
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ArtifactKey()

porytiles::ArtifactKey::ArtifactKey ( std::string  key)
inlineexplicit

Constructs an ArtifactKey from a string value.

Parameters
keyThe string value to wrap

Definition at line 26 of file artifact_key.hpp.

Member Function Documentation

◆ key()

const std::string & porytiles::ArtifactKey::key ( ) const
inline

Definition at line 28 of file artifact_key.hpp.

◆ operator<=>()

auto porytiles::ArtifactKey::operator<=> ( const ArtifactKey other) const
default

◆ operator==()

bool porytiles::ArtifactKey::operator== ( const ArtifactKey other) const
default

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