Binds a typed effect runtime to a generation-qualified definition. 更多...
#include <EffectDefinitionRuntime.h>
Public 成员函数 | |
| EffectDefinitionRuntime (EffectDefinitionRuntime &&) noexcept=default | |
| Move an effect runtime while retaining its borrowed registry binding. | |
| EffectDefinitionRuntime & | operator= (EffectDefinitionRuntime &&) noexcept=default |
| Move-assign an effect runtime. | |
| EffectDefinitionRuntime (const EffectDefinitionRuntime &)=delete | |
| Effect runtimes are not implicitly copyable. | |
| EffectDefinitionRuntime & | operator= (const EffectDefinitionRuntime &)=delete |
| Effect runtimes are not implicitly copy-assignable. | |
| ~EffectDefinitionRuntime ()=default | |
| Destroy the effect runtime; the registry remains caller-owned. | |
| const eve::definition::InstanceIdentity & | identity () const noexcept |
| Borrow the unified instance identity. | |
| const EffectRuntimeState & | state () const noexcept |
| Borrow the strongly typed effect runtime state. | |
| EffectRuntimeState & | state () noexcept |
| Mutate the strongly typed effect runtime state on the owner thread. | |
| eve::definition::DefinitionHandle | definitionHandle () const noexcept |
| Borrow the current generation-qualified definition handle. | |
| eve::definition::ReloadPolicy | reloadPolicy () const noexcept |
| Return the configured reload policy. | |
| void | setActive (bool active) noexcept |
| Mark this effect active/inactive for RejectWhileActive. | |
| bool | isActive () const noexcept |
| Return whether the effect is active for reload policy decisions. | |
| eve::Result< void > | applyTo (EffectInstance *effect) const |
| Atomically project the typed runtime into an EffectInstance. | |
| eve::Result< eve::definition::ReloadOutcome > | reload (eve::definition::ReloadPolicy policy) |
| Resolve the registry's current generation and execute a policy. | |
静态 Public 成员函数 | |
| static eve::Result< EffectDefinitionRuntime > | create (eve::definitions::DefinitionRegistry ®istry, eve::DefinitionRef definition, std::string subject, std::string source, eve::PersistentId instanceId, eve::definition::ReloadPolicy policy=eve::definition::ReloadPolicy::KeepInstanceValues) |
| Create a typed effect runtime from a registry definition. | |
详细描述
Binds a typed effect runtime to a generation-qualified definition.
DefinitionRegistry and the target EffectInstance are borrowed. They must outlive each synchronous call. Reload uses the common four-policy contract and is atomic with respect to this adapter's typed state; callers explicitly call applyTo to update the container-owned instance.
在文件 EffectDefinitionRuntime.h 第 45 行定义.
构造及析构函数说明
◆ EffectDefinitionRuntime() [1/2]
|
defaultnoexcept |
Move an effect runtime while retaining its borrowed registry binding.
◆ EffectDefinitionRuntime() [2/2]
|
delete |
Effect runtimes are not implicitly copyable.
◆ ~EffectDefinitionRuntime()
|
default |
Destroy the effect runtime; the registry remains caller-owned.
成员函数说明
◆ applyTo()
| eve::Result< void > eve::effects::EffectDefinitionRuntime::applyTo | ( | EffectInstance * | effect | ) | const |
Atomically project the typed runtime into an EffectInstance.
- 参数
-
effect Borrowed container-owned instance; it is not retained.
- 返回
- Success, or InvalidArgument for a null destination.
在文件 EffectDefinitionRuntime.cpp 第 275 行定义.
引用了 eve::definition::InstanceIdentity::definition, eve::effects::EffectInstance::definitionIdentity, eve::effects::EffectRuntimeState::duration, eve::effects::EffectInstance::duration, effect, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::detail::Id128< Tag >::format(), eve::detail::Id128< Tag >::fromUuid(), eve::DefinitionRef::id(), eve::effects::EffectInstance::id, identity(), eve::effects::EffectInstance::identity, eve::definition::InstanceIdentity::instanceId, eve::InvalidArgument, eve::effects::EffectRuntimeState::magnitude, eve::effects::EffectInstance::magnitude, eve::LogicalId::name(), eve::effects::EffectRuntimeState::payload, eve::effects::EffectInstance::payload, eve::effects::EffectRuntimeState::policy, eve::effects::EffectInstance::policy, eve::effects::EffectRuntimeState::priority, eve::effects::EffectInstance::priority, eve::effects::EffectInstance::reloadPolicy, eve::effects::EffectRuntimeState::remaining, eve::effects::EffectInstance::remaining, eve::effects::EffectInstance::source, eve::effects::EffectRuntimeState::stackCount, eve::effects::EffectInstance::stackCount, eve::effects::EffectRuntimeState::stackKey, eve::effects::EffectInstance::stackKey, state(), eve::effects::EffectInstance::subject, eve::Result< T >::success(), eve::effects::EffectRuntimeState::tags, eve::effects::EffectInstance::tags , 以及 eve::effects::EffectInstance::type.
◆ create()
|
static |
Create a typed effect runtime from a registry definition.
- 参数
-
registry Registry whose lifetime exceeds this adapter. definition Logical effect:<name>reference.subject Non-empty owner/target projection for the EffectInstance. source Optional source projection. instanceId Non-nil persistent identity for this runtime instance. policy Policy used by later reload calls.
- 返回
- A typed runtime or a structured parse/resolution failure.
在文件 EffectDefinitionRuntime.cpp 第 236 行定义.
引用了 eve::definition::RuntimeInstance< State >::create(), eve::Diagnostic::error(), eve::Result< T >::failure(), handle, eve::InvalidArgument, source, state(), subject , 以及 eve::Result< T >::success().
◆ definitionHandle()
|
noexcept |
Borrow the current generation-qualified definition handle.
在文件 EffectDefinitionRuntime.cpp 第 267 行定义.
◆ identity()
|
noexcept |
Borrow the unified instance identity.
在文件 EffectDefinitionRuntime.cpp 第 259 行定义.
◆ isActive()
|
noexcept |
Return whether the effect is active for reload policy decisions.
在文件 EffectDefinitionRuntime.cpp 第 273 行定义.
◆ operator=() [1/2]
|
delete |
Effect runtimes are not implicitly copy-assignable.
◆ operator=() [2/2]
|
defaultnoexcept |
Move-assign an effect runtime.
◆ reload()
| eve::Result< eve::definition::ReloadOutcome > eve::effects::EffectDefinitionRuntime::reload | ( | eve::definition::ReloadPolicy | policy | ) |
Resolve the registry's current generation and execute a policy.
- 返回
- Reload outcome, or a failure leaving typed state and identity unchanged.
在文件 EffectDefinitionRuntime.cpp 第 302 行定义.
引用了 eve::effects::EffectRuntimeState::duration, eve::Diagnostic::error(), eve::Result< T >::failure(), identity(), eve::InvalidArgument, eve::effects::EffectRuntimeState::maxStacks, eve::effects::EffectRuntimeState::remaining, eve::effects::EffectRuntimeState::stackCount , 以及 eve::Result< T >::success().
◆ reloadPolicy()
|
inlinenoexcept |
Return the configured reload policy.
在文件 EffectDefinitionRuntime.h 第 82 行定义.
◆ setActive()
|
noexcept |
Mark this effect active/inactive for RejectWhileActive.
在文件 EffectDefinitionRuntime.cpp 第 271 行定义.
引用了 active.
◆ state() [1/2]
|
noexcept |
Borrow the strongly typed effect runtime state.
在文件 EffectDefinitionRuntime.cpp 第 263 行定义.
◆ state() [2/2]
|
noexcept |
Mutate the strongly typed effect runtime state on the owner thread.
在文件 EffectDefinitionRuntime.cpp 第 265 行定义.
该类的文档由以下文件生成:
- src/modules/effects/EffectDefinitionRuntime.h
- src/modules/effects/EffectDefinitionRuntime.cpp