Generation-checked link to an ECS entity. 更多...
#include <RTSTypes.h>
Public 成员函数 | |
| bool | isBound () const noexcept |
| Whether a handle has been assigned, including a stale one. | |
| bool | isStale () const noexcept |
| Whether the assigned target no longer resolves at its generation. | |
| ecs::Entity * | resolve () const noexcept |
| Resolve the target for this call, or return null when stale. | |
| const ecs::EntityHandle & | handle () const noexcept |
| Return the local runtime handle retained by this link. | |
| void | reset () noexcept |
| Clear the relationship after source-side destruction. | |
静态 Public 成员函数 | |
| static Result< EntityLink > | bind (ecs::EntityHandle handle) |
| Bind a live ECS handle, rejecting a null or stale handle. | |
| static EntityLink | fromHandleForRestore (ecs::EntityHandle handle) noexcept |
| Rehydrate a serialized runtime link before its target is known. | |
详细描述
class eve::rts::EntityLink< Tag >
Generation-checked link to an ECS entity.
The link owns no target. bind() validates the handle immediately; resolve() performs the generation check again, so target destruction or slot reuse becomes observable as a stale link. fromHandleForRestore() is reserved for restore/import code that will validate before use.
EntityLink public API.
在文件 RTSTypes.h 第 181 行定义.
成员函数说明
◆ bind()
|
inlinestatic |
Bind a live ECS handle, rejecting a null or stale handle.
Failure.
Error.
Success.
在文件 RTSTypes.h 第 184 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::rts::EntityLink< Tag >::handle(), eve::StaleHandle , 以及 eve::Result< T >::success().
◆ fromHandleForRestore()
|
inlinestaticnoexcept |
Rehydrate a serialized runtime link before its target is known.
- 备注
- The returned link must be checked with isStale()/resolve() before use.
在文件 RTSTypes.h 第 202 行定义.
◆ handle()
|
inlinenoexcept |
Return the local runtime handle retained by this link.
在文件 RTSTypes.h 第 216 行定义.
被这些函数引用 eve::rts::EntityLink< Tag >::bind() , 以及 eve::rts::EntityLink< Tag >::fromHandleForRestore().
◆ isBound()
|
inlinenoexcept |
Whether a handle has been assigned, including a stale one.
在文件 RTSTypes.h 第 210 行定义.
◆ isStale()
|
inlinenoexcept |
Whether the assigned target no longer resolves at its generation.
在文件 RTSTypes.h 第 212 行定义.
◆ reset()
|
inlinenoexcept |
Clear the relationship after source-side destruction.
在文件 RTSTypes.h 第 218 行定义.
◆ resolve()
|
inlinenoexcept |
Resolve the target for this call, or return null when stale.
在文件 RTSTypes.h 第 214 行定义.
该类的文档由以下文件生成:
- src/modules/rts/RTSTypes.h