载入中...
搜索中...
未找到
eve::settlement::SettlementResult结构体 参考

Complete observable outcome of one successful settlement. 更多...

#include <Settlement.h>

Public 成员函数

bool hasStage (std::string_view name) const noexcept
 Return whether a named stage explanation exists.
 
std::size_t ruleEvaluationCount () const noexcept
 Count declarative rules evaluated in this retained trace.
 
std::size_t ruleMatchCount () const noexcept
 Count declarative rules whose filter and condition matched.
 
const SettlementStageResult * stage (std::string_view name) const noexcept
 Return the first stage explanation with this name, or null.
 

Public 属性

double requested = 0.0
 
double applied = 0.0
 
double absorbed = 0.0
 
double resisted = 0.0
 
double clamped = 0.0
 
bool critical = false
 
SettlementDisposition disposition = SettlementDisposition::NoOp
 
SimulationTick tick = SimulationTick::zero()
 
std::vector< SettlementStageResult > stages
 
std::optional< game_event::GameEvent > event
 
std::vector< SettlementRequest > derived
 Owning derived requests emitted by the policy in deterministic order.
 

详细描述

Complete observable outcome of one successful settlement.

applied is the amount written to the policy-owned state. absorbed is removed by a shield/barrier, resisted is removed by mitigation, and clamped is removed by the final amount bounds. requested remains the original request even when a critical source modifier increases the effective amount.

在文件 Settlement.h 第 163 行定义.

成员函数说明

◆ hasStage()

bool eve::settlement::SettlementResult::hasStage ( std::string_view  name) const
noexcept

Return whether a named stage explanation exists.

在文件 Settlement.cpp 第 269 行定义.

引用了 name.

◆ ruleEvaluationCount()

std::size_t eve::settlement::SettlementResult::ruleEvaluationCount ( ) const
noexcept

Count declarative rules evaluated in this retained trace.

返回
Zero for Trace Off; otherwise the number of rule stages, including filter/condition misses. @cost Linear in retained stage count with no allocation.

在文件 Settlement.cpp 第 271 行定义.

引用了 stage() , 以及 stages.

◆ ruleMatchCount()

std::size_t eve::settlement::SettlementResult::ruleMatchCount ( ) const
noexcept

Count declarative rules whose filter and condition matched.

返回
Applied rule-stage count; divide by ruleEvaluationCount() for a hit ratio. @cost Linear in retained stage count with no allocation.

在文件 Settlement.cpp 第 277 行定义.

引用了 stage() , 以及 stages.

◆ stage()

const SettlementStageResult * eve::settlement::SettlementResult::stage ( std::string_view  name) const
noexcept

Return the first stage explanation with this name, or null.

返回
Borrowed nullable result owned by this SettlementResult. @ownership SettlementResult owns its stage explanations; callers must not delete the result. @lifetime Valid until the result is mutated or destroyed. @thread Read on the thread owning this result; concurrent mutation is not supported. @reentrancy The query invokes no callbacks and is invalid across re-entrant result mutation.

在文件 Settlement.cpp 第 283 行定义.

引用了 value.

被这些函数引用 ruleEvaluationCount() , 以及 ruleMatchCount().

类成员变量说明

◆ absorbed

double eve::settlement::SettlementResult::absorbed = 0.0

◆ applied

◆ clamped

double eve::settlement::SettlementResult::clamped = 0.0

◆ critical

bool eve::settlement::SettlementResult::critical = false

◆ derived

std::vector<SettlementRequest> eve::settlement::SettlementResult::derived

Owning derived requests emitted by the policy in deterministic order.

在文件 Settlement.h 第 175 行定义.

被这些函数引用 eve::settlement::SettlementContext::emitDerived() , 以及 eve::settlement::verifySettlementResult().

◆ disposition

SettlementDisposition eve::settlement::SettlementResult::disposition = SettlementDisposition::NoOp

◆ event

std::optional<game_event::GameEvent> eve::settlement::SettlementResult::event

◆ requested

double eve::settlement::SettlementResult::requested = 0.0

◆ resisted

double eve::settlement::SettlementResult::resisted = 0.0

◆ stages

std::vector<SettlementStageResult> eve::settlement::SettlementResult::stages

在文件 Settlement.h 第 172 行定义.

被这些函数引用 ruleEvaluationCount(), ruleMatchCount() , 以及 eve::settlement::verifySettlementResult().

◆ tick

SimulationTick eve::settlement::SettlementResult::tick = SimulationTick::zero()

该结构体的文档由以下文件生成: