NoJobEngine 2.0.7
Loading...
Searching...
No Matches
NoJob::AssetRegistry Class Reference

#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)

Detailed Description

Definition at line 14 of file AssetRegistry.h.

Constructor & Destructor Documentation

◆ AssetRegistry()

NoJob::AssetRegistry::AssetRegistry ( std::filesystem::path root = "Assets")
explicit

Definition at line 46 of file AssetRegistry.cpp.

Member Function Documentation

◆ Find() [1/2]

const AssetMetadata * NoJob::AssetRegistry::Find ( AssetHandle handle) const

Definition at line 144 of file AssetRegistry.cpp.

Referenced by Find().

◆ Find() [2/2]

const AssetMetadata * NoJob::AssetRegistry::Find ( const std::filesystem::path & path) const

Definition at line 146 of file AssetRegistry.cpp.

References Find(), and FindHandle().

◆ 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().

◆ GetAll()

std::vector< AssetMetadata > NoJob::AssetRegistry::GetAll ( ) const

Definition at line 148 of file AssetRegistry.cpp.

◆ GetRoot()

const std::filesystem::path & NoJob::AssetRegistry::GetRoot ( ) const
inline

Definition at line 28 of file AssetRegistry.h.

◆ Load()

◆ Register()

◆ Save()

◆ Scan()

void NoJob::AssetRegistry::Scan ( )

Definition at line 101 of file AssetRegistry.cpp.

References Register(), and Save().

Referenced by NoJob::AssetManager::Init().

◆ TypeFromExtension()

AssetType NoJob::AssetRegistry::TypeFromExtension ( const std::filesystem::path & path)
static

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