Cancels an event automatically upon destruction. More...
#include <scheduler.hpp>
Public Member Functions | |
ScopedEventId () | |
ScopedEventId (const EventId &event) | |
Implicit constructor from EventId. More... | |
ScopedEventId (ScopedEventId &&other) | |
Move constructor. More... | |
ScopedEventId & | operator= (const EventId &event) |
Assigns an event. More... | |
~ScopedEventId () | |
Cancels the event. More... | |
void | cancel () |
Cancels the event manually. More... | |
void | release () |
Releases the event so that it won't be cancelled when this ScopedEventId is destructed. More... | |
Cancels an event automatically upon destruction.
Definition at line 60 of file scheduler.hpp.
nfd::scheduler::ScopedEventId::ScopedEventId | ( | ) |
Definition at line 65 of file scheduler.cpp.
nfd::scheduler::ScopedEventId::ScopedEventId | ( | const EventId & | event | ) |
Implicit constructor from EventId.
event | the event to be cancelled upon destruction |
Definition at line 69 of file scheduler.cpp.
nfd::scheduler::ScopedEventId::ScopedEventId | ( | ScopedEventId && | other | ) |
Move constructor.
Definition at line 74 of file scheduler.cpp.
nfd::scheduler::ScopedEventId::~ScopedEventId | ( | ) |
Cancels the event.
Definition at line 90 of file scheduler.cpp.
References nfd::scheduler::cancel().
ScopedEventId & nfd::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 81 of file scheduler.cpp.
References nfd::scheduler::cancel().
void nfd::scheduler::ScopedEventId::cancel | ( | ) |
Cancels the event manually.
Definition at line 96 of file scheduler.cpp.
References nfd::scheduler::cancel().
Referenced by nfd::face::UnicastUdpTransport::afterChangePersistency(), nfd::face::UnicastEthernetTransport::afterChangePersistency(), nfd::face::TcpTransport::doClose(), nfd::face::WebSocketTransport::doClose(), and nfd::rib::PropagatedEntry::initialize().
void nfd::scheduler::ScopedEventId::release | ( | ) |
Releases the event so that it won't be cancelled when this ScopedEventId is destructed.
Definition at line 102 of file scheduler.cpp.