Event that is automatically cancelled upon destruction. More...
#include <scheduler-scoped-event-id.hpp>
Public Member Functions | |
| ScopedEventId (Scheduler &scheduler) noexcept | |
| Construct ScopedEventId tied to the specified scheduler. More... | |
| ScopedEventId (const ScopedEventId &)=delete | |
| ScopedEventId (ScopedEventId &&) noexcept | |
| Move constructor. More... | |
| ~ScopedEventId () | |
| Destructor, automatically cancels the event. More... | |
| void | cancel () |
| Manually cancel the event. More... | |
| ScopedEventId & | operator= (const ScopedEventId &)=delete |
| ScopedEventId & | operator= (ScopedEventId &&) noexcept |
| Move assignment operator. More... | |
| ScopedEventId & | operator= (EventId event) |
| Assign an event. More... | |
| void | release () noexcept |
| Release 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.
|
explicitnoexcept |
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 28 of file scheduler-scoped-event-id.cpp.
|
delete |
|
inlinedefaultnoexcept |
Move constructor.
| ndn::util::scheduler::ScopedEventId::~ScopedEventId | ( | ) |
Destructor, automatically cancels the event.
Definition at line 43 of file scheduler-scoped-event-id.cpp.
| void ndn::util::scheduler::ScopedEventId::cancel | ( | ) |
Manually cancel the event.
Definition at line 49 of file scheduler-scoped-event-id.cpp.
|
delete |
|
inlinedefaultnoexcept |
Move assignment operator.
| ScopedEventId & ndn::util::scheduler::ScopedEventId::operator= | ( | EventId | event | ) |
Assign an event.
If a different event has been assigned to this instance previously, that event will be cancelled immediately.
Definition at line 34 of file scheduler-scoped-event-id.cpp.
|
noexcept |
Release the event so that it won't be canceled when this ScopedEventId is destructed.
Definition at line 55 of file scheduler-scoped-event-id.cpp.