载入中...
搜索中...
未找到
CardStateProvider.cpp
浏览该文件的文档.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
const std::string & asString() const
String payload; only valid when kind() == Kind::String.
Definition StateValue.h:70
const StateValue * find(const std::string &key) const
Look up key; nullptr when absent.
Definition StateValue.cpp:117
StateValue & at(size_t index)
Indexed element (bounds-checked); only valid on arrays.
Definition StateValue.h:77
void set(const std::string &key, StateValue v)
Insert or replace key; only valid on objects.
Definition StateValue.cpp:107
Runtime-state serialization for state hot reload.
Definition IStateProvider.h:29
Definition Card.cpp:22
EVENGINE_API_WORLD bool captureCardState(StateValue &out)
Compatibility facade for CardData/Hand interaction-state serialization during state hot reload.
Definition CardStateProvider.cpp:57
EVENGINE_API_WORLD bool restoreCardState(const StateValue &in, std::string *err=nullptr)
Restore card state.
Definition CardStateProvider.cpp:72
@ Played
@ Discarded
@ Returning
@ Disabled
@ InvalidArgument
@ Failed
StateValue toLegacyStateValue(const Value &value)
Project a canonical value into the legacy reload snapshot format.
Definition StateValue.cpp:60
Value toCanonicalStateValue(const StateValue &value)
Copy a legacy reload tree into the canonical owning value protocol.
Definition StateValue.cpp:38