载入中...
搜索中...
未找到
DialogueState.h
浏览该文件的文档.
70[[nodiscard]] EVENGINE_API_ORCHESTRATION eve::Value toCanonicalValue(const eve::StateValue& value);
77[[nodiscard]] EVENGINE_API_ORCHESTRATION eve::StateValue toDialogueStateValue(const eve::Value& value);
86class EVENGINE_API_ORCHESTRATION StateEvaluationContext final : public eve::condition::EvaluationContext {
97 std::function<std::optional<eve::condition::ConditionResult>(std::string_view, const eve::Value&)> evaluator) {
112 std::function<std::optional<eve::condition::ConditionResult>(std::string_view, const eve::Value&)> policyEvaluator_;
136 void setMutationProvider(eve::IStateMutation* provider) noexcept { mutationProvider_ = provider; }
139 std::function<std::optional<eve::condition::ConditionResult>(std::string_view, const eve::Value&)> evaluator) {
155 [[nodiscard]] eve::Result<eve::condition::Condition> compileCondition(const eve::Value& specification) const;
157 [[nodiscard]] eve::condition::ConditionResult evaluate(const eve::condition::Condition& condition) const;
162 [[nodiscard]] eve::Result<eve::MutationReceipt> apply(std::span<const eve::StateMutation> mutations,
171 std::function<std::optional<eve::condition::ConditionResult>(std::string_view, const eve::Value&)> policyEvaluator_;
Pure, explainable condition trees shared by gameplay domains.
Dialogue payment specifications and transaction composition.
Consumer-owned query and mutation contracts for authoritative world state.
Explain one condition evaluation in a UI- and log-friendly form.
Definition Condition.h:137
Read-only state boundary used by every condition evaluation.
Definition Condition.h:175
Dialogue-owned facade for world reads, unified conditions, and mutations.
Definition DialogueState.h:124
void setMutationProvider(eve::IStateMutation *provider) noexcept
Bind a borrowed mutation provider for this context's lifetime.
Definition DialogueState.h:136
void setPolicyEvaluator(std::function< std::optional< eve::condition::ConditionResult >(std::string_view, const eve::Value &)> evaluator)
Install a read-only policy evaluator used by PolicyCall conditions.
Definition DialogueState.h:138
void setQueryProvider(eve::IStateQuery *provider) noexcept
Bind a borrowed query provider for this context's lifetime.
Definition DialogueState.h:134
const std::string & subject() const noexcept
Return the currently selected subject id.
Definition DialogueState.h:132
Decision EvaluationContext backed by one dialogue subject.
Definition DialogueState.h:86
void setProvider(eve::IStateQuery *provider) noexcept
Set a borrowed query provider valid for this context's lifetime.
Definition DialogueState.h:94
void setPolicyEvaluator(std::function< std::optional< eve::condition::ConditionResult >(std::string_view, const eve::Value &)> evaluator)
Install a read-only policy callback without retaining its arguments.
Definition DialogueState.h:96
All-or-nothing mutation boundary owned by the consumer.
Definition StateAccess.h:107
Read-only world-state boundary owned by consumers such as Dialogue.
Definition StateAccess.h:79
Definition ConversationAuthoring.cpp:12
CommandRequestKind
Destination protocol requested by a dialogue command node.
Definition DialogueState.h:25
@ GameplayAction
@ Operation
eve::Value toCanonicalValue(const eve::StateValue &value)
Convert the legacy reload value into the canonical common value.
Definition DialogueState.cpp:203
eve::StateValue toDialogueStateValue(const eve::Value &value)
Convert a canonical value to the legacy reload representation.
Definition DialogueState.cpp:225
std::function< CommandResponse(const CommandRequest &)> CommandRequestHandler
Handler implemented by the owning operation or gameplay domain.
Definition DialogueState.h:63
Immutable request emitted by a command node.
Definition DialogueState.h:38
PaymentSpec payment
Optional atomic money/reputation payment for this command.
Definition DialogueState.h:47
std::vector< eve::StateMutation > stateMutations
Optional StatePatch mutations committed in the same transaction.
Definition DialogueState.h:49
std::string requestId
Stable identifier for this exact suspended command execution.
Definition DialogueState.h:40
Structured response to a request emitted by a command node.
Definition DialogueState.h:53
Canonical money/reputation cost attached to a dialogue choice or command.
Definition DialoguePayment.h:36
Correlation metadata shared by a mutation transaction.
Definition StateAccess.h:57