Answers grid line-of-sight queries from the bound tactics battle. 更多...
#include <TacticsLineOfSightAdapter.h>
Public 成员函数 | |
| Result< void > | bindBattle (ecs::EntityHandle battle) |
| Bind the battle this adapter answers for. | |
| Result< void > | unbindBattle (ecs::EntityHandle battle) |
Release the binding when battle is the bound one; otherwise NoOp. | |
| ecs::EntityHandle | boundBattle () const noexcept |
| The currently bound battle, or an invalid handle when none is bound. | |
| bool | hasBoundBattle () const noexcept |
| Whether a battle is currently bound. | |
| Result< sensing::LineOfSightResult > | query (const sensing::TargetLocation &from, const sensing::TargetLocation &to) const override |
| Tests the segment between two same-space locations. | |
Public 成员函数 继承自 eve::sensing::ILineOfSightQuery | |
| virtual | ~ILineOfSightQuery ()=default |
| Releases ILineOfSightQuery resources. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::sensing::ILineOfSightQuery | |
| static constexpr const char * | capabilityName = "eve.sensing.ILineOfSightQuery" |
详细描述
Answers grid line-of-sight queries from the bound tactics battle.
@thread Affine to the simulation thread; it performs no synchronization and ECS resolution is owner-thread-affine. @reentrancy query reads the board and its sight policy synchronously and invokes no callbacks.
在文件 TacticsLineOfSightAdapter.h 第 39 行定义.
成员函数说明
◆ bindBattle()
| Result< void > eve::tactics::TacticsLineOfSightAdapter::bindBattle | ( | ecs::EntityHandle | battle | ) |
Bind the battle this adapter answers for.
- 参数
-
battle Handle of a live module-owned battle.
- 返回
- Applied, NoOp when it is already the bound battle, Conflict when a different battle is bound, or StaleHandle when the handle does not resolve.
在文件 TacticsLineOfSightAdapter.cpp 第 64 行定义.
引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NoOp, eve::StaleHandle, eve::Status::success() , 以及 eve::Result< T >::success().
◆ boundBattle()
|
inlinenoexcept |
The currently bound battle, or an invalid handle when none is bound.
在文件 TacticsLineOfSightAdapter.h 第 53 行定义.
◆ hasBoundBattle()
|
inlinenoexcept |
Whether a battle is currently bound.
在文件 TacticsLineOfSightAdapter.h 第 56 行定义.
◆ query()
|
overridevirtual |
Tests the segment between two same-space locations.
- 参数
-
from Borrowed value location of the observer. to Borrowed value location of the candidate.
- 返回
- Visibility or Unsupported/Rejected with structured diagnostics.
- 备注
- Synchronous; callers must invoke on the provider's documented simulation thread.
Queries .
实现了 eve::sensing::ILineOfSightQuery.
在文件 TacticsLineOfSightAdapter.cpp 第 87 行定义.
引用了 board, eve::Diagnostic::error(), eve::Result< T >::failure(), from, eve::tactics::gridLineOfSightPolicy(), eve::Result< T >::success(), to, eve::Unsupported, visible, eve::sensing::LineOfSightResult::visible , 以及 eve::tactics::ILineOfSightPolicy::visible().
◆ unbindBattle()
| Result< void > eve::tactics::TacticsLineOfSightAdapter::unbindBattle | ( | ecs::EntityHandle | battle | ) |
Release the binding when battle is the bound one; otherwise NoOp.
在文件 TacticsLineOfSightAdapter.cpp 第 79 行定义.
引用了 eve::Applied, eve::NoOp, eve::Status::success() , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/tactics/TacticsLineOfSightAdapter.h
- src/modules/tactics/TacticsLineOfSightAdapter.cpp
Public 成员函数 继承自