Canonical notify descriptor owner and runtime handler router. 更多...
#include <ActionNotifyRegistry.h>
Public 成员函数 | |
| Result< void > | registerDescriptor (ActionNotifyDescriptor descriptor) |
| Register a unique descriptor after validating its canonical type. | |
| Result< void > | registerHandler (std::string_view type, std::shared_ptr< IActionNotifyHandler > handler) |
| Register an owning handler for an existing descriptor. | |
| Result< void > | unregisterHandler (std::string_view type) |
| Remove a handler while retaining its descriptor for authoring. | |
| Result< ActionNotifyDescriptor > | descriptor (std::string_view type) const |
| Find an owning descriptor copy. | |
| std::vector< ActionNotifyDescriptor > | descriptors () const |
| Return descriptors in lexical type order. | |
| bool | hasHandler (std::string_view type) const noexcept |
| Return whether this registry has a runtime handler for the exact canonical type. | |
| Result< void > | validate (const ActionTimelineEvent &event) const |
| Validate type, shape and required payload fields. | |
| Result< void > | dispatch (const ActionTimelineEvent &event, const ActionNotifyContext &context) |
| Validate and route an event, failing observably when no handler is present. | |
| Result< void > | dispatchUpdate (const ActionActiveBlock &block, const ActionNotifyContext &context) |
| Route one authoritative active-state update to its registered handler. | |
| Result< void > | dispatchSample (const ActionActiveBlock &block, const ActionNotifyContext &context) const |
| Route one side-effect-free preview sample to its registered handler. | |
| Result< void > | advanceHandlers (const ActionNotifyContext &context) |
| Advance each unique registered handler once in lexical type order. | |
静态 Public 成员函数 | |
| static Result< ActionNotifyRegistry > | withBuiltins () |
| Build a registry containing the engine's standard semantic notify types. | |
详细描述
Canonical notify descriptor owner and runtime handler router.
Descriptor queries return owning copies. Handlers are shared-owned by the registry so plugin unload cannot leave a raw pointer. All methods are owner-thread-only; unregister before unloading handler code.
在文件 ActionNotifyRegistry.h 第 138 行定义.
成员函数说明
◆ advanceHandlers()
| Result< void > eve::action::ActionNotifyRegistry::advanceHandlers | ( | const ActionNotifyContext & | context | ) |
Advance each unique registered handler once in lexical type order.
在文件 ActionNotifyRegistry.cpp 第 369 行定义.
引用了 eve::Applied, context, handler, eve::NoOp, second, eve::Status::success(), eve::Result< T >::success() , 以及 type.
◆ descriptor()
| Result< ActionNotifyDescriptor > eve::action::ActionNotifyRegistry::descriptor | ( | std::string_view | type | ) | const |
Find an owning descriptor copy.
- 参数
-
type Registered type.
在文件 ActionNotifyRegistry.cpp 第 262 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::NotFound, eve::Result< T >::success() , 以及 type.
被这些函数引用 eve::editor::ActionTimelineWidget::inspectSelection().
◆ descriptors()
| std::vector< ActionNotifyDescriptor > eve::action::ActionNotifyRegistry::descriptors | ( | ) | const |
Return descriptors in lexical type order.
在文件 ActionNotifyRegistry.cpp 第 270 行定义.
被这些函数引用 eve::editor::ActionTimelineWidget::insertableTypes().
◆ dispatch()
| Result< void > eve::action::ActionNotifyRegistry::dispatch | ( | const ActionTimelineEvent & | event, |
| const ActionNotifyContext & | context | ||
| ) |
Validate and route an event, failing observably when no handler is present.
- 参数
-
event Event projection. context Dispatch context.
在文件 ActionNotifyRegistry.cpp 第 337 行定义.
引用了 context, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::LogicalId::format(), handler, eve::NotFound, eve::action::ActionTimelineEvent::type, valid , 以及 validate().
被这些函数引用 eve::action::ActionBlockRuntime::apply() , 以及 eve::action::ActionBlockRuntime::interrupt().
◆ dispatchSample()
| Result< void > eve::action::ActionNotifyRegistry::dispatchSample | ( | const ActionActiveBlock & | block, |
| const ActionNotifyContext & | context | ||
| ) | const |
Route one side-effect-free preview sample to its registered handler.
- 参数
-
block Active block. context Preview context.
在文件 ActionNotifyRegistry.cpp 第 357 行定义.
引用了 context, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::LogicalId::format(), handler, eve::action::ActionActiveBlock::itemId, eve::NotFound, eve::action::ActionActiveBlock::payload, eve::action::StateEnter, eve::action::ActionActiveBlock::trackId, eve::action::ActionActiveBlock::type, valid , 以及 validate().
◆ dispatchUpdate()
| Result< void > eve::action::ActionNotifyRegistry::dispatchUpdate | ( | const ActionActiveBlock & | block, |
| const ActionNotifyContext & | context | ||
| ) |
Route one authoritative active-state update to its registered handler.
- 参数
-
block Active block. context Dispatch context.
在文件 ActionNotifyRegistry.cpp 第 346 行定义.
引用了 context, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::LogicalId::format(), handler, eve::action::ActionActiveBlock::itemId, eve::NotFound, eve::action::ActionActiveBlock::payload, eve::action::StateEnter, eve::action::ActionActiveBlock::trackId, eve::action::ActionActiveBlock::type, valid , 以及 validate().
◆ hasHandler()
|
noexcept |
Return whether this registry has a runtime handler for the exact canonical type.
在文件 ActionNotifyRegistry.cpp 第 277 行定义.
引用了 type.
◆ registerDescriptor()
| Result< void > eve::action::ActionNotifyRegistry::registerDescriptor | ( | ActionNotifyDescriptor | descriptor | ) |
Register a unique descriptor after validating its canonical type.
- 参数
-
descriptor Owning contract.
在文件 ActionNotifyRegistry.cpp 第 227 行定义.
引用了 eve::AlreadyExists, eve::Applied, descriptor, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, key, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 withBuiltins().
◆ registerHandler()
| Result< void > eve::action::ActionNotifyRegistry::registerHandler | ( | std::string_view | type, |
| std::shared_ptr< IActionNotifyHandler > | handler | ||
| ) |
Register an owning handler for an existing descriptor.
- 参数
-
type Registered type. handler Shared handler owner.
在文件 ActionNotifyRegistry.cpp 第 243 行定义.
引用了 eve::AlreadyExists, eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), handler, eve::InvalidArgument, eve::NotFound, eve::Status::success(), eve::Result< T >::success() , 以及 type.
被这些函数引用 withBuiltins().
◆ unregisterHandler()
| Result< void > eve::action::ActionNotifyRegistry::unregisterHandler | ( | std::string_view | type | ) |
Remove a handler while retaining its descriptor for authoring.
- 参数
-
type Registered type.
在文件 ActionNotifyRegistry.cpp 第 254 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::NotFound, eve::Status::success(), eve::Result< T >::success() , 以及 type.
◆ validate()
| Result< void > eve::action::ActionNotifyRegistry::validate | ( | const ActionTimelineEvent & | event | ) | const |
Validate type, shape and required payload fields.
- 参数
-
event Owning event projection.
在文件 ActionNotifyRegistry.cpp 第 279 行定义.
引用了 audio, camera, curve, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::LogicalId::format(), found, eve::action::ActionCameraCueBinding::fromPayload(), eve::action::ActionDamageBinding::fromPayload(), eve::action::ActionGameplayEventBinding::fromPayload(), eve::action::ActionParameterCurveBinding::fromPayload(), eve::action::ActionPrefabSpawnBinding::fromPayload(), eve::action::ActionAttackVfxBinding::fromPayload(), eve::action::ActionAudioBinding::fromPayload(), eve::action::ActionVfxBinding::fromPayload(), eve::action::ActionStateWindowBinding::fromPayload(), eve::action::Instant, eve::InvalidArgument, eve::NotFound, eve::action::Notify, eve::action::ActionTimelineEvent::payload, prefab, shape, eve::action::State, eve::Result< T >::success() , 以及 eve::action::ActionTimelineEvent::type.
被这些函数引用 eve::editor::ActionTimelineWidget::addNotifyAtCursor(), eve::editor::ActionTimelineWidget::addStateAtCursor(), dispatch(), dispatchSample(), dispatchUpdate(), eve::editor::ActionTimelinePayloadEditor::fitClipToBlock(), eve::editor::ActionTimelinePayloadEditor::fitClipToNaturalDuration(), eve::editor::ActionTimelineWidget::inspectSelection() , 以及 eve::editor::ActionTimelinePayloadEditor::patch().
◆ withBuiltins()
|
static |
Build a registry containing the engine's standard semantic notify types.
在文件 ActionNotifyRegistry.cpp 第 172 行定义.
引用了 descriptor, eve::Result< T >::failure(), eve::action::IActionNotifyProvider::install(), eve::action::Instant, eve::NoOp, registerDescriptor(), registerHandler(), eve::action::State, eve::Result< T >::status(), eve::Status::success(), eve::Result< T >::success() , 以及 type.
该类的文档由以下文件生成:
- src/modules/action/ActionNotifyRegistry.h
- src/modules/action/ActionNotifyRegistry.cpp