A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ofswitch13-device-container.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 University of Campinas (Unicamp)
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: Luciano Jerez Chaves <ljerezchaves@gmail.com>
18
*/
19
20
#ifndef OFSWITCH13_DEVICE_CONTAINER_H
21
#define OFSWITCH13_DEVICE_CONTAINER_H
22
23
#include <ns3/ofswitch13-device.h>
24
25
#include <cstdint>
26
#include <vector>
27
28
namespace
ns3
29
{
30
44
class
OFSwitch13DeviceContainer
45
{
46
public
:
48
typedef
std::vector<Ptr<OFSwitch13Device>>::const_iterator
Iterator
;
49
53
OFSwitch13DeviceContainer
();
54
61
OFSwitch13DeviceContainer
(
Ptr<OFSwitch13Device>
dev);
62
71
OFSwitch13DeviceContainer
(std::string devName);
72
89
OFSwitch13DeviceContainer
(
const
OFSwitch13DeviceContainer
& a,
90
const
OFSwitch13DeviceContainer
& b);
91
111
Iterator
Begin
()
const
;
112
132
Iterator
End
()
const
;
133
154
uint32_t
GetN
()
const
;
155
177
Ptr<OFSwitch13Device>
Get
(uint32_t i)
const
;
178
185
void
Add
(
OFSwitch13DeviceContainer
other);
186
192
void
Add
(
Ptr<OFSwitch13Device>
device);
193
201
void
Add
(std::string deviceName);
202
203
private
:
204
std::vector<Ptr<OFSwitch13Device>>
m_devices
;
205
};
206
207
}
// namespace ns3
208
209
#endif
/* OFSWITCH13_DEVICE_CONTAINER_H */
ns3::OFSwitch13DeviceContainer
Holds a vector of ns3::OFSwitch13Device pointers.
Definition:
ofswitch13-device-container.h:45
ns3::OFSwitch13DeviceContainer::OFSwitch13DeviceContainer
OFSwitch13DeviceContainer()
Create an empty OFSwitch13DeviceContainer.
Definition:
ofswitch13-device-container.cc:27
ns3::OFSwitch13DeviceContainer::Iterator
std::vector< Ptr< OFSwitch13Device > >::const_iterator Iterator
OFSwitch13Device container iterator.
Definition:
ofswitch13-device-container.h:48
ns3::OFSwitch13DeviceContainer::Add
void Add(OFSwitch13DeviceContainer other)
Append the contents of another OFSwitch13DeviceContainer to the end of this container.
Definition:
ofswitch13-device-container.cc:75
ns3::OFSwitch13DeviceContainer::m_devices
std::vector< Ptr< OFSwitch13Device > > m_devices
OFSwitch13Device pointers.
Definition:
ofswitch13-device-container.h:204
ns3::OFSwitch13DeviceContainer::Get
Ptr< OFSwitch13Device > Get(uint32_t i) const
Get the Ptr<OFSwitch13Device> stored in this container at a given index.
Definition:
ofswitch13-device-container.cc:69
ns3::OFSwitch13DeviceContainer::GetN
uint32_t GetN() const
Get the number of Ptr<OFSwitch13Device> stored in this container.
Definition:
ofswitch13-device-container.cc:63
ns3::OFSwitch13DeviceContainer::Begin
Iterator Begin() const
Get an iterator which refers to the first OpenFlow device in the container.
Definition:
ofswitch13-device-container.cc:51
ns3::OFSwitch13DeviceContainer::End
Iterator End() const
Get an iterator which indicates past-the-last OpenFlow device in the container.
Definition:
ofswitch13-device-container.cc:57
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
contrib
ofswitch13
helper
ofswitch13-device-container.h
Generated on Fri Mar 31 2023 13:30:37 for ns-3 by
1.9.1