Thread-neutral in-memory asset index used by editor hosts and tests. 更多...
#include <EditorAssetDatabase.h>
Public 成员函数 | |
| Result< AssetRecord > | publish (AssetRecord record, std::vector< AssetDependency > dependencies={}) |
| Atomically publish one validated record and its dependencies. | |
| Result< std::vector< AssetRecord > > | publishBatch (std::vector< AssetPublication > publications) |
| Validate and atomically publish an entire package projection as one index generation. | |
| Result< AssetRecord > | find (const AssetGuid &guid) const |
| Find one asset by stable GUID. | |
| Result< AssetRecord > | findByUri (const std::string &logicalUri) const |
| Find one asset by logical content URI. | |
| Result< AssetPage< AssetRecord > > | query (const AssetQuery &query, std::size_t offset, std::size_t limit, std::optional< std::uint64_t > generation=std::nullopt) const |
| Query a deterministic page; stale generations return Conflict. | |
| std::vector< AssetDependency > | dependencies (const AssetGuid &guid, bool incoming=false) const |
| Query outgoing or incoming dependencies for one asset. | |
| std::uint64_t | generation () const |
| Return the monotonic index generation. | |
详细描述
Thread-neutral in-memory asset index used by editor hosts and tests.
在文件 EditorAssetDatabase.h 第 71 行定义.
成员函数说明
◆ dependencies()
| std::vector< AssetDependency > eve::editor::MemoryAssetDatabase::dependencies | ( | const AssetGuid & | guid, |
| bool | incoming = false |
||
| ) | const |
Query outgoing or incoming dependencies for one asset.
在文件 EditorAssetDatabase.cpp 第 153 行定义.
被这些函数引用 publish() , 以及 eve::editor::RuntimeEditorPublisher::publish().
◆ find()
| Result< AssetRecord > eve::editor::MemoryAssetDatabase::find | ( | const AssetGuid & | guid | ) | const |
Find one asset by stable GUID.
在文件 EditorAssetDatabase.cpp 第 96 行定义.
引用了 found , 以及 eve::UuidIdAdapter< Tag >::value().
被这些函数引用 findByUri(), eve::editor::RuntimeEditorPublisher::publish(), eve::editor::AssetDatabasePhysicsColliderResolver::resolve() , 以及 eve::editor::EnvironmentAssetBrowser::select().
◆ findByUri()
| Result< AssetRecord > eve::editor::MemoryAssetDatabase::findByUri | ( | const std::string & | logicalUri | ) | const |
Find one asset by logical content URI.
在文件 EditorAssetDatabase.cpp 第 104 行定义.
引用了 find().
被这些函数引用 eve::editor::AssetDatabasePhysicsColliderResolver::resolve().
◆ generation()
|
inline |
◆ publish()
| Result< AssetRecord > eve::editor::MemoryAssetDatabase::publish | ( | AssetRecord | record, |
| std::vector< AssetDependency > | dependencies = {} |
||
| ) |
Atomically publish one validated record and its dependencies.
在文件 EditorAssetDatabase.cpp 第 19 行定义.
引用了 dependencies(), eve::UuidIdAdapter< Tag >::empty(), eve::editor::AssetDependency::from, eve::editor::AssetRecord::guid, eve::editor::AssetRecord::logicalUri, eve::editor::Ready, eve::editor::AssetRecord::status , 以及 eve::editor::AssetRecord::typeId.
被这些函数引用 eve::editor::ImportCoordinator::publish(), eve::editor::ImportCoordinator::publish() , 以及 eve::editor::DiskAssetCatalog::scan().
◆ publishBatch()
| Result< std::vector< AssetRecord > > eve::editor::MemoryAssetDatabase::publishBatch | ( | std::vector< AssetPublication > | publications | ) |
Validate and atomically publish an entire package projection as one index generation.
- 返回
- Owning published records; rejection leaves records, URIs, dependencies and generation unchanged.
在文件 EditorAssetDatabase.cpp 第 44 行定义.
引用了 eve::UuidIdAdapter< Tag >::empty(), eve::editing::failed(), eve::editor::AssetDependency::from, eve::editor::AssetRecord::guid, eve::editor::AssetRecord::logicalUri, eve::editor::Ready, eve::editor::AssetRecord::status , 以及 eve::editor::AssetRecord::typeId.
◆ query()
| Result< AssetPage< AssetRecord > > eve::editor::MemoryAssetDatabase::query | ( | const AssetQuery & | query, |
| std::size_t | offset, | ||
| std::size_t | limit, | ||
| std::optional< std::uint64_t > | generation = std::nullopt |
||
| ) | const |
Query a deterministic page; stale generations return Conflict.
在文件 EditorAssetDatabase.cpp 第 111 行定义.
引用了 end, eve::editor::AssetPage< T >::generation, generation(), eve::editor::AssetPage< T >::hasMore, left, limit, eve::editor::AssetPage< T >::nextOffset, offset, query(), right, tag , 以及 eve::editor::AssetPage< T >::values.
被这些函数引用 query() , 以及 eve::editor::EnvironmentAssetBrowser::query().
该类的文档由以下文件生成:
- src/modules/editor/EditorAssetDatabase.h
- src/modules/editor/EditorAssetDatabase.cpp