RTS adapter that keeps the common container as the sole instance owner. 更多...
#include <RTSEffects.h>
Public 成员函数 | |
| eve::Result< effects::EffectHandle > | apply (const RTSEffectDefinition &definition, eve::SubjectRef subject) |
| Apply one typed effect to a stable subject. | |
| eve::Result< void > | remove (effects::EffectHandle handle) |
| Remove one generation-qualified effect handle. | |
| eve::Result< RTSEffectUpdate > | advance (const eve::SimulationStep &step) |
| Advance and settle RTS effects atomically. | |
| std::size_t | count () const noexcept |
| Return the number of active effect instances. | |
| RTSEffectSnapshot | snapshot () const |
| Capture effects and domain target state. | |
| eve::Result< void > | restore (const RTSEffectSnapshot &snapshot) |
| Restore effects and target state, invalidating prior handles. | |
| void | restoreSchedulerTick (eve::SimulationTick tick) noexcept |
| Align the contained lifecycle scheduler with an owning world checkpoint. | |
| eve::Result< const effects::EffectInstance * > | resolve (effects::EffectHandle handle) const |
| Resolve a live handle as a borrowed observation. | |
| double | multiplier (std::string_view field) const noexcept |
| Multiply one numeric payload across all active canonical effect instances. | |
| double | additive (std::string_view field) const noexcept |
| Sum one numeric payload across all active canonical effect instances. | |
| RTSEffectTarget & | target () noexcept |
| Access the adapter-owned RTS target state. | |
| const RTSEffectTarget & | target () const noexcept |
| Read the adapter-owned RTS target state. | |
详细描述
RTS adapter that keeps the common container as the sole instance owner.
在文件 RTSEffects.h 第 77 行定义.
成员函数说明
◆ additive()
|
noexcept |
Sum one numeric payload across all active canonical effect instances.
在文件 RTSEffects.cpp 第 159 行定义.
◆ advance()
| eve::Result< RTSEffectUpdate > eve::rts::RTSEffectAdapter::advance | ( | const eve::SimulationStep & | step | ) |
Advance and settle RTS effects atomically.
在文件 RTSEffects.cpp 第 116 行定义.
引用了 eve::effects::EffectExecutor::advance(), eve::Applied, eve::effects::EffectContainer::clone(), eve::Result< T >::failure(), eve::rts::RTSEffectExecutor::settle(), step, eve::Status::success() , 以及 eve::Result< T >::success().
◆ apply()
| eve::Result< effects::EffectHandle > eve::rts::RTSEffectAdapter::apply | ( | const RTSEffectDefinition & | definition, |
| eve::SubjectRef | subject | ||
| ) |
Apply one typed effect to a stable subject.
在文件 RTSEffects.cpp 第 71 行定义.
引用了 eve::Applied, eve::rts::RTSEffectExecutor::applyImmediate(), eve::effects::EffectContainer::clone(), eve::effects::EffectDefinition::duration, eve::Diagnostic::error(), eve::Result< T >::failure(), handle, eve::effects::EffectDefinition::id, eve::InvalidArgument, eve::InvariantViolation, eve::effects::EffectDefinition::magnitude, eve::effects::EffectDefinition::payload, eve::effects::EffectDefinition::period, eve::effects::EffectDefinition::policy, eve::effects::EffectPayload::setNumber(), eve::effects::EffectDefinition::stackKey, subject, eve::Status::success(), eve::Result< T >::success(), eve::effects::EffectDefinition::tags, valid , 以及 eve::effects::EffectDefinition::validate().
◆ count()
|
noexcept |
Return the number of active effect instances.
在文件 RTSEffects.cpp 第 140 行定义.
◆ multiplier()
|
noexcept |
Multiply one numeric payload across all active canonical effect instances.
在文件 RTSEffects.cpp 第 146 行定义.
◆ remove()
| eve::Result< void > eve::rts::RTSEffectAdapter::remove | ( | effects::EffectHandle | handle | ) |
Remove one generation-qualified effect handle.
在文件 RTSEffects.cpp 第 110 行定义.
引用了 eve::Result< T >::failure(), handle, eve::effects::EffectContainer::remove() , 以及 eve::effects::EffectContainer::resolve().
◆ resolve()
| eve::Result< const effects::EffectInstance * > eve::rts::RTSEffectAdapter::resolve | ( | effects::EffectHandle | handle | ) | const |
Resolve a live handle as a borrowed observation.
在文件 RTSEffects.cpp 第 142 行定义.
◆ restore()
| eve::Result< void > eve::rts::RTSEffectAdapter::restore | ( | const RTSEffectSnapshot & | snapshot | ) |
Restore effects and target state, invalidating prior handles.
在文件 RTSEffects.cpp 第 131 行定义.
引用了 eve::Applied, eve::rts::RTSEffectSnapshot::effects, eve::effects::EffectContainer::restore(), eve::Status::success(), eve::Result< T >::success(), eve::rts::RTSEffectSnapshot::target, valid , 以及 eve::rts::RTSEffectExecutor::validate().
被这些函数引用 eve::rts::RTS::restoreState().
◆ restoreSchedulerTick()
|
inlinenoexcept |
Align the contained lifecycle scheduler with an owning world checkpoint.
- 参数
-
tick Completed tick.
在文件 RTSEffects.h 第 93 行定义.
引用了 tick.
◆ snapshot()
| RTSEffectSnapshot eve::rts::RTSEffectAdapter::snapshot | ( | ) | const |
Capture effects and domain target state.
在文件 RTSEffects.cpp 第 129 行定义.
◆ target() [1/2]
|
inlinenoexcept |
Read the adapter-owned RTS target state.
在文件 RTSEffects.h 第 103 行定义.
◆ target() [2/2]
|
inlinenoexcept |
Access the adapter-owned RTS target state.
在文件 RTSEffects.h 第 101 行定义.
该类的文档由以下文件生成:
- src/modules/rts/RTSEffects.h
- src/modules/rts/RTSEffects.cpp