载入中...
搜索中...
未找到
SettlementAdapter.h
浏览该文件的文档.
1#pragma once
2
14
15#include <optional>
16#include <string>
17#include <string_view>
18
19namespace eve::vehicle {
20
29public:
32
35
37 [[nodiscard]] const SubjectRef& targetRef() const noexcept { return targetRef_; }
38
58
59private:
68 [[nodiscard]] static const eve::Value* contextValue(const settlement::SettlementContext& context,
69 std::string_view key) noexcept;
70 [[nodiscard]] static std::optional<double> numberValue(const eve::Value* value) noexcept;
71 [[nodiscard]] static std::optional<bool> boolValue(const eve::Value* value) noexcept;
72 [[nodiscard]] static std::optional<std::string> stringValue(const eve::Value* value);
73 [[nodiscard]] bool isDamage(const settlement::SettlementContext& context) const noexcept;
74 [[nodiscard]] bool isHealing(const settlement::SettlementContext& context) const noexcept;
75
76 VehicleEntity& vehicle_;
77 SubjectRef targetRef_;
78};
79
80} // namespace eve::vehicle
double value
std::uint32_t key
const VegetationPresetContext & context
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Strong, domain-neutral reference to a runtime subject.
Definition SubjectRef.h:26
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
Domain-owned policy hooks used by the common settlement pipeline.
Definition Settlement.h:497
Mutable calculation frame visible to policy and custom stage code.
Definition Settlement.h:338
载具实体:数据全部在组件里,行为在 VehicleSystem。
Settles damage/healing against one VehicleEntity.
eve::Result< void > sourceModifiers(settlement::SettlementContext &context) override
Apply source-side modifiers such as critical or elemental power.
eve::Result< void > armorShield(settlement::SettlementContext &context) override
Apply armor and shield policy, recording absorbed amount.
VehicleSettlementAdapter(const VehicleSettlementAdapter &)=delete
const SubjectRef & targetRef() const noexcept
Stable identity checked for the target side of the request.
eve::Result< void > targetMitigation(settlement::SettlementContext &context) override
Apply target mitigation such as resistance or penetration rules.
eve::Result< void > validate(settlement::SettlementContext &context) override
Validate request and target-owned state without mutating it.
eve::Result< settlement::PreparedApply > prepareApply(const settlement::SettlementContext &context) override
Build an atomic candidate mutation without publishing it.
eve::Result< void > clamp(settlement::SettlementContext &context) override
Configure policy-specific amount bounds for the generic clamp.
VehicleSettlementAdapter & operator=(const VehicleSettlementAdapter &)=delete
驾驶者接口与玩家控制状态。
Domain-neutral, deterministic settlement pipeline.