载入中...
搜索中...
未找到
eve::vehicle::VehicleAttributeAdapter类 参考final

Adapts VehicleEntity health and armor to the common attribute core. 更多...

#include <VehicleAttributes.h>

静态 Public 成员函数

static eve::Result< void > ensure (VehicleEntity &vehicle)
 Bind and seed selected combat attributes exactly once.
 
static eve::Result< double > read (VehicleEntity &vehicle, std::string_view attribute)
 Read a selected final combat attribute and refresh health projection.
 
static eve::Result< void > setBase (VehicleEntity &vehicle, std::string_view attribute, double value)
 Set a selected canonical base and refresh the compatibility health fields.
 
static eve::Result< eve::attributes::ModifierId > addModifier (VehicleEntity &vehicle, std::string id, std::string_view attribute, std::string source, eve::attributes::AttributeOperation operation, double value, eve::attributes::ModifierPriority priority=eve::attributes::priority::runtime)
 Add a modifier using the shared operation/priority/sequence contract.
 
static eve::Result< void > project (VehicleEntity &vehicle)
 Project canonical health values into VehicleEntity::Health.
 
static eve::Result< eve::attributes::AttributeProjectionSnapshot > snapshot (VehicleEntity &vehicle)
 Capture health/max_health/armor with owner generation and revision.
 
static eve::Result< void > restore (VehicleEntity &vehicle, const eve::attributes::AttributeProjectionSnapshot &snapshot, eve::Revision expectedRevision)
 Restore a vehicle attribute snapshot after owner/revision checks.
 

静态 Public 属性

static constexpr std::string_view healthAttribute = "health"
 
static constexpr std::string_view maxHealthAttribute = "max_health"
 
static constexpr std::string_view armorAttribute = "armor"
 

详细描述

Adapts VehicleEntity health and armor to the common attribute core.

VehicleEntity::Health remains a one-way compatibility projection for health/max_health. Armor-zone geometry and multipliers remain vehicle policy data; position, speed and physics bodies are deliberately excluded.

在文件 VehicleAttributes.h 第 26 行定义.

成员函数说明

◆ addModifier()

eve::Result< eve::attributes::ModifierId > eve::vehicle::VehicleAttributeAdapter::addModifier ( VehicleEntity &  vehicle,
std::string  id,
std::string_view  attribute,
std::string  source,
eve::attributes::AttributeOperation  operation,
double  value,
eve::attributes::ModifierPriority  priority = eve::attributes::priority::runtime 
)
static

Add a modifier using the shared operation/priority/sequence contract.

在文件 VehicleAttributes.cpp 第 96 行定义.

引用了 ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure(), eve::InvalidArgument, operation, priority, project(), projected, source , 以及 value.

◆ ensure()

eve::Result< void > eve::vehicle::VehicleAttributeAdapter::ensure ( VehicleEntity &  vehicle)
static

◆ project()

eve::Result< void > eve::vehicle::VehicleAttributeAdapter::project ( VehicleEntity &  vehicle)
static

◆ read()

eve::Result< double > eve::vehicle::VehicleAttributeAdapter::read ( VehicleEntity &  vehicle,
std::string_view  attribute 
)
static

◆ restore()

eve::Result< void > eve::vehicle::VehicleAttributeAdapter::restore ( VehicleEntity &  vehicle,
const eve::attributes::AttributeProjectionSnapshot &  snapshot,
eve::Revision  expectedRevision 
)
static

Restore a vehicle attribute snapshot after owner/revision checks.

在文件 VehicleAttributes.cpp 第 130 行定义.

引用了 ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure() , 以及 project().

被这些函数引用 eve::vehicle::VehicleSettlementAdapter::prepareApply().

◆ setBase()

eve::Result< void > eve::vehicle::VehicleAttributeAdapter::setBase ( VehicleEntity &  vehicle,
std::string_view  attribute,
double  value 
)
static

Set a selected canonical base and refresh the compatibility health fields.

在文件 VehicleAttributes.cpp 第 84 行定义.

引用了 ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::Status::failure(), project(), eve::Unsupported , 以及 value.

被这些函数引用 eve::vehicle::VehicleSettlementAdapter::prepareApply().

◆ snapshot()

eve::Result< eve::attributes::AttributeProjectionSnapshot > eve::vehicle::VehicleAttributeAdapter::snapshot ( VehicleEntity &  vehicle)
static

Capture health/max_health/armor with owner generation and revision.

在文件 VehicleAttributes.cpp 第 120 行定义.

引用了 ensure(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure() , 以及 eve::Status::failure().

被这些函数引用 eve::vehicle::VehicleSettlementAdapter::prepareApply().

类成员变量说明

◆ armorAttribute

constexpr std::string_view eve::vehicle::VehicleAttributeAdapter::armorAttribute = "armor"
staticconstexpr

在文件 VehicleAttributes.h 第 30 行定义.

被这些函数引用 eve::vehicle::VehicleSettlementAdapter::armorShield() , 以及 ensure().

◆ healthAttribute

constexpr std::string_view eve::vehicle::VehicleAttributeAdapter::healthAttribute = "health"
staticconstexpr

◆ maxHealthAttribute

constexpr std::string_view eve::vehicle::VehicleAttributeAdapter::maxHealthAttribute = "max_health"
staticconstexpr

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