载入中...
搜索中...
未找到
eve::combat::CombatAttributeRuntime类 参考

Owner-thread authoritative combat attribute coordinator. 更多...

#include <CombatAttributes.h>

Public 成员函数

 CombatAttributeRuntime (std::string subject={})
 Construct an empty runtime for a stable owning subject id.
 
Result< void > registerAttribute (CombatAttributeDefinition definition)
 Register one tag-addressed definition and initialize its value atomically.
 
Result< double > value (std::string_view tag) const
 Return the current base value, or NotFound for an unknown tag.
 
Result< std::vector< CombatAttributeEvent > > setValue (std::string_view tag, double value)
 Replace a value after clamping and return its owning gain/loss/depletion event, if changed.
 
Result< std::vector< CombatAttributeEvent > > modify (std::string_view tag, double delta)
 Add a signed delta after clamping and return owning change events.
 
Result< CombatAttributeAdvance > advance (Duration delta)
 Regenerate all attributes in lexical tag order using injected deterministic time.
 
std::vector< CombatAttributeDefinition > definitions () const
 Return owning registered definitions in lexical tag order.
 

详细描述

Owner-thread authoritative combat attribute coordinator.

Definitions and the underlying AttributeSet are owned by this runtime. All changes clamp before one base-value commit and return owning events; no callback is invoked. advance consumes injected Duration and no wall clock.

在文件 CombatAttributes.h 第 55 行定义.

构造及析构函数说明

◆ CombatAttributeRuntime()

eve::combat::CombatAttributeRuntime::CombatAttributeRuntime ( std::string  subject = {})
inlineexplicit

Construct an empty runtime for a stable owning subject id.

在文件 CombatAttributes.h 第 58 行定义.

成员函数说明

◆ advance()

◆ definitions()

std::vector< CombatAttributeDefinition > eve::combat::CombatAttributeRuntime::definitions ( ) const

Return owning registered definitions in lexical tag order.

在文件 CombatAttributes.cpp 第 126 行定义.

引用了 tag.

◆ modify()

Result< std::vector< CombatAttributeEvent > > eve::combat::CombatAttributeRuntime::modify ( std::string_view  tag,
double  delta 
)

Add a signed delta after clamping and return owning change events.

在文件 CombatAttributes.cpp 第 83 行定义.

引用了 eve::Diagnostic::error(), eve::attributes::AttributeSet::getBase(), eve::InvalidArgument, eve::NotFound , 以及 tag.

◆ registerAttribute()

Result< void > eve::combat::CombatAttributeRuntime::registerAttribute ( CombatAttributeDefinition  definition)

Register one tag-addressed definition and initialize its value atomically.

在文件 CombatAttributes.cpp 第 35 行定义.

引用了 eve::AlreadyExists, eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::attributes::AttributeSet::setBase(), eve::Status::success(), eve::Result< T >::success(), tag , 以及 valid.

◆ setValue()

Result< std::vector< CombatAttributeEvent > > eve::combat::CombatAttributeRuntime::setValue ( std::string_view  tag,
double  value 
)

Replace a value after clamping and return its owning gain/loss/depletion event, if changed.

在文件 CombatAttributes.cpp 第 75 行定义.

引用了 eve::Diagnostic::error(), eve::NotFound, tag , 以及 value.

◆ value()

Result< double > eve::combat::CombatAttributeRuntime::value ( std::string_view  tag) const

Return the current base value, or NotFound for an unknown tag.

在文件 CombatAttributes.cpp 第 47 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::attributes::AttributeSet::getBase(), eve::NotFound, eve::Result< T >::success() , 以及 tag.


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