A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
device-energy-model-container.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 INRIA
3
* Copyright (c) 2010 Network Security Lab, University of Washington, Seattle.
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
* Sidharth Nabar <snabar@uw.edu>, He Wu <mdzz@u.washington.edu>
20
*/
21
22
#ifndef DEVICE_ENERGY_MODEL_CONTAINER_H
23
#define DEVICE_ENERGY_MODEL_CONTAINER_H
24
25
#include "
device-energy-model.h
"
26
27
#include <stdint.h>
28
#include <vector>
29
30
namespace
ns3
31
{
32
44
class
DeviceEnergyModelContainer
45
{
46
public
:
48
typedef
std::vector<Ptr<DeviceEnergyModel>>::const_iterator
Iterator
;
49
50
public
:
54
DeviceEnergyModelContainer
();
55
62
DeviceEnergyModelContainer
(
Ptr<DeviceEnergyModel>
model);
63
71
DeviceEnergyModelContainer
(std::string modelName);
72
84
DeviceEnergyModelContainer
(
const
DeviceEnergyModelContainer
& a,
85
const
DeviceEnergyModelContainer
& b);
86
106
Iterator
Begin
()
const
;
107
127
Iterator
End
()
const
;
128
134
uint32_t
GetN
()
const
;
135
142
Ptr<DeviceEnergyModel>
Get
(uint32_t i)
const
;
143
150
void
Add
(
DeviceEnergyModelContainer
container
);
151
157
void
Add
(
Ptr<DeviceEnergyModel>
model);
158
165
void
Add
(std::string modelName);
166
170
void
Clear
();
171
172
private
:
173
std::vector<Ptr<DeviceEnergyModel>>
m_models
;
174
};
175
176
}
// namespace ns3
177
178
#endif
/* DEVICE_ENERGY_MODEL_CONTAINER_H */
ns3::DeviceEnergyModelContainer
Holds a vector of ns3::DeviceEnergyModel pointers.
Definition:
device-energy-model-container.h:45
ns3::DeviceEnergyModelContainer::Clear
void Clear()
Removes all elements in the container.
Definition:
device-energy-model-container.cc:116
ns3::DeviceEnergyModelContainer::DeviceEnergyModelContainer
DeviceEnergyModelContainer()
Creates an empty DeviceEnergyModelContainer.
Definition:
device-energy-model-container.cc:32
ns3::DeviceEnergyModelContainer::GetN
uint32_t GetN() const
Get the number of Ptr<DeviceEnergyModel> stored in this container.
Definition:
device-energy-model-container.cc:75
ns3::DeviceEnergyModelContainer::Add
void Add(DeviceEnergyModelContainer container)
Definition:
device-energy-model-container.cc:89
ns3::DeviceEnergyModelContainer::Iterator
std::vector< Ptr< DeviceEnergyModel > >::const_iterator Iterator
Const iterator of DeviceEnergyModel container.
Definition:
device-energy-model-container.h:48
ns3::DeviceEnergyModelContainer::Begin
Iterator Begin() const
Get an iterator which refers to the first DeviceEnergyModel pointer in the container.
Definition:
device-energy-model-container.cc:61
ns3::DeviceEnergyModelContainer::m_models
std::vector< Ptr< DeviceEnergyModel > > m_models
Container of Energy models.
Definition:
device-energy-model-container.h:173
ns3::DeviceEnergyModelContainer::End
Iterator End() const
Get an iterator which refers to the last DeviceEnergyModel pointer in the container.
Definition:
device-energy-model-container.cc:68
ns3::DeviceEnergyModelContainer::Get
Ptr< DeviceEnergyModel > Get(uint32_t i) const
Get the i-th Ptr<DeviceEnergyModel> stored in this container.
Definition:
device-energy-model-container.cc:82
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
device-energy-model.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
openflow-switch.container
container
Definition:
openflow-switch.py:46
src
energy
model
device-energy-model-container.h
Generated on Sun Mar 3 2024 17:10:57 for ns-3 by
1.9.1