8 Path(
const std::filesystem::path& path,
const std::string&
assetName);
21 [[nodiscard]] std::size_t
hash() const noexcept;
53 const std::size_t pathHash = std::filesystem::hash_value(
filePath);
54 const std::size_t nameHash = std::hash<std::string>{}(
assetName);
55 return pathHash ^ (nameHash + 0x9e3779b9 + (pathHash << 6) + (pathHash >> 2));
60 filePath = std::filesystem::path(
"");
65 return {path, path.filename().generic_string()};
Classes which are related to asset loading are mostly stored in this namespace.
static Path GetTexturePath(const std::filesystem::path &path)
bool empty() const
Checks whether this path doesn't point to anything. So it is empty.
bool operator==(const Path &other) const
std::filesystem::path filePath
std::size_t hash() const noexcept
const std::filesystem::path & getFilePath() const
Path & operator=(Path &&) noexcept=default
Path & operator=(const Path &)=default
std::string getAssetHandle() const
const std::string & getAssetName() const
size_t operator()(const Asset::Path &path) const noexcept