载入中...
搜索中...
未找到
eve::map::MapArtifactProvider类 参考final

Real map-module provider for generated grid publication. 更多...

#include <ArtifactProvider.h>

类 eve::map::MapArtifactProvider 继承关系图:
eve::artifact::IMapArtifactAdapter eve::artifact::ProviderContract

Public 成员函数

eve::Result< std::unique_ptr< eve::artifact::PreparedPublication > > prepare (const eve::artifact::PublicationView &publication) override
 Stage a topology grid and copy its cells before commit.
 
eve::Result< eve::Value > snapshotState () const override
 Export map identity, build keys, handles and topology cells.
 
eve::Result< void > restoreState (const eve::Value &state) override
 Replace the registry from validated topology state.
 
bool emptyState () const noexcept override
 Return whether the map registry has no committed records.
 
void clearState () noexcept override
 Clear provider state through the common restore-cleanup hook.
 
const MapArtifactRecord * find (eve::PersistentId id) const noexcept
 Find a committed map artifact; the pointer is borrowed. @ownership Borrowed from this provider; callers must not delete or retain it. @nullable Null when no committed artifact has the requested identity. @lifetime Until provider clear/restore/destruction or any later commit that reallocates the provider's record vector; callers must not cache it. @thread Map-provider owner thread; external synchronization is required. @reentrancy No callbacks are made.
 
std::optional< std::uint32_t > cell (eve::PersistentId id, std::int32_t x, std::int32_t y) const noexcept
 Return one semantic cell, or empty for an invalid coordinate.
 
std::size_t size () const noexcept
 Return the number of committed map artifact records.
 
void clear () noexcept
 Remove all records and reset the local handle allocator.
 
void setPrepareFailure (bool enabled) noexcept
 Inject a prepare failure for composition tests.
 
- Public 成员函数 继承自 eve::artifact::IMapArtifactAdapter
 ~IMapArtifactAdapter () override=default
 Releases IMapArtifactAdapter resources.
 
- Public 成员函数 继承自 eve::artifact::ProviderContract
virtual ~ProviderContract ()=default
 Provider contract.
 

友元

class MapArtifactStage
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::artifact::IMapArtifactAdapter
static constexpr const char * capabilityName = "eve.procgen.IMapArtifactAdapter"
 

详细描述

Real map-module provider for generated grid publication.

The CPU registry is the backend-neutral map ownership point. A TileLayer renderer can consume the same record later; semantic cells are never reconstructed from rendered resources.

在文件 ArtifactProvider.h 第 41 行定义.

成员函数说明

◆ cell()

std::optional< std::uint32_t > eve::map::MapArtifactProvider::cell ( eve::PersistentId  id,
std::int32_t  x,
std::int32_t  y 
) const
noexcept

Return one semantic cell, or empty for an invalid coordinate.

在文件 ArtifactProvider.cpp 第 123 行定义.

引用了 x , 以及 y.

◆ clear()

void eve::map::MapArtifactProvider::clear ( )
noexcept

Remove all records and reset the local handle allocator.

在文件 ArtifactProvider.cpp 第 131 行定义.

◆ clearState()

void eve::map::MapArtifactProvider::clearState ( )
inlineoverridevirtualnoexcept

Clear provider state through the common restore-cleanup hook.

重载 eve::artifact::ProviderContract .

在文件 ArtifactProvider.h 第 53 行定义.

◆ emptyState()

bool eve::map::MapArtifactProvider::emptyState ( ) const
inlineoverridevirtualnoexcept

Return whether the map registry has no committed records.

重载 eve::artifact::ProviderContract .

在文件 ArtifactProvider.h 第 51 行定义.

◆ find()

const MapArtifactRecord * eve::map::MapArtifactProvider::find ( eve::PersistentId  id) const
noexcept

Find a committed map artifact; the pointer is borrowed. @ownership Borrowed from this provider; callers must not delete or retain it. @nullable Null when no committed artifact has the requested identity. @lifetime Until provider clear/restore/destruction or any later commit that reallocates the provider's record vector; callers must not cache it. @thread Map-provider owner thread; external synchronization is required. @reentrancy No callbacks are made.

在文件 ArtifactProvider.cpp 第 117 行定义.

引用了 found.

被这些函数引用 prepare().

◆ prepare()

◆ restoreState()

◆ setPrepareFailure()

void eve::map::MapArtifactProvider::setPrepareFailure ( bool  enabled)
inlinenoexcept

Inject a prepare failure for composition tests.

在文件 ArtifactProvider.h 第 73 行定义.

引用了 enabled.

◆ size()

std::size_t eve::map::MapArtifactProvider::size ( ) const
inlinenoexcept

Return the number of committed map artifact records.

在文件 ArtifactProvider.h 第 69 行定义.

◆ snapshotState()

eve::Result< eve::Value > eve::map::MapArtifactProvider::snapshotState ( ) const
overridevirtual

Export map identity, build keys, handles and topology cells.

重载 eve::artifact::ProviderContract .

在文件 ArtifactProvider.cpp 第 137 行定义.

引用了 cells, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), state, eve::Result< T >::success() , 以及 value.

友元及相关函数文档

◆ MapArtifactStage

friend class MapArtifactStage
friend

在文件 ArtifactProvider.h 第 76 行定义.


该类的文档由以下文件生成: