Owns active effect instances and their deterministic lifecycle events. 更多...
#include <EffectContainer.h>
Public 成员函数 | |
| EffectContainer ()=default | |
| Construct an empty effect container. | |
| EffectContainer (eve::UuidEntropySource entropy, eve::UuidClock clock={}) | |
| Construct a container whose newly-created instances use UUID identities. | |
| EffectContainer (const EffectContainer &other) | |
| Deep-copy a container, including instances, events and counters. | |
| EffectContainer & | operator= (const EffectContainer &other) |
| Deep-copy assign a container, including instances, events and counters. | |
| EffectContainer (EffectContainer &&other) noexcept=default | |
| Move an owning container without sharing instance storage. | |
| EffectContainer & | operator= (EffectContainer &&other) noexcept=default |
| Move-assign an owning container without sharing instance storage. | |
| EffectContainer | clone () const |
| Create an independent deep copy suitable for ECS staging. | |
| EffectContainer | snapshot () const |
| Capture an independent lifecycle snapshot for staging/restore. | |
| eve::Result< void > | restore (const EffectContainer &snapshot) |
| Restore a previously captured snapshot as one observable commit. | |
| eve::Result< std::string > | apply (const EffectDefinition &definition, const std::string &subject, const std::string &source={}) |
| Applies a definition and returns the stable instance identifier. | |
| eve::Result< eve::EffectId > | applyCanonical (const EffectDefinition &definition, const std::string &subject, const std::string &source={}) |
| Applies a definition and returns its UUID-backed effect identity. | |
| eve::Result< EffectHandle > | handleFor (const std::string &id) const |
| Return a generation-qualified handle for a live instance. | |
| eve::Result< const EffectInstance * > | resolve (EffectHandle handle) const |
| Resolve a generation-qualified handle for this call. | |
| std::uint64_t | generation () const noexcept |
| Return the current container generation used by effect handles. | |
| eve::Result< std::string > | apply (const std::string &subject, const std::string &type, const std::string &source, int priority, double duration, const std::string &stackKey, StackPolicy policy) |
| Applies scalar effect fields using the canonical Result contract. | |
| eve::Result< void > | remove (const std::string &id, const std::string &reason="removed") |
| Removes one active instance and emits a Removed event. | |
| eve::Result< void > | remove (eve::EffectId id, const std::string &reason="removed") |
| Removes one active instance by UUID-backed identity. | |
| eve::Result< std::vector< std::string > > | dispel (const std::string &subject, const std::string &categoryTag, int strength, std::size_t maxCount, const std::string &reason="dispelled") |
| Atomically remove matching dispellable effects in deterministic priority order. | |
| eve::Result< EffectUpdateSummary > | update (double dtSeconds) |
| Advances finite instances through the lifecycle executor. | |
| eve::Result< EffectUpdateSummary > | advance (const eve::SimulationStep &step) |
| Advances lifecycle state using one scheduler-owned simulation step. | |
| void | clear () |
| Removes all active instances and retained events, resetting id sequences. | |
| EffectInstance * | find (const std::string &id) |
| Returns an active instance by stable id, or nullptr when absent. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the id is absent. @lifetime Until this instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless the caller supplies synchronization. @reentrancy No callbacks are made. | |
| const EffectInstance * | find (const std::string &id) const |
| Returns an active instance by stable id, or nullptr when absent. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the id is absent. @lifetime Until this instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless the caller supplies synchronization. @reentrancy No callbacks are made. | |
| EffectInstance * | find (eve::EffectId id) |
| Returns an active instance by UUID-backed identity, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the identity is absent. @lifetime Until this instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| const EffectInstance * | find (eve::EffectId id) const |
| Returns an active instance by UUID-backed identity, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the identity is absent. @lifetime Until this instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| int | effectCount () const |
| Returns active instance count in deterministic creation order. | |
| EffectInstance * | effectAt (int index) |
| Returns an active instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the index is outside the current range. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| const EffectInstance * | effectAt (int index) const |
| Returns an active instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the index is outside the current range. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| int | subjectCount (const std::string &subject) const |
| Returns active instance count for a subject. | |
| EffectInstance * | subjectAt (const std::string &subject, int index) |
| Returns a subject instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the subject or index is absent. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| const EffectInstance * | subjectAt (const std::string &subject, int index) const |
| Returns a subject instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the subject or index is absent. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| int | taggedCount (const std::string &subject, const std::string &tag) const |
| Returns active subject instances containing a tag. | |
| EffectInstance * | taggedAt (const std::string &subject, const std::string &tag, int index) |
| Returns a tagged subject instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when no matching tagged instance exists at the index. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| const EffectInstance * | taggedAt (const std::string &subject, const std::string &tag, int index) const |
| Returns a tagged subject instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when no matching tagged instance exists at the index. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| int | eventCount () const |
| Returns retained event count. | |
| EffectEvent * | eventAt (int index) |
Returns an event by deterministic sequence index, or nullptr. @ownership Borrowed from this container's retained event deque. @nullable Null when the index is outside the retained range. @lifetime Until clearEvents, clear, restore, or destruction; do not retain it across those calls. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| const EffectEvent * | eventAt (int index) const |
Returns an event by deterministic sequence index, or nullptr. @ownership Borrowed from this container's retained event deque. @nullable Null when the index is outside the retained range. @lifetime Until clearEvents, clear, restore, or destruction; do not retain it across those calls. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made. | |
| void | clearEvents () |
| Clears retained events without resetting their sequence counter. | |
| eve::SimulationTick | currentTick () const noexcept |
| Last scheduler tick consumed by the checked time API. | |
| void | restoreSchedulerTick (eve::SimulationTick tick) noexcept |
| Restore the scheduler cursor after an owning world checkpoint rollback. | |
友元 | |
| class | EffectExecutor |
详细描述
Owns active effect instances and their deterministic lifecycle events.
The container is the sole owner of instance state. Definitions are copied during apply and are not retained as borrowed pointers. Events contain owning value fields, so event consumers do not retain pointers into the container. All methods are simulation-thread confined unless the caller provides external synchronization; callbacks are not invoked by this type.
在文件 EffectContainer.h 第 35 行定义.
构造及析构函数说明
◆ EffectContainer() [1/4]
|
default |
Construct an empty effect container.
被这些函数引用 clone().
◆ EffectContainer() [2/4]
|
explicit |
Construct a container whose newly-created instances use UUID identities.
- 参数
-
entropy Entropy source used for each new effect identity. clock Optional clock used for UUIDv7 timestamps.
- 备注
- Passing an entropy source opts into the canonical API. The legacy default constructor keeps its string projection for compatibility.
在文件 EffectContainer.cpp 第 104 行定义.
◆ EffectContainer() [3/4]
| eve::effects::EffectContainer::EffectContainer | ( | const EffectContainer & | other | ) |
Deep-copy a container, including instances, events and counters.
- 参数
-
other Container to copy; no instance storage is shared.
在文件 EffectContainer.cpp 第 108 行定义.
引用了 effect.
◆ EffectContainer() [4/4]
|
defaultnoexcept |
Move an owning container without sharing instance storage.
成员函数说明
◆ advance()
| eve::Result< EffectUpdateSummary > eve::effects::EffectContainer::advance | ( | const eve::SimulationStep & | step | ) |
Advances lifecycle state using one scheduler-owned simulation step.
- 参数
-
step Injected fixed-step tick and duration; no wall clock is read.
- 返回
- A checked lifecycle summary. Reusing or rewinding a tick is rejected and leaves the container unchanged.
- 备注
- The container is simulation-thread confined. The duration is converted to the legacy double representation only at this effect-domain boundary; persisted state is identified by tick.
在文件 EffectContainer.cpp 第 506 行定义.
引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, status, step, eve::Result< T >::success() , 以及 eve::effects::EffectUpdateSummary::tick.
◆ apply() [1/2]
| eve::Result< std::string > eve::effects::EffectContainer::apply | ( | const EffectDefinition & | definition, |
| const std::string & | subject, | ||
| const std::string & | source = {} |
||
| ) |
Applies a definition and returns the stable instance identifier.
- 参数
-
definition Definition copied for this operation; it is not retained. subject Opaque subject identity owned by the caller/domain. source Opaque source identity owned by the caller/domain.
- 返回
- The active instance id, or a structured rejection.
- 备注
- No RPG settlement or attribute mutation is performed.
在文件 EffectContainer.cpp 第 194 行定义.
引用了 eve::effects::Accumulate, eve::Applied, eve::effects::Applied, eve::Conflict, current, duration, effect, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), find(), eve::detail::Id128< Tag >::fromUuid(), id, key, eve::effects::Refreshed, eve::effects::Reject, eve::effects::Removed, eve::effects::Replace, eve::effects::ReplaceOldest, eve::effects::Reuse, source, eve::effects::Stacked, subject, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 apply() , 以及 applyCanonical().
◆ apply() [2/2]
| eve::Result< std::string > eve::effects::EffectContainer::apply | ( | const std::string & | subject, |
| const std::string & | type, | ||
| const std::string & | source, | ||
| int | priority, | ||
| double | duration, | ||
| const std::string & | stackKey, | ||
| StackPolicy | policy | ||
| ) |
Applies scalar effect fields using the canonical Result contract.
- 返回
- The active instance id, or a structured rejection.
在文件 EffectContainer.cpp 第 358 行定义.
引用了 apply(), duration, eve::effects::NewInstance, priority, eve::effects::Refresh, eve::effects::Replace, eve::effects::Reuse, source, eve::effects::Stack, subject , 以及 type.
◆ applyCanonical()
| eve::Result< eve::EffectId > eve::effects::EffectContainer::applyCanonical | ( | const EffectDefinition & | definition, |
| const std::string & | subject, | ||
| const std::string & | source = {} |
||
| ) |
Applies a definition and returns its UUID-backed effect identity.
- 参数
-
definition Definition copied for this operation; it is not retained. subject Opaque subject identity owned by the caller/domain. source Opaque source identity owned by the caller/domain.
- 返回
- The canonical effect identity, or Unsupported when this container has no injected entropy source.
- 备注
- This path never creates an incrementing string identity. The returned UUID's
format()is stored as the legacy projection.
在文件 EffectContainer.cpp 第 319 行定义.
引用了 eve::Applied, apply(), eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), id, eve::detail::Id128< Tag >::parse(), source, subject, eve::Status::success(), eve::Result< T >::success() , 以及 eve::Unsupported.
◆ clear()
| void eve::effects::EffectContainer::clear | ( | ) |
Removes all active instances and retained events, resetting id sequences.
在文件 EffectContainer.cpp 第 529 行定义.
引用了 eve::detail::StrongUint64< detail::SimulationTickTag >::zero().
◆ clearEvents()
| void eve::effects::EffectContainer::clearEvents | ( | ) |
Clears retained events without resetting their sequence counter.
在文件 EffectContainer.cpp 第 623 行定义.
◆ clone()
| EffectContainer eve::effects::EffectContainer::clone | ( | ) | const |
Create an independent deep copy suitable for ECS staging.
- 返回
- A container whose instances, events and counters are independent.
在文件 EffectContainer.cpp 第 136 行定义.
引用了 EffectContainer().
被这些函数引用 eve::card::CardEffectAdapter::advance(), eve::rts::RTSEffectAdapter::advance(), eve::vehicle::VehicleEffectAdapter::advance(), eve::weapon::WeaponEffectAdapter::advance(), eve::card::CardEffectAdapter::apply(), eve::rts::RTSEffectAdapter::apply(), eve::vehicle::VehicleEffectAdapter::apply(), eve::weapon::WeaponEffectAdapter::apply() , 以及 snapshot().
◆ currentTick()
|
inlinenoexcept |
Last scheduler tick consumed by the checked time API.
在文件 EffectContainer.h 第 273 行定义.
◆ dispel()
| eve::Result< std::vector< std::string > > eve::effects::EffectContainer::dispel | ( | const std::string & | subject, |
| const std::string & | categoryTag, | ||
| int | strength, | ||
| std::size_t | maxCount, | ||
| const std::string & | reason = "dispelled" |
||
| ) |
Atomically remove matching dispellable effects in deterministic priority order.
- 参数
-
subject Subject whose effects may be removed. categoryTag Required category tag, for example dispel:magic.strength Removes effects whose priority is no greater than this strength. maxCount Maximum removals; zero is an explicit no-op. reason Owning lifecycle-event reason copied into every removal event.
- 返回
- Removed instance ids in descending priority and creation order.
- 备注
- Effects tagged
effect:undispellableare never removed. The operation stages through the existing snapshot/remove/restore path, so failure leaves this container unchanged and invalidates handles only on commit. @thread Call on the container's owning simulation thread. @reentrancy No callbacks are invoked. @cost Linear scan and sort plus one deep container snapshot and restore.
在文件 EffectContainer.cpp 第 391 行定义.
引用了 eve::Diagnostic::error(), id, eve::InvalidArgument, eve::NoOp, order, priority, strength, subject , 以及 eve::Status::success().
◆ effectAt() [1/2]
| EffectInstance * eve::effects::EffectContainer::effectAt | ( | int | index | ) |
Returns an active instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the index is outside the current range. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
在文件 EffectContainer.cpp 第 560 行定义.
引用了 index.
被这些函数引用 eve::rpg::matchingIds(), eve::settlement::projectEffectRules() , 以及 eve::rpg::StatusSystem::update().
◆ effectAt() [2/2]
| const EffectInstance * eve::effects::EffectContainer::effectAt | ( | int | index | ) | const |
Returns an active instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the index is outside the current range. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
Effect at.
在文件 EffectContainer.cpp 第 566 行定义.
引用了 index.
◆ effectCount()
| int eve::effects::EffectContainer::effectCount | ( | ) | const |
Returns active instance count in deterministic creation order.
在文件 EffectContainer.cpp 第 558 行定义.
被这些函数引用 eve::card::CardEffectAdapter::count(), eve::rts::RTSEffectAdapter::count(), eve::card::CardEffectAdapter::initializeTarget(), eve::rpg::matchingIds(), eve::settlement::projectEffectRules() , 以及 eve::rpg::StatusSystem::update().
◆ eventAt() [1/2]
| EffectEvent * eve::effects::EffectContainer::eventAt | ( | int | index | ) |
Returns an event by deterministic sequence index, or nullptr. @ownership Borrowed from this container's retained event deque. @nullable Null when the index is outside the retained range. @lifetime Until clearEvents, clear, restore, or destruction; do not retain it across those calls. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
在文件 EffectContainer.cpp 第 613 行定义.
引用了 index.
◆ eventAt() [2/2]
| const EffectEvent * eve::effects::EffectContainer::eventAt | ( | int | index | ) | const |
Returns an event by deterministic sequence index, or nullptr. @ownership Borrowed from this container's retained event deque. @nullable Null when the index is outside the retained range. @lifetime Until clearEvents, clear, restore, or destruction; do not retain it across those calls. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
Event at.
在文件 EffectContainer.cpp 第 618 行定义.
引用了 index.
◆ eventCount()
| int eve::effects::EffectContainer::eventCount | ( | ) | const |
Returns retained event count.
在文件 EffectContainer.cpp 第 611 行定义.
◆ find() [1/4]
| EffectInstance * eve::effects::EffectContainer::find | ( | const std::string & | id | ) |
Returns an active instance by stable id, or nullptr when absent. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the id is absent. @lifetime Until this instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless the caller supplies synchronization. @reentrancy No callbacks are made.
在文件 EffectContainer.cpp 第 538 行定义.
被这些函数引用 apply(), handleFor(), resolve() , 以及 eve::rpg::StatusSystem::update().
◆ find() [2/4]
| const EffectInstance * eve::effects::EffectContainer::find | ( | const std::string & | id | ) | const |
Returns an active instance by stable id, or nullptr when absent. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the id is absent. @lifetime Until this instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless the caller supplies synchronization. @reentrancy No callbacks are made.
Finds .
在文件 EffectContainer.cpp 第 543 行定义.
◆ find() [3/4]
| EffectInstance * eve::effects::EffectContainer::find | ( | eve::EffectId | id | ) |
Returns an active instance by UUID-backed identity, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the identity is absent. @lifetime Until this instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
在文件 EffectContainer.cpp 第 548 行定义.
◆ find() [4/4]
| const EffectInstance * eve::effects::EffectContainer::find | ( | eve::EffectId | id | ) | const |
Returns an active instance by UUID-backed identity, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the identity is absent. @lifetime Until this instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
Finds .
在文件 EffectContainer.cpp 第 553 行定义.
◆ generation()
|
inlinenoexcept |
Return the current container generation used by effect handles.
在文件 EffectContainer.h 第 128 行定义.
◆ handleFor()
| eve::Result< EffectHandle > eve::effects::EffectContainer::handleFor | ( | const std::string & | id | ) | const |
Return a generation-qualified handle for a live instance.
- 参数
-
id Local canonical instance id.
- 返回
- A handle valid until removal, clear, restore or destruction.
在文件 EffectContainer.cpp 第 333 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), find(), id, eve::InvalidArgument, eve::NotFound, eve::Status::success() , 以及 eve::Result< T >::success().
◆ operator=() [1/2]
| EffectContainer & eve::effects::EffectContainer::operator= | ( | const EffectContainer & | other | ) |
Deep-copy assign a container, including instances, events and counters.
- 参数
-
other Container to copy; no instance storage is shared.
- 返回
- This container.
在文件 EffectContainer.cpp 第 120 行定义.
◆ operator=() [2/2]
|
defaultnoexcept |
Move-assign an owning container without sharing instance storage.
◆ remove() [1/2]
| eve::Result< void > eve::effects::EffectContainer::remove | ( | const std::string & | id, |
| const std::string & | reason = "removed" |
||
| ) |
Removes one active instance and emits a Removed event.
- 返回
- Success when removed, or NotFound when the id is not active.
在文件 EffectContainer.cpp 第 375 行定义.
引用了 eve::Applied, eve::effects::Removed, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 eve::card::CardEffectAdapter::remove(), eve::rts::RTSEffectAdapter::remove(), eve::vehicle::VehicleEffectAdapter::remove() , 以及 eve::weapon::WeaponEffectAdapter::remove().
◆ remove() [2/2]
| eve::Result< void > eve::effects::EffectContainer::remove | ( | eve::EffectId | id, |
| const std::string & | reason = "removed" |
||
| ) |
Removes one active instance by UUID-backed identity.
在文件 EffectContainer.cpp 第 383 行定义.
引用了 eve::Applied, eve::effects::Removed, eve::Status::success() , 以及 eve::Result< T >::success().
◆ resolve()
| eve::Result< const EffectInstance * > eve::effects::EffectContainer::resolve | ( | EffectHandle | handle | ) | const |
Resolve a generation-qualified handle for this call.
- 参数
-
handle Handle previously returned by this container.
- 返回
- A borrowed instance, or StaleHandle/NotFound.
在文件 EffectContainer.cpp 第 344 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), find(), handle, eve::InvalidArgument, eve::NotFound, eve::StaleHandle, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 eve::card::CardEffectAdapter::remove(), eve::rts::RTSEffectAdapter::remove(), eve::vehicle::VehicleEffectAdapter::remove(), eve::weapon::WeaponEffectAdapter::remove(), eve::card::CardEffectAdapter::resolve(), eve::rts::RTSEffectAdapter::resolve(), eve::vehicle::VehicleEffectAdapter::resolve() , 以及 eve::weapon::WeaponEffectAdapter::resolve().
◆ restore()
| eve::Result< void > eve::effects::EffectContainer::restore | ( | const EffectContainer & | snapshot | ) |
Restore a previously captured snapshot as one observable commit.
- 参数
-
snapshot Snapshot value; it is copied and never retained.
- 返回
- Applied on success, or a checked failure without partial state.
- 备注
- Every pre-existing handle becomes stale after a successful restore.
在文件 EffectContainer.cpp 第 140 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvariantViolation, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 eve::card::CardEffectAdapter::restore(), eve::rts::RTSEffectAdapter::restore(), eve::vehicle::VehicleEffectAdapter::restore() , 以及 eve::weapon::WeaponEffectAdapter::restore().
◆ restoreSchedulerTick()
|
inlinenoexcept |
Restore the scheduler cursor after an owning world checkpoint rollback.
- 参数
-
tick Completed tick.
在文件 EffectContainer.h 第 275 行定义.
引用了 tick.
◆ snapshot()
| EffectContainer eve::effects::EffectContainer::snapshot | ( | ) | const |
Capture an independent lifecycle snapshot for staging/restore.
- 返回
- A deep copy; no instance ownership is shared.
在文件 EffectContainer.cpp 第 138 行定义.
引用了 clone().
被这些函数引用 eve::card::CardEffectAdapter::snapshot(), eve::rts::RTSEffectAdapter::snapshot(), eve::vehicle::VehicleEffectAdapter::snapshot() , 以及 eve::weapon::WeaponEffectAdapter::snapshot().
◆ subjectAt() [1/2]
| EffectInstance * eve::effects::EffectContainer::subjectAt | ( | const std::string & | subject, |
| int | index | ||
| ) |
Returns a subject instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the subject or index is absent. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
在文件 EffectContainer.cpp 第 577 行定义.
◆ subjectAt() [2/2]
| const EffectInstance * eve::effects::EffectContainer::subjectAt | ( | const std::string & | subject, |
| int | index | ||
| ) | const |
Returns a subject instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when the subject or index is absent. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
Subject at.
在文件 EffectContainer.cpp 第 584 行定义.
◆ subjectCount()
| int eve::effects::EffectContainer::subjectCount | ( | const std::string & | subject | ) | const |
Returns active instance count for a subject.
在文件 EffectContainer.cpp 第 572 行定义.
◆ taggedAt() [1/2]
| EffectInstance * eve::effects::EffectContainer::taggedAt | ( | const std::string & | subject, |
| const std::string & | tag, | ||
| int | index | ||
| ) |
Returns a tagged subject instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when no matching tagged instance exists at the index. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
在文件 EffectContainer.cpp 第 597 行定义.
◆ taggedAt() [2/2]
| const EffectInstance * eve::effects::EffectContainer::taggedAt | ( | const std::string & | subject, |
| const std::string & | tag, | ||
| int | index | ||
| ) | const |
Returns a tagged subject instance by deterministic index, or nullptr. @ownership Borrowed from this container; callers must not delete or retain it. @nullable Null when no matching tagged instance exists at the index. @lifetime Until the addressed instance is removed or the container is cleared/destroyed. @thread Simulation-thread confined unless externally synchronized. @reentrancy No callbacks are made.
Tagged at.
在文件 EffectContainer.cpp 第 604 行定义.
◆ taggedCount()
| int eve::effects::EffectContainer::taggedCount | ( | const std::string & | subject, |
| const std::string & | tag | ||
| ) | const |
Returns active subject instances containing a tag.
在文件 EffectContainer.cpp 第 591 行定义.
◆ update()
| eve::Result< EffectUpdateSummary > eve::effects::EffectContainer::update | ( | double | dtSeconds | ) |
Advances finite instances through the lifecycle executor.
- 参数
-
dtSeconds Positive simulation delta; zero is a successful no-op.
- 返回
- Number of expired instances and the applied delta.
在文件 EffectContainer.cpp 第 494 行定义.
引用了 duration, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Duration::fromSeconds() , 以及 eve::InvariantViolation.
友元及相关函数文档
◆ EffectExecutor
|
friend |
在文件 EffectContainer.h 第 283 行定义.
该类的文档由以下文件生成:
- src/modules/effects/EffectContainer.h
- src/modules/effects/EffectContainer.cpp