Event that is automatically cancelled upon destruction. More...
#include <scheduler-scoped-event-id.hpp>
Public Member Functions | |
ScopedEventId (Scheduler &scheduler) | |
Construct ScopedEventId tied to the specified scheduler. More... | |
ScopedEventId (ScopedEventId &&other) noexcept | |
move constructor More... | |
ScopedEventId & | operator= (const EventId &event) |
assigns an event More... | |
~ScopedEventId () noexcept | |
cancels the event More... | |
void | cancel () |
cancels the event manually More... | |
void | release () noexcept |
releases the event so that it won't be canceled when this ScopedEventId is destructed More... | |
Event that is automatically cancelled upon destruction.
Definition at line 33 of file scheduler-scoped-event-id.hpp.
|
explicit |
Construct ScopedEventId tied to the specified scheduler.
scheduler | Scheduler to which the event is tied. Behavior is undefined if scheduler is destructed before an uncanceled ScopedEventId. |
Definition at line 33 of file scheduler-scoped-event-id.cpp.
|
noexcept |
move constructor
Definition at line 38 of file scheduler-scoped-event-id.cpp.
|
noexcept |
cancels the event
Definition at line 55 of file scheduler-scoped-event-id.cpp.
References ndn::util::scheduler::Scheduler::cancelEvent().
ScopedEventId & ndn::util::scheduler::ScopedEventId::operator= | ( | const EventId & | event | ) |
assigns an event
If a different event has been assigned to this instance previously, that event will be cancelled immediately.
Definition at line 46 of file scheduler-scoped-event-id.cpp.
References ndn::util::scheduler::Scheduler::cancelEvent().
void ndn::util::scheduler::ScopedEventId::cancel | ( | ) |
cancels the event manually
Definition at line 61 of file scheduler-scoped-event-id.cpp.
References ndn::util::scheduler::Scheduler::cancelEvent().
|
noexcept |
releases the event so that it won't be canceled when this ScopedEventId is destructed
Definition at line 67 of file scheduler-scoped-event-id.cpp.