Script-facing registry and runner for compiled .dnut conversations. 更多...
#include <DialogueFlow.h>
类 | |
| struct | IntegrationConfig |
| Borrowed world and cross-domain callbacks used by all conversations in this facade. 更多... | |
Public 成员函数 | |
| Module_REG (DialogueFlow) | |
| DialogueFlow () | |
| ~DialogueFlow () override | |
| void | configureIntegration (IntegrationConfig config) |
| Configure every runner in this module facade in one operation. | |
| void | clearIntegration () |
| Remove explicit providers and callbacks from the facade. | |
| const DialogueStateContext & | stateContext () const noexcept |
| Return the facade-owned state boundary; providers remain borrowed. | |
| eve::Result< eve::MutationReceipt > | applyStateMutations (std::span< const eve::StateMutation > mutations, const eve::MutationContext &context) const |
| Apply mutations through the configured authoritative provider. | |
| eve::Result< int > | loadDnutChecked (const std::string &source, const std::string &sourceId) |
| Compile, validate, and atomically commit one versioned dnut document. | |
| eve::Result< int > | reloadDnutChecked (const std::string &source, const std::string &sourceId) |
| Transactionally replace one source while preserving a migratable active runner. | |
| eve::Result< int > | loadDnutFileChecked (const std::string &path) |
| Read through the injected filesystem capability and call loadDnutChecked. | |
| eve::Result< int > | importYarnChecked (const std::string &source, const std::string &path) |
| eve::Result< int > | importTweeChecked (const std::string &source, const std::string &path) |
| eve::Result< void > | removeSourceChecked (const std::string &path) |
| eve::Result< void > | lintAllChecked () |
| eve::Result< void > | renameConversationChecked (const std::string &oldId, const std::string &newId) |
| eve::Result< void > | renameNodeChecked (const std::string &conversationId, const std::string &oldId, const std::string &newId) |
| bool | getLastLoadChanged () const |
| void | clear () |
| int | getConversationCount () const |
| std::string | getConversationId (int index) const |
| bool | hasConversation (const std::string &id) const |
| std::string | exportLocalizationCsv () const |
| eve::Result< int > | importLocalizationCsvChecked (const std::string &csv, const std::string &defaultLocale) |
| Import localized strings transactionally and return the imported row count. | |
| std::string | exportMissingLocalizationCsv (const std::string &locale) const |
| std::string | exportVoiceRecordingCsv (const std::string &locale) const |
| eve::Result< int > | validateLocalization (const eve::i18n::I18n &localization, const std::string &locale) const |
| Validate that every referenced dialogue localization key exists in one exact locale. | |
| void | setLocale (const std::string &locale) |
| std::string | getLocale () const |
| int | getDiagnosticCount () const |
| std::string | getDiagnosticSeverity (int index) const |
| std::string | getDiagnosticPath (int index) const |
| int | getDiagnosticLine (int index) const |
| int | getDiagnosticColumn (int index) const |
| Return the one-based source column for a diagnostic, or zero when unavailable. | |
| std::string | getDiagnosticCode (int index) const |
| Return the stable machine-readable diagnostic code. | |
| std::string | getDiagnosticAssetPath (int index) const |
| Return the stable asset/node/route path associated with a diagnostic. | |
| std::string | getDiagnosticMessage (int index) const |
| ConversationDocument * | newDocument (const std::string &id) const |
| Create an empty UI-neutral conversation document. | |
| ConversationDocument * | getDocument (const std::string &id) const |
| Create an editable copy of a registered conversation. | |
| eve::Result< void > | applyDocumentChecked (ConversationDocument *document) |
| Validate and transactionally insert or replace an authored document. | |
| eve::Result< void > | startChecked (const std::string &id, ssq::Object bindings) |
| Start a conversation after validating script bindings. | |
| eve::Result< void > | startChecked (const std::string &id) |
| Start a conversation with an empty binding table. | |
| bool | start (const std::string &id, ssq::Object bindings) |
| Compatibility-only bool projection of startChecked. | |
| eve::Result< void > | advanceChecked () |
| Advance the active conversation with a structured runner diagnostic. | |
| eve::Result< void > | resumeCommandChecked (const std::string &requestId, eve::Value value) |
| Resume the exact asynchronous command currently owned by the runner. | |
| std::string | getPendingCommandRequestId () const |
| Return the current pending command id, or an empty string when none is pending. | |
| eve::Result< void > | select (const std::string &routeId) |
| Select a route, atomically applying configured payment/state effects. | |
| bool | isActive () const |
| bool | isBlocked () const |
| std::string | getConversationId () const |
| std::string | getNodeId () const |
| std::string | getNodeKind () const |
| std::string | getSpeaker () const |
| std::string | getText () |
| std::string | getPool () const |
| std::string | getI18nKey () const |
| std::string | getVoice () const |
| std::string | getVoiceStatus () const |
| float | getVoiceDuration () const |
| int | getRouteCount () const |
| std::string | getRouteId (int index) const |
| std::string | getRouteText (int index) const |
| Return localized presentation text independently from the stable route id. | |
| void | setManualCommandMode (bool enabled) |
| Suspend handler-less commands until resumeCommandChecked is called. | |
| eve::Result< void > | setExpressionEvaluatorChecked (ssq::Object fn) |
| Register one pure Squirrel evaluator receiving {expression,bindings,locals}. | |
| void | clearExpressionEvaluator () |
| eve::Result< StateValue > | captureStateChecked () const |
| eve::Result< void > | restoreStateChecked (const StateValue &in) |
| eve::Result< std::string > | captureStateJsonChecked () const |
| eve::Result< void > | restoreStateJsonChecked (const std::string &json) |
| eve::Result< void > | registerMigrationChecked (const std::string &assetId, int fromVersion, const std::string ¤tAssetId, const std::string &nodeMap) |
| void | clearMigrations () |
| void | addToneRule (const std::string &expression, const std::string &prefix, const std::string &suffix, const std::string &find, const std::string &replacement) |
| void | clearToneRules () |
| eve::Result< void > | publishGameplay (const std::string &instanceId, const std::string &ownerId) |
把本模块的对话运行器发布到共享玩法协议(eve_gameplay / MCP)。 | |
| eve::Result< void > | unpublishGameplay (const std::string &instanceId) |
| 取消发布一个实例;该实例未发布(或 id 非法)时返回诊断。 | |
| void | clearGameplayControls () |
| 取消发布本模块持有的全部玩法实例。 | |
| int | gameplayControlCount () const |
| 已发布的玩法实例数量(0 或 1)。 | |
| std::vector< std::string > | gameplayInstances () const |
| 已发布的玩法实例标识(发布顺序)。 | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
详细描述
Script-facing registry and runner for compiled .dnut conversations.
在文件 DialogueFlow.h 第 43 行定义.
构造及析构函数说明
◆ DialogueFlow()
| eve::dialogue::DialogueFlow::DialogueFlow | ( | ) |
◆ ~DialogueFlow()
|
override |
在文件 DialogueFlow.cpp 第 188 行定义.
引用了 clearExpressionEvaluator(), clearGameplayControls() , 以及 clearIntegration().
成员函数说明
◆ addToneRule()
| void eve::dialogue::DialogueFlow::addToneRule | ( | const std::string & | expression, |
| const std::string & | prefix, | ||
| const std::string & | suffix, | ||
| const std::string & | find, | ||
| const std::string & | replacement | ||
| ) |
在文件 DialogueFlow.cpp 第 1172 行定义.
◆ advanceChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::advanceChecked | ( | ) |
Advance the active conversation with a structured runner diagnostic.
- 返回
- Applied on success; failure preserves the runner's validated state. @thread Affine to the DialogueFlow thread. @reentrancy May synchronously invoke configured command handlers.
在文件 DialogueFlow.cpp 第 883 行定义.
引用了 eve::dnut::SequenceRuntime::advance(), eve::Applied, eve::Result< T >::failure(), eve::Status::success() , 以及 eve::Result< T >::success().
◆ applyDocumentChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::applyDocumentChecked | ( | ConversationDocument * | document | ) |
Validate and transactionally insert or replace an authored document.
在文件 DialogueFlow.cpp 第 815 行定义.
引用了 eve::dialogue::ConversationDocument::asset(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::dialogue::lintConversationWorkspace() , 以及 eve::Result< T >::success().
◆ applyStateMutations()
| eve::Result< eve::MutationReceipt > eve::dialogue::DialogueFlow::applyStateMutations | ( | std::span< const eve::StateMutation > | mutations, |
| const eve::MutationContext & | context | ||
| ) | const |
Apply mutations through the configured authoritative provider.
在文件 DialogueFlow.cpp 第 301 行定义.
引用了 context.
◆ captureStateChecked()
| eve::Result< StateValue > eve::dialogue::DialogueFlow::captureStateChecked | ( | ) | const |
◆ captureStateJsonChecked()
| eve::Result< std::string > eve::dialogue::DialogueFlow::captureStateJsonChecked | ( | ) | const |
在文件 DialogueFlow.cpp 第 1151 行定义.
引用了 eve::dialogue::conversationStateToJson() , 以及 eve::Result< T >::failure().
◆ clear()
| void eve::dialogue::DialogueFlow::clear | ( | ) |
在文件 DialogueFlow.cpp 第 725 行定义.
◆ clearExpressionEvaluator()
| void eve::dialogue::DialogueFlow::clearExpressionEvaluator | ( | ) |
在文件 DialogueFlow.cpp 第 1083 行定义.
被这些函数引用 ~DialogueFlow().
◆ clearGameplayControls()
| void eve::dialogue::DialogueFlow::clearGameplayControls | ( | ) |
◆ clearIntegration()
| void eve::dialogue::DialogueFlow::clearIntegration | ( | ) |
Remove explicit providers and callbacks from the facade.
- 备注
- Capability-discovered query providers remain available to the shared condition adapter after this call.
在文件 DialogueFlow.cpp 第 299 行定义.
被这些函数引用 ~DialogueFlow().
◆ clearMigrations()
|
inline |
在文件 DialogueFlow.h 第 252 行定义.
◆ clearToneRules()
|
inline |
在文件 DialogueFlow.h 第 255 行定义.
◆ configureIntegration()
| void eve::dialogue::DialogueFlow::configureIntegration | ( | IntegrationConfig | config | ) |
Configure every runner in this module facade in one operation.
Call while the flow is inactive, before start, and on the same thread that will call start, advance, select, or applyStateMutations. The provider pointers are borrowed and must outlive this facade, or the caller must call clearIntegration() first. Handlers receive an owning request snapshot and must not retain it or re-enter this facade. DialogueFlow owns no world state and creates no second state mirror.
在文件 DialogueFlow.cpp 第 239 行定义.
引用了 eve::dialogue::DialogueFlow::IntegrationConfig::accounts, eve::dialogue::DialogueFlow::IntegrationConfig::commandParticipantFactory, eve::dialogue::DialogueFlow::IntegrationConfig::conditionEvaluator, eve::condition::conditionReasonCodeName(), eve::dialogue::DialogueFlow::IntegrationConfig::contentReader, eve::dialogue::DialogueStateContext::evaluate(), eve::dialogue::DialogueFlow::IntegrationConfig::gameplayActionHandler, eve::Value::isString(), eve::dialogue::DialogueFlow::IntegrationConfig::operationHandler, eve::dnut::SequenceConditionOutcome::passed, result, eve::dialogue::DialoguePaymentAdapter::setBindings(), eve::dnut::SequenceRuntime::setConditionEvaluator(), eve::dialogue::DialogueStateContext::setMutationProvider(), eve::dialogue::DialogueStateContext::setQueryProvider(), eve::dialogue::DialogueStateContext::setSubject(), eve::dialogue::DialogueFlow::IntegrationConfig::stateMutation, eve::dialogue::DialogueFlow::IntegrationConfig::stateQuery, eve::dialogue::DialogueFlow::IntegrationConfig::subject , 以及 value.
被这些函数引用 DialogueFlow().
◆ exportLocalizationCsv()
| std::string eve::dialogue::DialogueFlow::exportLocalizationCsv | ( | ) | const |
在文件 DialogueFlow.cpp 第 751 行定义.
◆ exportMissingLocalizationCsv()
| std::string eve::dialogue::DialogueFlow::exportMissingLocalizationCsv | ( | const std::string & | locale | ) | const |
在文件 DialogueFlow.cpp 第 764 行定义.
◆ exportVoiceRecordingCsv()
| std::string eve::dialogue::DialogueFlow::exportVoiceRecordingCsv | ( | const std::string & | locale | ) | const |
在文件 DialogueFlow.cpp 第 768 行定义.
◆ gameplayControlCount()
| int eve::dialogue::DialogueFlow::gameplayControlCount | ( | ) | const |
已发布的玩法实例数量(0 或 1)。
在文件 DialogueFlow.cpp 第 230 行定义.
◆ gameplayInstances()
| std::vector< std::string > eve::dialogue::DialogueFlow::gameplayInstances | ( | ) | const |
◆ getConversationCount()
| int eve::dialogue::DialogueFlow::getConversationCount | ( | ) | const |
在文件 DialogueFlow.cpp 第 742 行定义.
◆ getConversationId() [1/2]
| std::string eve::dialogue::DialogueFlow::getConversationId | ( | ) | const |
在文件 DialogueFlow.cpp 第 1009 行定义.
引用了 eve::dnut::SequenceRuntime::asset() , 以及 eve::dnut::SequenceAsset::id.
◆ getConversationId() [2/2]
| std::string eve::dialogue::DialogueFlow::getConversationId | ( | int | index | ) | const |
在文件 DialogueFlow.cpp 第 744 行定义.
引用了 index.
◆ getDiagnosticAssetPath()
| std::string eve::dialogue::DialogueFlow::getDiagnosticAssetPath | ( | int | index | ) | const |
Return the stable asset/node/route path associated with a diagnostic.
在文件 DialogueFlow.cpp 第 850 行定义.
引用了 index.
◆ getDiagnosticCode()
| std::string eve::dialogue::DialogueFlow::getDiagnosticCode | ( | int | index | ) | const |
◆ getDiagnosticColumn()
| int eve::dialogue::DialogueFlow::getDiagnosticColumn | ( | int | index | ) | const |
Return the one-based source column for a diagnostic, or zero when unavailable.
在文件 DialogueFlow.cpp 第 842 行定义.
引用了 index.
◆ getDiagnosticCount()
| int eve::dialogue::DialogueFlow::getDiagnosticCount | ( | ) | const |
在文件 DialogueFlow.cpp 第 792 行定义.
◆ getDiagnosticLine()
| int eve::dialogue::DialogueFlow::getDiagnosticLine | ( | int | index | ) | const |
在文件 DialogueFlow.cpp 第 804 行定义.
引用了 index.
◆ getDiagnosticMessage()
| std::string eve::dialogue::DialogueFlow::getDiagnosticMessage | ( | int | index | ) | const |
在文件 DialogueFlow.cpp 第 855 行定义.
◆ getDiagnosticPath()
| std::string eve::dialogue::DialogueFlow::getDiagnosticPath | ( | int | index | ) | const |
在文件 DialogueFlow.cpp 第 800 行定义.
引用了 index.
◆ getDiagnosticSeverity()
| std::string eve::dialogue::DialogueFlow::getDiagnosticSeverity | ( | int | index | ) | const |
在文件 DialogueFlow.cpp 第 794 行定义.
引用了 index.
◆ getDocument()
| ConversationDocument * eve::dialogue::DialogueFlow::getDocument | ( | const std::string & | id | ) | const |
Create an editable copy of a registered conversation.
在文件 DialogueFlow.cpp 第 810 行定义.
◆ getI18nKey()
| std::string eve::dialogue::DialogueFlow::getI18nKey | ( | ) | const |
◆ getLastLoadChanged()
|
inline |
在文件 DialogueFlow.h 第 129 行定义.
◆ getLocale()
|
inline |
在文件 DialogueFlow.h 第 155 行定义.
◆ getNodeId()
|
inline |
在文件 DialogueFlow.h 第 224 行定义.
◆ getNodeKind()
| std::string eve::dialogue::DialogueFlow::getNodeKind | ( | ) | const |
在文件 DialogueFlow.cpp 第 1011 行定义.
引用了 eve::dnut::SequenceRuntime::currentNode(), node , 以及 eve::dnut::SequenceNode::type.
◆ getPendingCommandRequestId()
|
inline |
Return the current pending command id, or an empty string when none is pending.
在文件 DialogueFlow.h 第 213 行定义.
◆ getPool()
| std::string eve::dialogue::DialogueFlow::getPool | ( | ) | const |
◆ getRouteCount()
| int eve::dialogue::DialogueFlow::getRouteCount | ( | ) | const |
在文件 DialogueFlow.cpp 第 1060 行定义.
◆ getRouteId()
| std::string eve::dialogue::DialogueFlow::getRouteId | ( | int | index | ) | const |
在文件 DialogueFlow.cpp 第 1065 行定义.
引用了 eve::dnut::SequenceRuntime::currentNode(), index, label, node , 以及 eve::dnut::SequenceNode::routes.
◆ getRouteText()
| std::string eve::dialogue::DialogueFlow::getRouteText | ( | int | index | ) | const |
Return localized presentation text independently from the stable route id.
在文件 DialogueFlow.cpp 第 1126 行定义.
引用了 eve::dnut::SequenceRuntime::currentNode(), index, node, eve::dnut::SequenceNode::routes, eve::dialogue::sequenceRoutePayloadString() , 以及 text.
◆ getSpeaker()
| std::string eve::dialogue::DialogueFlow::getSpeaker | ( | ) | const |
◆ getText()
| std::string eve::dialogue::DialogueFlow::getText | ( | ) |
◆ getVoice()
| std::string eve::dialogue::DialogueFlow::getVoice | ( | ) | const |
在文件 DialogueFlow.cpp 第 1042 行定义.
引用了 eve::dnut::SequenceRuntime::currentNode(), node , 以及 eve::dialogue::sequencePayloadString().
◆ getVoiceDuration()
| float eve::dialogue::DialogueFlow::getVoiceDuration | ( | ) | const |
在文件 DialogueFlow.cpp 第 1054 行定义.
引用了 eve::dnut::SequenceRuntime::currentNode(), node , 以及 eve::dialogue::sequencePayloadString().
◆ getVoiceStatus()
| std::string eve::dialogue::DialogueFlow::getVoiceStatus | ( | ) | const |
在文件 DialogueFlow.cpp 第 1049 行定义.
引用了 eve::dnut::SequenceRuntime::currentNode(), node , 以及 eve::dialogue::sequencePayloadString().
◆ hasConversation()
| bool eve::dialogue::DialogueFlow::hasConversation | ( | const std::string & | id | ) | const |
在文件 DialogueFlow.cpp 第 749 行定义.
◆ importLocalizationCsvChecked()
| eve::Result< int > eve::dialogue::DialogueFlow::importLocalizationCsvChecked | ( | const std::string & | csv, |
| const std::string & | defaultLocale | ||
| ) |
Import localized strings transactionally and return the imported row count.
在文件 DialogueFlow.cpp 第 753 行定义.
引用了 count, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::ParseError , 以及 eve::Result< T >::success().
◆ importTweeChecked()
| eve::Result< int > eve::dialogue::DialogueFlow::importTweeChecked | ( | const std::string & | source, |
| const std::string & | path | ||
| ) |
在文件 DialogueFlow.cpp 第 715 行定义.
引用了 eve::Result< T >::failure(), imported, eve::dialogue::importTweeConversation(), path , 以及 source.
◆ importYarnChecked()
| eve::Result< int > eve::dialogue::DialogueFlow::importYarnChecked | ( | const std::string & | source, |
| const std::string & | path | ||
| ) |
在文件 DialogueFlow.cpp 第 705 行定义.
引用了 eve::Result< T >::failure(), imported, eve::dialogue::importYarnConversation(), path , 以及 source.
◆ isActive()
|
inline |
在文件 DialogueFlow.h 第 221 行定义.
◆ isBlocked()
|
inline |
在文件 DialogueFlow.h 第 222 行定义.
◆ lintAllChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::lintAllChecked | ( | ) |
◆ loadDnutChecked()
| eve::Result< int > eve::dialogue::DialogueFlow::loadDnutChecked | ( | const std::string & | source, |
| const std::string & | sourceId | ||
| ) |
Compile, validate, and atomically commit one versioned dnut document.
在文件 DialogueFlow.cpp 第 679 行定义.
◆ loadDnutFileChecked()
| eve::Result< int > eve::dialogue::DialogueFlow::loadDnutFileChecked | ( | const std::string & | path | ) |
Read through the injected filesystem capability and call loadDnutChecked.
在文件 DialogueFlow.cpp 第 687 行定义.
引用了 path.
◆ Module_REG()
| eve::dialogue::DialogueFlow::Module_REG | ( | DialogueFlow | ) |
◆ newDocument()
| ConversationDocument * eve::dialogue::DialogueFlow::newDocument | ( | const std::string & | id | ) | const |
Create an empty UI-neutral conversation document.
在文件 DialogueFlow.cpp 第 808 行定义.
◆ publishGameplay()
| eve::Result< void > eve::dialogue::DialogueFlow::publishGameplay | ( | const std::string & | instanceId, |
| const std::string & | ownerId | ||
| ) |
把本模块的对话运行器发布到共享玩法协议(eve_gameplay / MCP)。
运行器一次只跑一个对话,因此领域最多发布一个实例:重复发布返回 Conflict,避免两个身份指向同一个运行器。动作词表就是本模块自己的操作 (start/advance/select),观察结果是当前节点、说话人、文本与路由。
- 参数
-
instanceId 实例稳定标识,必须是规范持久 id(UUID 文本)。 ownerId 控制该实例的玩家/角色稳定标识,同为规范持久 id。
- 返回
- 成功返回空结果;id 非法或运行器已发布时返回诊断。 @ownership 适配器由本模块持有并随模块销毁;运行器所有权不变。 @thread 所有者模拟线程。
在文件 DialogueFlow.cpp 第 200 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::SubjectRef::fromPersistentId(), instanceId, eve::InvalidArgument, owner , 以及 eve::detail::Id128< Tag >::parse().
◆ registerMigrationChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::registerMigrationChecked | ( | const std::string & | assetId, |
| int | fromVersion, | ||
| const std::string & | currentAssetId, | ||
| const std::string & | nodeMap | ||
| ) |
在文件 DialogueFlow.cpp 第 1166 行定义.
◆ reloadDnutChecked()
| eve::Result< int > eve::dialogue::DialogueFlow::reloadDnutChecked | ( | const std::string & | source, |
| const std::string & | sourceId | ||
| ) |
Transactionally replace one source while preserving a migratable active runner.
在文件 DialogueFlow.cpp 第 683 行定义.
◆ removeSourceChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::removeSourceChecked | ( | const std::string & | path | ) |
在文件 DialogueFlow.cpp 第 494 行定义.
引用了 eve::Conflict, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::dialogue::Dialogue::getLastPoolsError(), eve::dnut::SequenceRuntime::isActive(), eve::NotFound, path, eve::PreconditionViolation, eve::dialogue::Dialogue::replacePoolsFromData(), source , 以及 eve::Result< T >::success().
◆ renameConversationChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::renameConversationChecked | ( | const std::string & | oldId, |
| const std::string & | newId | ||
| ) |
在文件 DialogueFlow.cpp 第 595 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), ids, eve::InvalidArgument, eve::dnut::SequenceRuntime::isActive(), eve::dialogue::lintConversationWorkspace(), owner, path, eve::PreconditionViolation, eve::dialogue::renameConversationAsset() , 以及 eve::Result< T >::success().
◆ renameNodeChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::renameNodeChecked | ( | const std::string & | conversationId, |
| const std::string & | oldId, | ||
| const std::string & | newId | ||
| ) |
◆ restoreStateChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::restoreStateChecked | ( | const StateValue & | in | ) |
在文件 DialogueFlow.cpp 第 1140 行定义.
引用了 eve::dnut::SequenceRuntime::restoreState() , 以及 eve::dialogue::toCanonicalValue().
◆ restoreStateJsonChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::restoreStateJsonChecked | ( | const std::string & | json | ) |
◆ resumeCommandChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::resumeCommandChecked | ( | const std::string & | requestId, |
| eve::Value | value | ||
| ) |
Resume the exact asynchronous command currently owned by the runner.
- 参数
-
requestId Stable id returned by getPendingCommandRequestId(). value Owning command result converted synchronously into runner locals.
- 返回
- Applied on success; stale, duplicate, or mismatched ids leave state unchanged. @thread Affine to the DialogueFlow owner thread. @reentrancy Does not invoke integration callbacks while mutating runner state.
在文件 DialogueFlow.cpp 第 889 行定义.
◆ select()
| eve::Result< void > eve::dialogue::DialogueFlow::select | ( | const std::string & | routeId | ) |
Select a route, atomically applying configured payment/state effects.
- 返回
- Applied on success, or the canonical dialogue/transaction diagnostic. @thread Affine to the configured DialogueFlow thread. @reentrancy Providers are invoked synchronously and must not re-enter this flow.
在文件 DialogueFlow.cpp 第 893 行定义.
引用了 eve::Applied, eve::dnut::SequenceRuntime::captureState(), committed, eve::dnut::SequenceRuntime::currentNode(), eve::dialogue::decodeSequencePayment(), eve::dialogue::decodeSequenceStateMutations(), eve::dialogue::PaymentSpec::empty(), eve::Diagnostic::error(), eve::Result< T >::failure(), node, eve::dnut::SequenceRoute::payload, eve::dnut::SequenceRuntime::selectRouteForTransaction(), state, eve::Status::success(), eve::Result< T >::success() , 以及 eve::Unsupported.
◆ setExpressionEvaluatorChecked()
| eve::Result< void > eve::dialogue::DialogueFlow::setExpressionEvaluatorChecked | ( | ssq::Object | fn | ) |
Register one pure Squirrel evaluator receiving {expression,bindings,locals}.
Install the checked pure-expression callback used by branch evaluation.
在文件 DialogueFlow.cpp 第 1072 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), fn, eve::InvalidArgument , 以及 eve::Result< T >::success().
◆ setLocale()
|
inline |
在文件 DialogueFlow.h 第 154 行定义.
◆ setManualCommandMode()
| void eve::dialogue::DialogueFlow::setManualCommandMode | ( | bool | enabled | ) |
Suspend handler-less commands until resumeCommandChecked is called.
在文件 DialogueFlow.cpp 第 1135 行定义.
引用了 enabled.
◆ start()
| bool eve::dialogue::DialogueFlow::start | ( | const std::string & | id, |
| ssq::Object | bindings | ||
| ) |
Compatibility-only bool projection of startChecked.
◆ startChecked() [1/2]
| eve::Result< void > eve::dialogue::DialogueFlow::startChecked | ( | const std::string & | id | ) |
Start a conversation with an empty binding table.
- 参数
-
id Conversation id to start.
- 返回
- Applied on success, or the same structured diagnostics as the binding-carrying overload.
- 备注
- Entry point for hosts without a Squirrel call frame (MCP /
eve_gameplay). When a VM is attached the empty table is a real Squirrel table, so conditions that read bindings resolve as absent instead of reading an invalid object.
在文件 DialogueFlow.cpp 第 194 行定义.
引用了 bindings , 以及 startChecked().
◆ startChecked() [2/2]
| eve::Result< void > eve::dialogue::DialogueFlow::startChecked | ( | const std::string & | id, |
| ssq::Object | bindings | ||
| ) |
Start a conversation after validating script bindings.
- 返回
- Applied on success, or a structured missing-asset/binding/runner diagnostic. @thread Affine to the DialogueFlow thread. @reentrancy Does not invoke integration callbacks.
在文件 DialogueFlow.cpp 第 861 行定义.
引用了 eve::Applied, bindings, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::StateValue::isObject(), eve::NotFound, eve::StateValue::object(), ok, eve::dnut::SequenceRuntime::start(), started, eve::Status::success(), eve::Result< T >::success(), eve::dialogue::toCanonicalValue() , 以及 top.
被这些函数引用 startChecked() , 以及 eve::dialogue::DialogueControl::submitGameplay().
◆ stateContext()
|
inlinenoexcept |
Return the facade-owned state boundary; providers remain borrowed.
在文件 DialogueFlow.h 第 111 行定义.
◆ unpublishGameplay()
| eve::Result< void > eve::dialogue::DialogueFlow::unpublishGameplay | ( | const std::string & | instanceId | ) |
取消发布一个实例;该实例未发布(或 id 非法)时返回诊断。
在文件 DialogueFlow.cpp 第 215 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::SubjectRef::fromPersistentId(), instanceId, eve::InvalidArgument, eve::NotFound , 以及 eve::detail::Id128< Tag >::parse().
◆ validateLocalization()
| eve::Result< int > eve::dialogue::DialogueFlow::validateLocalization | ( | const eve::i18n::I18n & | localization, |
| const std::string & | locale | ||
| ) | const |
Validate that every referenced dialogue localization key exists in one exact locale.
- 参数
-
localization Borrowed localization authority used only during this synchronous call. locale Exact locale to inspect; default-language substitution is intentionally not accepted.
- 返回
- Number of validated localized nodes, or a path-scoped missing-key diagnostic. @thread Main-thread only; neither module may be mutated concurrently. @reentrancy Does not invoke script or user callbacks.
在文件 DialogueFlow.cpp 第 772 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::i18n::I18n::hasInLanguage(), eve::i18n::I18n::hasLanguage(), key, node, eve::NotFound, eve::Ok, eve::dialogue::sequencePayloadString(), eve::Status::success() , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/dialogue/DialogueFlow.h
- src/modules/dialogue/DialogueFlow.cpp
Public 成员函数 继承自