|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
Identifies a single asset file on disk. More...
#include <AssetPath.h>
Public Member Functions | |
| 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. | |
| const std::filesystem::path & | fsPath () const |
| Gets the stored filesystem path. | |
| const std::filesystem::path & | getFilePath () const |
| Gets the stored filesystem path. | |
| std::string | string () const |
| Converts the stored path to a string. | |
| bool | empty () const |
| Checks whether the stored path is empty. | |
| std::size_t | hash () const noexcept |
| Calculates a hash for unordered containers. | |
| operator const std::filesystem::path & () const | |
| Converts this asset path to its filesystem path. | |
| bool | operator== (const Path &other) const |
| Compares two asset file paths. | |
| void | reset () |
| Clears the stored filesystem path. | |
Private Attributes | |
| std::filesystem::path | filePath = "" |
Identifies a single asset file on disk.
Path wraps std::filesystem::path so engine asset APIs do not expose raw filesystem paths as asset keys. Use MeshPath when addressing a named object inside a container file such as glTF.
Definition at line 13 of file AssetPath.h.
|
default |
Creates an empty asset file path.
Referenced by operator==().
| Asset::Path::Path | ( | const std::filesystem::path & | path | ) |
Creates an asset path from a filesystem path.
| path | Filesystem path to store. |
|
noexcept |
Move-constructs an asset path from a filesystem path.
| path | Filesystem path to move into this asset path. |
|
inlinenodiscard |
Checks whether the stored path is empty.
Definition at line 53 of file AssetPath.h.
References filePath.
|
inlinenodiscard |
Gets the stored filesystem path.
Definition at line 35 of file AssetPath.h.
References filePath.
|
inlinenodiscard |
Gets the stored filesystem path.
Definition at line 41 of file AssetPath.h.
References filePath.
Referenced by Engine::Core::AssetManager::getAsset().
|
nodiscardnoexcept |
Calculates a hash for unordered containers.
|
inline |
Converts this asset path to its filesystem path.
Definition at line 65 of file AssetPath.h.
References filePath.
|
inline |
Compares two asset file paths.
| other | Path to compare with. |
Definition at line 72 of file AssetPath.h.
References filePath, and Path().
| void Asset::Path::reset | ( | ) |
Clears the stored filesystem path.
|
inlinenodiscard |
Converts the stored path to a string.
Definition at line 47 of file AssetPath.h.
References filePath.
|
private |
Definition at line 80 of file AssetPath.h.
Referenced by empty(), fsPath(), getFilePath(), operator const std::filesystem::path &(), operator==(), and string().