#include <AssetLookupTable.h>
|
| static bool | Load (const uint8_t *data, size_t size) |
| | Load the asset lookup table from memory.
|
| static void | Unload () |
| | Unload the lookup table.
|
| static bool | IsLoaded () |
| | Check if table is loaded.
|
| static const char * | Lookup (uint32_t hash) |
| | Look up GUID by hash (binary search).
|
| static uint32_t | Hash (const char *path, const char *type) |
| | Compute FNV-1a hash of a path:type key.
|
| static uint32_t | HashString (const char *str) |
| | Compute FNV-1a hash of a string.
|
| static uint32_t | GetEntryCount () |
| | Get entry count.
|
| static bool | ContainsGuid (const char *guid) |
| | Check if a GUID exists in the table.
|
◆ Load()
| bool Deki::AssetLookupTable::Load |
( |
const uint8_t * | data, |
|
|
size_t | size ) |
|
static |
Load the asset lookup table from memory.
The data must remain valid for the lifetime of lookups. Typically loaded from SD card or flash memory.
- Parameters
-
| data | Pointer to binary table data |
| size | Size of data in bytes |
- Returns
- true on success
◆ Unload()
| void Deki::AssetLookupTable::Unload |
( |
| ) |
|
|
static |
◆ IsLoaded()
| bool Deki::AssetLookupTable::IsLoaded |
( |
| ) |
|
|
inlinestatic |
Check if table is loaded.
◆ Lookup()
| const char * Deki::AssetLookupTable::Lookup |
( |
uint32_t | hash | ) |
|
|
static |
Look up GUID by hash (binary search).
- Parameters
-
| hash | FNV-1a hash of "path:type" key |
- Returns
- GUID string or nullptr if not found
◆ Hash()
| uint32_t Deki::AssetLookupTable::Hash |
( |
const char * | path, |
|
|
const char * | type ) |
|
static |
Compute FNV-1a hash of a path:type key.
- Parameters
-
| path | Asset path (e.g., "scenes/Demo") |
| type | Asset type name (e.g., "Scene") |
- Returns
- Hash value
◆ HashString()
| uint32_t Deki::AssetLookupTable::HashString |
( |
const char * | str | ) |
|
|
static |
Compute FNV-1a hash of a string.
- Parameters
-
- Returns
- Hash value
◆ GetEntryCount()
| uint32_t Deki::AssetLookupTable::GetEntryCount |
( |
| ) |
|
|
inlinestatic |
◆ ContainsGuid()
| bool Deki::AssetLookupTable::ContainsGuid |
( |
const char * | guid | ) |
|
|
static |
Check if a GUID exists in the table.
- Parameters
-
- Returns
- true if GUID exists as a value in any entry
O(n) scan - acceptable for asset loading (not per-frame)
The documentation for this class was generated from the following file: