author | Raj Bhattacharjea <raj.b@gatech.edu> |
Wed, 02 Apr 2008 14:09:36 -0400 | |
changeset 2845 | 2398826af6b4 |
parent 2836 | f1e044cf2430 |
child 3848 | affd0834debc |
permissions | -rw-r--r-- |
2833
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
2 |
/* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
3 |
* Copyright (c) 2008 INRIA |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
4 |
* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
7 |
* published by the Free Software Foundation; |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
8 |
* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
12 |
* GNU General Public License for more details. |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
13 |
* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
17 |
* |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
18 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
f3474fd850b2
add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2731
diff
changeset
|
19 |
*/ |
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
20 |
#ifndef APPLICATION_CONTAINER_H |
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
21 |
#define APPLICATION_CONTAINER_H |
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
22 |
|
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
#include <stdint.h> |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
#include <vector> |
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
25 |
#include "ns3/application.h" |
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
26 |
|
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
27 |
namespace ns3 { |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
28 |
|
2698 | 29 |
/** |
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
30 |
* \brief holds a vector of ns3::Application pointers |
2698 | 31 |
* |
32 |
*/ |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
33 |
class ApplicationContainer |
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
34 |
{ |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
35 |
public: |
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
36 |
typedef std::vector<Ptr<Application> >::const_iterator Iterator; |
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
37 |
|
2698 | 38 |
/** |
39 |
* \returns an iterator which points to the start of the array of pointers. |
|
40 |
*/ |
|
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
41 |
Iterator Begin (void) const; |
2698 | 42 |
/** |
43 |
* \returns an iterator which points to the end of the array of pointers. |
|
44 |
*/ |
|
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
45 |
Iterator End (void) const; |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
46 |
|
2698 | 47 |
/** |
48 |
* \returns the number of netdevice pointers stored in this container. |
|
49 |
*/ |
|
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
50 |
uint32_t GetN (void) const; |
2698 | 51 |
/** |
52 |
* \param i the index of the requested netdevice pointer. |
|
53 |
* \returns the requested netdevice pointer. |
|
54 |
*/ |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
55 |
Ptr<Application> Get (uint32_t i) const; |
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
56 |
|
2698 | 57 |
/** |
58 |
* \param other another netdevice container |
|
59 |
* |
|
60 |
* Append to the end of this container the other input container. |
|
61 |
*/ |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
62 |
void Add (ApplicationContainer other); |
2698 | 63 |
/** |
2836
f1e044cf2430
quiet dox warning
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
64 |
* \param application another netdevice pointer. |
2698 | 65 |
* |
66 |
* Append to the end of this container the input netdevice pointer. |
|
67 |
*/ |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
68 |
void Add (Ptr<Application> application); |
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
69 |
|
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
70 |
void Start (Time start); |
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
71 |
void Stop (Time stop); |
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
72 |
|
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
73 |
private: |
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
74 |
std::vector<Ptr<Application> > m_applications; |
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
75 |
}; |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
76 |
|
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
77 |
} // namespace ns3 |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
78 |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
79 |
#endif /* APPLICATION_CONTAINER_H */ |