Skip to content

Engine → Core → event.h

event_subscription

Syntax

class CONJURE_API event_subscription

Constructors

AccessSignatureDescription
publicevent_subscription() noexcept;An inactive subscription.
publicevent_subscription( std::weak_ptr<detail::subscription_target> target, u64 id) noexcept;Binds to a handler id on a target. Used by event implementations.
publicevent_subscription( event_subscription &&other) noexcept;

Important

Copy constructor and assignment has been deleted.

Destructors

AccessSignatureDescription
public~event_subscription();

Variables

AccessNameTypeDefaultDescription
privatemIdu640
privatemTargetstd::weak_ptr<detail::subscription_target>{}

Functions

Public

is_active

[[nodiscard]] bool is_active() const noexcept;

True while the handler is registered on a live event.

release

void release() noexcept;

Unsubscribes now. Safe to call more than once and on inactive subscriptions.

Operator Overloads

Public

operator=

event_subscription &operator=(
    event_subscription &&other) noexcept;