23 Path(
const std::filesystem::path& path);
29 Path(std::filesystem::path&& path)
noexcept;
35 [[nodiscard]]
const std::filesystem::path&
fsPath()
const {
return filePath; }
59 [[nodiscard]] std::size_t
hash() const noexcept;
65 operator const
std::filesystem::path&()
const {
return filePath; }
100 MeshPath(
const std::filesystem::path& path,
const std::string& assetName);
146 [[nodiscard]] std::size_t
hash() const noexcept;
Classes which are related to asset loading are mostly stored in this namespace.
Identifies a named mesh-like asset inside an asset file.
std::size_t hash() const noexcept
Calculates a hash for use in unordered containers.
bool operator==(const MeshPath &other) const
Compares two asset paths by file path and asset name.
MeshPath()=default
Creates an empty asset path.
MeshPath & operator=(MeshPath &&) noexcept=default
Move-assigns an asset path.
MeshPath(const std::filesystem::path &path, const std::string &assetName)
Creates an asset path for a named asset in a file.
std::filesystem::path filePath_
MeshPath & operator=(const MeshPath &)=default
Copy-assigns an asset path.
const std::filesystem::path & getFilePath() const
Gets the source file path.
MeshPath(MeshPath &&other) noexcept
Move-constructs an asset path.
std::string getAssetHandle() const
Gets a combined string key for file path and asset name.
MeshPath(const MeshPath &other) noexcept
Copy-constructs an asset path.
void reset()
Clears the file path and asset name.
const std::string & getAssetName() const
Gets the asset name inside the source file.
bool empty() const
Checks whether this path doesn't point to anything. So it is empty.
Identifies a single asset file on disk.
bool empty() const
Checks whether the stored path is empty.
bool operator==(const Path &other) const
Compares two asset file paths.
std::string string() const
Converts the stored path to a string.
std::filesystem::path filePath
std::size_t hash() const noexcept
Calculates a hash for unordered containers.
const std::filesystem::path & getFilePath() const
Gets the stored filesystem path.
const std::filesystem::path & fsPath() const
Gets the stored filesystem path.
void reset()
Clears the stored filesystem path.
Path()=default
Creates an empty asset file path.
Path(const std::filesystem::path &path)
Creates an asset path from a filesystem path.
Path(std::filesystem::path &&path) noexcept
Move-constructs an asset path from a filesystem path.
size_t operator()(const Asset::MeshPath &path) const noexcept
Hashes a mesh asset path.
size_t operator()(const Asset::Path &path) const noexcept
Hashes an asset file path.