asset_database.h
| File Path | engine/include/conjure/assets/asset_database.h |
| API ↗ | Database, importers and hot reload, Assets |
The project's sources, their identities and their cooked state.
Structs
| File | Description |
|---|---|
asset_database::entry |
|
asset_mount |
A root directory of sources, addressed as "<name>://<relative path>". |
asset_path_parts |
The pieces of "mount://relative/path#sub/path". |
asset_record |
One asset or sub-asset known to the database. |
import_failure |
One source that failed to import. |
import_report |
What import() did. |
scan_report |
What scan() found. |
Classes
| File | Description |
|---|---|
asset_database |
The project's sources, their identities and their cooked state. |
Enumerations
asset_record_status
enum class asset_record_status : u8 {
OK = 0,
MISSING_SOURCE, // the source file disappeared; a loaded payload stays loaded
META_INVALID, // the sidecar is corrupt; never overwritten
DUPLICATE_UUID, // another source (first in sorted path order) owns this uuid
IMPORT_FAILED, // the last import failed; the previous blob, if any, is kept
NO_IMPORTER, // no importer for the extension; browsable, never loadable
CYCLIC_DEPENDENCY // member of a dependency cycle found at import
};
Why a record may not be loadable.
Forward Declarations
asset_database::source_job
Functions
Public
make_asset_path
make_asset_path[[nodiscard]] CONJURE_API std::string make_asset_path(
std::string_view mount,
std::string_view relativePath,
std::string_view subPath = {});Builds "mount://relative#sub" (the '#' part only when subPath is not empty).
split_asset_path
split_asset_path[[nodiscard]] CONJURE_API std::optional<asset_path_parts> split_asset_path(
std::string_view assetPath) noexcept;Splits an asset path. nullopt when there is no "://" or the mount or path is empty.
to_string
to_string[[nodiscard]] CONJURE_API std::string_view to_string(
asset_record_status status) noexcept;Upper-case name of a status.