A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
list-scheduler.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005 INRIA
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
*/
19
20
#ifndef LIST_SCHEDULER_H
21
#define LIST_SCHEDULER_H
22
23
#include "
scheduler.h
"
24
25
#include <list>
26
#include <stdint.h>
27
#include <utility>
28
35
namespace
ns3
36
{
37
38
class
EventImpl;
39
65
class
ListScheduler
:
public
Scheduler
66
{
67
public
:
72
static
TypeId
GetTypeId
();
73
75
ListScheduler
();
77
~ListScheduler
()
override
;
78
79
// Inherited
80
void
Insert
(
const
Scheduler::Event
& ev)
override
;
81
bool
IsEmpty
()
const override
;
82
Scheduler::Event
PeekNext
()
const override
;
83
Scheduler::Event
RemoveNext
()
override
;
84
void
Remove
(
const
Scheduler::Event
& ev)
override
;
85
86
private
:
88
typedef
std::list<Scheduler::Event>
Events
;
90
typedef
std::list<Scheduler::Event>::iterator
EventsI
;
91
93
Events
m_events
;
94
};
95
96
}
// namespace ns3
97
98
#endif
/* LIST_SCHEDULER_H */
ns3::ListScheduler
a std::list event scheduler
Definition:
list-scheduler.h:66
ns3::ListScheduler::EventsI
std::list< Scheduler::Event >::iterator EventsI
Events iterator.
Definition:
list-scheduler.h:90
ns3::ListScheduler::~ListScheduler
~ListScheduler() override
Destructor.
Definition:
list-scheduler.cc:57
ns3::ListScheduler::Events
std::list< Scheduler::Event > Events
Event list type: a simple list of Events.
Definition:
list-scheduler.h:88
ns3::ListScheduler::ListScheduler
ListScheduler()
Constructor.
Definition:
list-scheduler.cc:52
ns3::ListScheduler::m_events
Events m_events
The event list.
Definition:
list-scheduler.h:93
ns3::ListScheduler::RemoveNext
Scheduler::Event RemoveNext() override
Remove the earliest event from the event list.
Definition:
list-scheduler.cc:91
ns3::ListScheduler::Remove
void Remove(const Scheduler::Event &ev) override
Remove a specific event from the event list.
Definition:
list-scheduler.cc:100
ns3::ListScheduler::IsEmpty
bool IsEmpty() const override
Test if the schedule is empty.
Definition:
list-scheduler.cc:77
ns3::ListScheduler::PeekNext
Scheduler::Event PeekNext() const override
Get a pointer to the next event.
Definition:
list-scheduler.cc:84
ns3::ListScheduler::Insert
void Insert(const Scheduler::Event &ev) override
Insert a new Event in the schedule.
Definition:
list-scheduler.cc:62
ns3::ListScheduler::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition:
list-scheduler.cc:43
ns3::Scheduler
Maintain the event list.
Definition:
scheduler.h:157
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
scheduler.h
ns3::Scheduler abstract base class, ns3::Scheduler::Event and ns3::Scheduler::EventKey declarations.
ns3::Scheduler::Event
Scheduler event.
Definition:
scheduler.h:184
src
core
model
list-scheduler.h
Generated on Sun Jul 2 2023 18:21:31 for ns-3 by
1.9.6