#include <AssetReloader.h>
Public 类型 | |
| enum | Priority { kCache = 0 , kTexture = 10 , kConsumer = 20 } |
Public 成员函数 | |
| virtual | ~IAssetReloader ()=default |
| virtual const char * | reloadKind () const =0 |
| virtual bool | handlesPath (const std::string &normPath) const =0 |
| virtual Resource * | load (const std::string &key) |
| virtual bool | reload (const std::string &normPath) |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "IAssetReloader" |
详细描述
在文件 AssetReloader.h 第 30 行定义.
成员枚举类型说明
◆ Priority
构造及析构函数说明
◆ ~IAssetReloader()
|
virtualdefault |
成员函数说明
◆ handlesPath()
|
pure virtual |
Whether this reloader claims normPath during automatic dispatch. For providers of cached CPU resources the key may carry parameters ("fonts/a.ttf?size=16"); use ResourceManager::pathOfKey() to strip them.
在 eve::ResourceManager 内被实现.
被这些函数引用 eve::ResourceManager::get(), eve::ResourceManager::refreshEntry() , 以及 eve::filesystem::HotReload::tryReload().
◆ load()
|
inlinevirtual |
Create the CPU-side resource identified by key (a normalized VFS path, optionally followed by ?param=value entries that change the decoded asset, e.g. "fonts/a.ttf?size=16").
- 返回
- nullptr when this provider does not claim the key. The caller (ResourceManager) caches the result and keeps it alive; later reloads drain the freshly loaded instance into the cached one via Resource::adopt, so the cached identity stays stable.
被 eve::ResourceManager 重载.
在文件 AssetReloader.h 第 65 行定义.
被这些函数引用 eve::ResourceManager::get() , 以及 eve::ResourceManager::refreshEntry().
◆ reload()
|
inlinevirtual |
Reload everything referencing normPath. Returns true if anything changed.
被 eve::ResourceManager 重载.
在文件 AssetReloader.h 第 68 行定义.
◆ reloadKind()
|
pure virtual |
Stable name for this reloader ("texture" / "particle" / "tilemap"). A path bound to this kind is offered here regardless of its extension.
在 eve::ResourceManager 内被实现.
类成员变量说明
◆ capabilityName
|
staticconstexpr |
在文件 AssetReloader.h 第 39 行定义.
该类的文档由以下文件生成:
- src/engine/common/AssetReloader.h