A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
energy
model
device-energy-model-container.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008 INRIA
4
* Copyright (c) 2010 Network Security Lab, University of Washington, Seattle.
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation;
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*
19
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20
* Sidharth Nabar <snabar@uw.edu>, He Wu <mdzz@u.washington.edu>
21
*/
22
23
#ifndef DEVICE_ENERGY_MODEL_CONTAINER_H
24
#define DEVICE_ENERGY_MODEL_CONTAINER_H
25
26
#include "ns3/device-energy-model.h"
27
#include <vector>
28
#include <stdint.h>
29
30
namespace
ns3
{
31
43
class
DeviceEnergyModelContainer
44
{
45
public
:
46
typedef
std::vector< Ptr<DeviceEnergyModel> >::const_iterator
Iterator
;
47
48
public
:
52
DeviceEnergyModelContainer
();
53
60
DeviceEnergyModelContainer
(
Ptr<DeviceEnergyModel>
model);
61
69
DeviceEnergyModelContainer
(std::string modelName);
70
82
DeviceEnergyModelContainer
(
const
DeviceEnergyModelContainer
&a,
83
const
DeviceEnergyModelContainer
&b);
84
104
Iterator
Begin
(
void
)
const
;
105
125
Iterator
End
(
void
)
const
;
126
132
uint32_t
GetN
(
void
)
const
;
133
140
Ptr<DeviceEnergyModel>
Get
(uint32_t i)
const
;
141
148
void
Add
(
DeviceEnergyModelContainer
container);
149
155
void
Add
(
Ptr<DeviceEnergyModel>
model);
156
163
void
Add
(std::string modelName);
164
168
void
Clear
(
void
);
169
170
private
:
171
std::vector< Ptr<DeviceEnergyModel> >
m_models
;
172
173
};
174
175
}
// namespace ns3
176
177
#endif
/* DEVICE_ENERGY_MODEL_CONTAINER_H */
ns3::DeviceEnergyModelContainer::Iterator
std::vector< Ptr< DeviceEnergyModel > >::const_iterator Iterator
Definition:
device-energy-model-container.h:46
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::DeviceEnergyModelContainer::Add
void Add(DeviceEnergyModelContainer container)
Definition:
device-energy-model-container.cc:88
ns3::DeviceEnergyModelContainer
Holds a vector of ns3::DeviceEnergyModel pointers.
Definition:
device-energy-model-container.h:43
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:81
ns3::DeviceEnergyModelContainer::GetN
uint32_t GetN(void) const
Get the number of Ptr<DeviceEnergyModel> stored in this container.
Definition:
device-energy-model-container.cc:74
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::DeviceEnergyModelContainer::End
Iterator End(void) const
Get an iterator which refers to the last DeviceEnergyModel pointer in the container.
Definition:
device-energy-model-container.cc:67
ns3::DeviceEnergyModelContainer::Begin
Iterator Begin(void) const
Get an iterator which refers to the first DeviceEnergyModel pointer in the container.
Definition:
device-energy-model-container.cc:60
ns3::DeviceEnergyModelContainer::m_models
std::vector< Ptr< DeviceEnergyModel > > m_models
Definition:
device-energy-model-container.h:171
ns3::DeviceEnergyModelContainer::DeviceEnergyModelContainer
DeviceEnergyModelContainer()
Creates an empty DeviceEnergyModelContainer.
Definition:
device-energy-model-container.cc:31
ns3::DeviceEnergyModelContainer::Clear
void Clear(void)
Removes all elements in the container.
Definition:
device-energy-model-container.cc:115
Generated on Wed Nov 7 2018 10:01:52 for ns-3 by
1.8.14