event_subscription
| Type | Class |
| Namespace | conjure::core |
| Include File Path | engine/include/conjure/core/event.h |
| Source File Path | engine/src/core/time/event.cpp |
| API ↗ | Time, events and random |
Syntax
Constructors
| Access | Signature | Description |
|---|---|---|
| public | event_subscription() noexcept; | An inactive subscription. |
| public | event_subscription(
std::weak_ptr<detail::subscription_target> target,
u64 id) noexcept; | Binds to a handler id on a target. Used by event implementations. |
| public | event_subscription(
event_subscription &&other) noexcept; |
Important
Copy constructor and assignment has been deleted.
Destructors
| Access | Signature | Description |
|---|---|---|
| public | ~event_subscription(); |
Variables
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| private | mId | u64 | 0 | |
| private | mTarget | std:: | {} |
Functions
Public
is_active
is_active[[nodiscard]] bool is_active() const noexcept;True while the handler is registered on a live event.
release
releasevoid release() noexcept;Unsubscribes now. Safe to call more than once and on inactive subscriptions.
Operator Overloads
Public
operator=
operator=event_subscription &operator=(
event_subscription &&other) noexcept;