A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
energy-source-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 ENERGY_SOURCE_CONTAINER_H
24
#define ENERGY_SOURCE_CONTAINER_H
25
26
#include "ns3/energy-source.h"
27
#include "ns3/object.h"
28
#include <vector>
29
#include <stdint.h>
30
31
namespace
ns3 {
32
44
class
EnergySourceContainer
:
public
Object
45
{
46
public
:
47
typedef
std::vector< Ptr<EnergySource> >::const_iterator
Iterator
;
48
49
public
:
50
static
TypeId
GetTypeId
(
void
);
54
EnergySourceContainer
();
55
~EnergySourceContainer
();
56
63
EnergySourceContainer
(
Ptr<EnergySource>
source);
64
72
EnergySourceContainer
(std::string sourceName);
73
84
EnergySourceContainer
(
const
EnergySourceContainer
&a,
85
const
EnergySourceContainer
&b);
86
106
Iterator
Begin
(
void
)
const
;
107
127
Iterator
End
(
void
)
const
;
128
134
uint32_t
GetN
(
void
)
const
;
135
142
Ptr<EnergySource>
Get
(uint32_t i)
const
;
143
150
void
Add
(
EnergySourceContainer
container);
151
157
void
Add
(
Ptr<EnergySource>
source);
158
165
void
Add
(std::string sourceName);
166
167
private
:
168
virtual
void
DoDispose
(
void
);
169
173
virtual
void
DoStart
(
void
);
174
175
private
:
176
std::vector< Ptr<EnergySource> >
m_sources
;
177
178
};
179
180
}
// namespace ns3
181
182
#endif
/* ENERGY_SOURCE_CONTAINER_H */
src
energy
helper
energy-source-container.h
Generated on Fri Dec 21 2012 19:00:35 for ns-3 by
1.8.1.2