载入中...
搜索中...
未找到
eve::rts::RTSCommandLog类 参考

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()

◆ clear()

void eve::rts::RTSCommandLog::clear ( )
noexcept

Remove queued and retained commands.

在文件 RTSReplay.cpp 第 407 行定义.

被这些函数引用 importText().

◆ exportText()

std::string eve::rts::RTSCommandLog::exportText ( ) const

Export retained commands in a locale-independent text format.

在文件 RTSReplay.cpp 第 275 行定义.

引用了 subject , 以及 value.

◆ importText()

Result< void > eve::rts::RTSCommandLog::importText ( std::string_view  text,
SimulationTick  currentTick = {},
bool  clearExisting = true 
)

◆ 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()

std::size_t eve::rts::RTSCommandLog::size ( ) const
inlinenoexcept

Number of retained commands.

在文件 RTSReplay.h 第 77 行定义.


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