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
net-device-container.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 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
#ifndef NET_DEVICE_CONTAINER_H
20
#define NET_DEVICE_CONTAINER_H
21
22
#include "ns3/net-device.h"
23
24
#include <stdint.h>
25
#include <vector>
26
27
namespace
ns3
28
{
29
42
class
NetDeviceContainer
43
{
44
public
:
46
typedef
std::vector<Ptr<NetDevice>>::const_iterator
Iterator
;
47
51
NetDeviceContainer
();
52
59
NetDeviceContainer
(
Ptr<NetDevice>
dev);
60
70
NetDeviceContainer
(std::string devName);
71
87
NetDeviceContainer
(
const
NetDeviceContainer
& a,
const
NetDeviceContainer
& b);
88
108
Iterator
Begin
()
const
;
109
129
Iterator
End
()
const
;
130
151
uint32_t
GetN
()
const
;
152
174
Ptr<NetDevice>
Get
(
uint32_t
i)
const
;
175
182
void
Add
(
NetDeviceContainer
other);
183
189
void
Add
(
Ptr<NetDevice>
device);
190
197
void
Add
(std::string deviceName);
198
199
private
:
200
std::vector<Ptr<NetDevice>>
m_devices
;
201
};
202
203
}
// namespace ns3
204
205
#endif
/* NET_DEVICE_CONTAINER_H */
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:43
ns3::NetDeviceContainer::GetN
uint32_t GetN() const
Get the number of Ptr<NetDevice> stored in this container.
Definition:
net-device-container.cc:61
ns3::NetDeviceContainer::Iterator
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Definition:
net-device-container.h:46
ns3::NetDeviceContainer::Begin
Iterator Begin() const
Get an iterator which refers to the first NetDevice in the container.
Definition:
net-device-container.cc:49
ns3::NetDeviceContainer::Add
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Definition:
net-device-container.cc:73
ns3::NetDeviceContainer::m_devices
std::vector< Ptr< NetDevice > > m_devices
NetDevices smart pointers.
Definition:
net-device-container.h:200
ns3::NetDeviceContainer::End
Iterator End() const
Get an iterator which indicates past-the-last NetDevice in the container.
Definition:
net-device-container.cc:55
ns3::NetDeviceContainer::Get
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Definition:
net-device-container.cc:67
ns3::NetDeviceContainer::NetDeviceContainer
NetDeviceContainer()
Create an empty NetDeviceContainer.
Definition:
net-device-container.cc:27
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
helper
net-device-container.h
Generated on Sun Jul 2 2023 18:21:57 for ns-3 by
1.9.6