Projects authoritative events into bounded, revertible presentation intents. 更多...
#include <Presentation.h>
Public 成员函数 | |
| PresentationProjector (std::uint64_t transientTicks=20) | |
| Configure the projector; the default lifetime is used unless overridden. | |
| Result< std::vector< PresentationCommand > > | project (const BattleEvent &event, const BattleCommand *command, const PresentationFrame &frame) const |
| Project one authoritative event into presentation commands. | |
| Result< PresentationIntent > | revert (const PresentationIntent &intent, const PresentationRevert &spec) const |
Build the inverse intent that undoes intent. | |
详细描述
Projects authoritative events into bounded, revertible presentation intents.
@thread Stateless apart from its configuration; it holds no battle reference and can be shared or copied freely.
在文件 Presentation.h 第 163 行定义.
构造及析构函数说明
◆ PresentationProjector()
|
inlineexplicit |
Configure the projector; the default lifetime is used unless overridden.
在文件 Presentation.h 第 166 行定义.
成员函数说明
◆ project()
| Result< std::vector< PresentationCommand > > eve::tactics::PresentationProjector::project | ( | const BattleEvent & | event, |
| const BattleCommand * | command, | ||
| const PresentationFrame & | frame | ||
| ) | const |
Project one authoritative event into presentation commands.
- 参数
-
event The battle event, which owns the sequence, tick and type. command The accepted command the event points at, when the caller can supply it; it is the authority for the geometry ( cell,targetUnit) the event does not carry. Passnullptrwhen unavailable, in which case intents are emitted without geometry instead of guessing.frame The revision and resting states the projection is anchored to.
- 返回
- Zero or more commands. An event with no presentation meaning (a random draw, an objective evaluation) projects to an empty list; that is a normal answer.
在文件 Presentation.cpp 第 72 行定义.
引用了 eve::tactics::Attacking, eve::tactics::BattleCommand::cell, commands, eve::tactics::Destroyed, eve::tactics::Finished, eve::tactics::PresentationIntent::from, eve::tactics::PresentationCommand::intent, eve::tactics::BattleCommand::kind, eve::tactics::Move, eve::tactics::Moving, eve::tactics::OnExpiry, eve::tactics::OnNextTurn, eve::tactics::OnRoundStart, eve::tactics::PresentationIntent::other, eve::tactics::PresentationIntent::path, eve::tactics::Selected, eve::tactics::BattleEvent::subject, eve::tactics::BattleCommand::targetUnit, eve::tactics::PresentationIntent::to, eve::tactics::BattleEvent::type , 以及 eve::tactics::UseAbility.
◆ revert()
| Result< PresentationIntent > eve::tactics::PresentationProjector::revert | ( | const PresentationIntent & | intent, |
| const PresentationRevert & | spec | ||
| ) | const |
Build the inverse intent that undoes intent.
- 返回
- The inverse intent, or
Unsupportedwhen the intent is durable (PresentationRevert::revertable is false). Refusing loudly is the point: a caller cannot "revert" a defeat and leave the view lying about the battle.
在文件 Presentation.cpp 第 115 行定义.
引用了 eve::Diagnostic::error(), eve::tactics::PresentationIntent::expiresAtTick, eve::Result< T >::failure(), eve::tactics::PresentationIntent::from, eve::tactics::PresentationRevert::isRevertable(), eve::tactics::PresentationIntent::other, eve::tactics::PresentationRevert::restingState, eve::tactics::PresentationIntent::revision, eve::tactics::PresentationIntent::sequence, eve::tactics::PresentationRevert::sequence, eve::tactics::PresentationIntent::state, eve::tactics::PresentationIntent::subject, eve::Result< T >::success(), eve::tactics::PresentationIntent::tick, eve::tactics::PresentationIntent::to , 以及 eve::Unsupported.
该类的文档由以下文件生成:
- src/modules/tactics/Presentation.h
- src/modules/tactics/Presentation.cpp