|
NoJobEngine 2.0.7
|
#include <AssetRegistry.h>
Public Member Functions | |
| AssetRegistry (std::filesystem::path root="Assets") | |
| void | Scan () |
| bool | Save () const |
| bool | Load () |
| AssetHandle | Register (const std::filesystem::path &path, AssetType type=AssetType::Unknown) |
| AssetHandle | FindHandle (const std::filesystem::path &path) const |
| const AssetMetadata * | Find (AssetHandle handle) const |
| const AssetMetadata * | Find (const std::filesystem::path &path) const |
| std::vector< AssetMetadata > | GetAll () const |
| const std::filesystem::path & | GetRoot () const |
Static Public Member Functions | |
| static AssetType | TypeFromExtension (const std::filesystem::path &path) |
Definition at line 14 of file AssetRegistry.h.
|
explicit |
Definition at line 46 of file AssetRegistry.cpp.
| const AssetMetadata * NoJob::AssetRegistry::Find | ( | AssetHandle | handle | ) | const |
Definition at line 144 of file AssetRegistry.cpp.
Referenced by Find().
| const AssetMetadata * NoJob::AssetRegistry::Find | ( | const std::filesystem::path & | path | ) | const |
Definition at line 146 of file AssetRegistry.cpp.
References Find(), and FindHandle().
| AssetHandle NoJob::AssetRegistry::FindHandle | ( | const std::filesystem::path & | path | ) | const |
Definition at line 142 of file AssetRegistry.cpp.
References NoJob::InvalidAssetHandle.
Referenced by Find().
| std::vector< AssetMetadata > NoJob::AssetRegistry::GetAll | ( | ) | const |
Definition at line 148 of file AssetRegistry.cpp.
|
inline |
Definition at line 28 of file AssetRegistry.h.
| bool NoJob::AssetRegistry::Load | ( | ) |
Definition at line 127 of file AssetRegistry.cpp.
References NoJob::AssetMetadata::Handle, NoJob::AssetMetadata::Name, NoJob::AssetMetadata::Path, and NoJob::AssetMetadata::Type.
Referenced by NoJob::ProjectAssetOperations::CreateCppScript(), NoJob::ProjectAssetOperations::CreatePrefab(), NoJob::ProjectPanel::Draw(), NoJob::AssetManager::ImportModel(), NoJob::AssetManager::ImportModelMaterial(), NoJob::AssetManager::ImportModelMaterials(), and NoJob::AssetManager::Init().
| AssetHandle NoJob::AssetRegistry::Register | ( | const std::filesystem::path & | path, |
| AssetType | type = AssetType::Unknown ) |
Definition at line 75 of file AssetRegistry.cpp.
References NoJob::AssetMetadata::FileSize, NoJob::AssetMetadata::Handle, NoJob::InvalidAssetHandle, NoJob::AssetMetadata::LastWriteTime, NoJob::AssetMetadata::Name, NoJob::AssetMetadata::Path, NoJob::AssetMetadata::Type, TypeFromExtension(), and NoJob::Unknown.
Referenced by NoJob::ProjectAssetOperations::CreateCppScript(), NoJob::ProjectAssetOperations::CreatePrefab(), NoJob::AssetManager::ImportModel(), NoJob::AssetManager::ImportModelMaterial(), NoJob::AssetManager::ImportModelMaterials(), and Scan().
| bool NoJob::AssetRegistry::Save | ( | ) | const |
| void NoJob::AssetRegistry::Scan | ( | ) |
Definition at line 101 of file AssetRegistry.cpp.
References Register(), and Save().
Referenced by NoJob::AssetManager::Init().
|
static |
Definition at line 61 of file AssetRegistry.cpp.
References NoJob::Audio, NoJob::Material, NoJob::Mesh, NoJob::Prefab, NoJob::Scene, NoJob::Script, NoJob::Texture2D, and NoJob::Unknown.
Referenced by Register().