NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
scheduler-scoped-event-id.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_UTIL_SCHEDULER_SCOPED_EVENT_ID_HPP
23
#define NDN_UTIL_SCHEDULER_SCOPED_EVENT_ID_HPP
24
25
#include "
scheduler.hpp
"
26
27
namespace
ndn
{
28
namespace
util {
29
namespace
scheduler {
30
33
class
ScopedEventId
: noncopyable
34
{
35
public
:
40
explicit
41
ScopedEventId
(
Scheduler
& scheduler);
42
45
ScopedEventId
(
ScopedEventId
&& other) noexcept;
46
55
ScopedEventId
&
56
operator=
(
const
EventId
& event);
57
60
~ScopedEventId
() noexcept;
61
64
void
65
cancel
();
66
70
void
71
release
() noexcept;
72
73
private
:
74
Scheduler
* m_scheduler;
// pointer to allow move semantics
75
EventId
m_event;
76
};
77
78
}
// namespace scheduler
79
}
// namespace util
80
}
// namespace ndn
81
82
#endif // NDN_UTIL_SCHEDULER_SCOPED_EVENT_ID_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::util::scheduler::Scheduler
Generic scheduler.
Definition:
scheduler.hpp:53
ndn::util::scheduler::ScopedEventId::ScopedEventId
ScopedEventId(Scheduler &scheduler)
Construct ScopedEventId tied to the specified scheduler.
Definition:
scheduler-scoped-event-id.cpp:33
EventId
Opaque type (shared_ptr) representing ID of a scheduled event.
ndn::util::scheduler::ScopedEventId::release
void release() noexcept
releases the event so that it won't be canceled when this ScopedEventId is destructed ...
Definition:
scheduler-scoped-event-id.cpp:67
ndn::util::scheduler::ScopedEventId::~ScopedEventId
~ScopedEventId() noexcept
cancels the event
Definition:
scheduler-scoped-event-id.cpp:55
ndn::util::scheduler::ScopedEventId
Event that is automatically cancelled upon destruction.
Definition:
scheduler-scoped-event-id.hpp:33
scheduler.hpp
ndn::util::scheduler::ScopedEventId::cancel
void cancel()
cancels the event manually
Definition:
scheduler-scoped-event-id.cpp:61
ndn::util::scheduler::ScopedEventId::operator=
ScopedEventId & operator=(const EventId &event)
assigns an event
Definition:
scheduler-scoped-event-id.cpp:46
ndnSIM
ndn-cxx
src
util
scheduler-scoped-event-id.hpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11