author | Craig Dowell <craigdo@ee.washington.edu> |
Tue, 09 Dec 2008 20:29:04 -0800 | |
changeset 3997 | a66553c56a8f |
parent 3848 | affd0834debc |
child 4140 | 6bbf05bf4826 |
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: |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
36 |
/** |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
37 |
* Create an empty ApplicationContainer. |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
38 |
*/ |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
39 |
ApplicationContainer (); |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
40 |
|
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
41 |
/** |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
42 |
* Create an ApplicationContainer with exactly one application |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
43 |
* |
3997
a66553c56a8f
make a pass through doxygen fixing errors
Craig Dowell <craigdo@ee.washington.edu>
parents:
3848
diff
changeset
|
44 |
* \param application The application to add to the container |
3848
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
45 |
*/ |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
46 |
ApplicationContainer (Ptr<Application> application); |
affd0834debc
address bug 393 (need to overload Install methods for python)
Craig Dowell <craigdo@ee.washington.edu>
parents:
2836
diff
changeset
|
47 |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
48 |
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
|
49 |
|
2698 | 50 |
/** |
51 |
* \returns an iterator which points to the start of the array of pointers. |
|
52 |
*/ |
|
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
53 |
Iterator Begin (void) const; |
2698 | 54 |
/** |
55 |
* \returns an iterator which points to the end of the array of pointers. |
|
56 |
*/ |
|
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
57 |
Iterator End (void) const; |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
58 |
|
2698 | 59 |
/** |
60 |
* \returns the number of netdevice pointers stored in this container. |
|
61 |
*/ |
|
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
62 |
uint32_t GetN (void) const; |
2698 | 63 |
/** |
64 |
* \param i the index of the requested netdevice pointer. |
|
65 |
* \returns the requested netdevice pointer. |
|
66 |
*/ |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
67 |
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
|
68 |
|
2698 | 69 |
/** |
70 |
* \param other another netdevice container |
|
71 |
* |
|
72 |
* Append to the end of this container the other input container. |
|
73 |
*/ |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
74 |
void Add (ApplicationContainer other); |
2698 | 75 |
/** |
2836
f1e044cf2430
quiet dox warning
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
76 |
* \param application another netdevice pointer. |
2698 | 77 |
* |
78 |
* Append to the end of this container the input netdevice pointer. |
|
79 |
*/ |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
80 |
void Add (Ptr<Application> application); |
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
81 |
|
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
82 |
void Start (Time start); |
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
83 |
void Stop (Time stop); |
2417
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
84 |
|
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
85 |
private: |
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
86 |
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
|
87 |
}; |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
88 |
|
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
89 |
} // namespace ns3 |
004ac83aca83
add device/node containers for helper API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
90 |
|
2731
9eb9988afd08
a bunch of new helpers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2698
diff
changeset
|
91 |
#endif /* APPLICATION_CONTAINER_H */ |