Deterministic lockstep input buffer and portable command log. 更多...
#include <RTSReplay.h>
Public 成员函数 | |
| Result< void > | queue (RTSReplayCommand command, SimulationTick currentTick={}) |
| Validate, normalize, queue, and retain one future command. | |
| Result< std::size_t > | apply (SimulationTick tick, RTS &world) |
| Apply all commands for one tick through the existing RTS order boundary. | |
| std::string | exportText () const |
| Export retained commands in a locale-independent text format. | |
| Result< void > | importText (std::string_view text, SimulationTick currentTick={}, bool clearExisting=true) |
| Parse and atomically import a command log. | |
| void | clear () noexcept |
| Remove queued and retained commands. | |
| std::size_t | size () const noexcept |
| Number of retained commands. | |
详细描述
Deterministic lockstep input buffer and portable command log.
This class owns only input history. Simulation state and order execution remain authoritative in RTS and the generic orders module.
在文件 RTSReplay.h 第 63 行定义.
成员函数说明
◆ apply()
| Result< std::size_t > eve::rts::RTSCommandLog::apply | ( | SimulationTick | tick, |
| RTS & | world | ||
| ) |
Apply all commands for one tick through the existing RTS order boundary.
在文件 RTSReplay.cpp 第 125 行定义.
引用了 eve::rts::Ability, eve::Applied, eve::rts::CancelAbility, eve::rts::CancelConstruction, eve::rts::CancelFireSupport, eve::rts::CancelProduction, eve::rts::Construction, eve::Diagnostic::error(), eve::rts::Escort, eve::Result< T >::failure(), eve::rts::CommandFanOutSystem::fanOut(), eve::rts::MovementGroupBatch::formation, found, eve::rts::MovementGroupBatch::leadDistance, eve::rts::MovementGroup, eve::NoOp, eve::NotFound, eve::rts::Production, eve::rts::ReinforcementProduction, eve::rts::RequestFireSupport, eve::rts::Research, eve::rts::SellBuilding, subject, eve::Status::success(), eve::Result< T >::success(), eve::rts::SuppressArea, target, eve::rts::MovementGroupBatch::target, tick, unit, eve::rts::MovementGroupBatch::units, eve::Result< void >::value() , 以及 world.
被这些函数引用 eve::rts::RTSLockstep::step().
◆ clear()
|
noexcept |
◆ exportText()
| std::string eve::rts::RTSCommandLog::exportText | ( | ) | const |
Export retained commands in a locale-independent text format.
在文件 RTSReplay.cpp 第 275 行定义.
◆ importText()
| Result< void > eve::rts::RTSCommandLog::importText | ( | std::string_view | text, |
| SimulationTick | currentTick = {}, |
||
| bool | clearExisting = true |
||
| ) |
Parse and atomically import a command log.
在文件 RTSReplay.cpp 第 322 行定义.
引用了 eve::Applied, clear(), eve::rts::Dispersed, eve::rts::Escort, index, kind, eve::rts::MovementGroup, operation, eve::LogicalId::parse(), queue(), subject, eve::Status::success(), eve::Result< T >::success(), eve::rts::SupplyRelay, target, text, tick, unit, valid, value , 以及 eve::rts::Wedge.
◆ queue()
| Result< void > eve::rts::RTSCommandLog::queue | ( | RTSReplayCommand | command, |
| SimulationTick | currentTick = {} |
||
| ) |
Validate, normalize, queue, and retain one future command.
在文件 RTSReplay.cpp 第 36 行定义.
引用了 eve::rts::Ability, eve::rts::CommandSpec::append, eve::Applied, eve::rts::CancelAbility, eve::rts::CancelConstruction, eve::rts::CancelFireSupport, eve::rts::CancelProduction, eve::rts::RTSReplayCommand::command, eve::rts::Construction, eve::rts::RTSReplayCommand::definition, eve::rts::CommandSpec::definitionId, eve::rts::Escort, eve::rts::RTSReplayCommand::faction, eve::rts::RTSReplayCommand::formation, eve::rts::RTSReplayCommand::groupLeadDistance, eve::LogicalId::isValid(), eve::SubjectRef::isValid(), eve::rts::CommandSpec::kind, eve::rts::Move, eve::rts::MovementGroup, eve::rts::RTSReplayCommand::operation, eve::rts::RTSReplayCommand::point, eve::rts::RTSReplayCommand::priority, eve::rts::CommandSpec::priority, eve::rts::RTSReplayCommand::producer, eve::rts::Production, eve::rts::CommandSpec::radius, eve::rts::ReinforcementProduction, eve::rts::RequestFireSupport, eve::rts::Research, eve::rts::RTSReplayCommand::resultSubject, eve::rts::CommandSpec::secondaryTarget, eve::rts::SellBuilding, eve::rts::FormationSpec::spacing, eve::Status::success(), eve::Result< T >::success(), eve::rts::SuppressArea, eve::rts::CommandSpec::target, eve::rts::RTSReplayCommand::targetEntity, eve::rts::CommandSpec::targetEntity, eve::rts::RTSReplayCommand::tick, eve::rts::CommandSpec::timeoutSeconds, eve::rts::UnitCommand, eve::rts::RTSReplayCommand::units, eve::rts::FormationSpec::validate(), eve::rts::CommandSpec::validate(), eve::detail::StrongUint64< Tag >::value(), value, eve::rts::RTSReplayCommand::value, eve::rts::WorldPosition::x , 以及 eve::rts::WorldPosition::y.
被这些函数引用 importText().
◆ size()
|
inlinenoexcept |
Number of retained commands.
在文件 RTSReplay.h 第 77 行定义.
该类的文档由以下文件生成:
- src/modules/rts/RTSReplay.h
- src/modules/rts/RTSReplay.cpp