author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Mon, 04 Jun 2007 16:21:05 +0200 | |
changeset 729 | b5e744285e92 |
parent 728 | src/node/i-node.cc@95c426b1cb60 |
child 1176 | 4894ea885c0f |
permissions | -rw-r--r-- |
233
6b60d7b27ae4
change emacs style commands
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
232
diff
changeset
|
1 |
// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- |
232
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
2 |
// |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
3 |
// Copyright (c) 2006 Georgia Tech Research Corporation |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
4 |
// All rights reserved. |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
5 |
// |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
6 |
// This program is free software; you can redistribute it and/or modify |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
7 |
// it under the terms of the GNU General Public License version 2 as |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
// published by the Free Software Foundation; |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
// |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
10 |
// This program is distributed in the hope that it will be useful, |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
11 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
12 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
// GNU General Public License for more details. |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
// |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
// You should have received a copy of the GNU General Public License |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
16 |
// along with this program; if not, write to the Free Software |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
17 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
// |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
// Author: George F. Riley<riley@ece.gatech.edu> |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
20 |
// |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
21 |
|
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
22 |
// Implement the basic Node object for ns3. |
232
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
// George F. Riley, Georgia Tech, Fall 2006 |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
|
729
b5e744285e92
rename i-node to node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
728
diff
changeset
|
25 |
#include "node.h" |
358
cefde4f0d6b2
Add nodes to NodeList in static Create method; cut over simple-serial.cc to use this node factory
Tom Henderson <tomh@tomh.org>
parents:
355
diff
changeset
|
26 |
#include "node-list.h" |
467
319ffa6c5e0a
dispose properly from Node::Dispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
465
diff
changeset
|
27 |
#include "net-device.h" |
585
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
28 |
#include "application.h" |
475
aeadea0cdc82
destroy the Node vector upon Simulator::Destroy rather than wait until the global static destructor of Node::g_nodes is invoked. This fixes a bad assert caught with valgrind.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
474
diff
changeset
|
29 |
#include "ns3/simulator.h" |
232
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
30 |
|
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
31 |
namespace ns3{ |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
32 |
|
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
33 |
const InterfaceId Node::iid = MakeInterfaceId ("Node", Object::iid); |
512
5404e1e41f82
make Node derive from NsUnknown rather than Object
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
484
diff
changeset
|
34 |
|
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
35 |
Node::Node() |
710
2a9c061219a7
port code from Interface to Object
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
607
diff
changeset
|
36 |
: m_id(0), |
484
cf7fbb84d74b
rework the Node and NodeList classes to manage reference counts correctly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
482
diff
changeset
|
37 |
m_sid(0) |
244
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
38 |
{ |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
39 |
SetInterfaceId (Node::iid); |
484
cf7fbb84d74b
rework the Node and NodeList classes to manage reference counts correctly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
482
diff
changeset
|
40 |
m_id = NodeList::Add (this); |
355
d18da75542c7
Add static node factory methods to class Node
Tom Henderson <tomh@tomh.org>
parents:
244
diff
changeset
|
41 |
} |
d18da75542c7
Add static node factory methods to class Node
Tom Henderson <tomh@tomh.org>
parents:
244
diff
changeset
|
42 |
|
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
43 |
Node::Node(uint32_t sid) |
710
2a9c061219a7
port code from Interface to Object
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
607
diff
changeset
|
44 |
: m_id(0), |
484
cf7fbb84d74b
rework the Node and NodeList classes to manage reference counts correctly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
482
diff
changeset
|
45 |
m_sid(sid) |
355
d18da75542c7
Add static node factory methods to class Node
Tom Henderson <tomh@tomh.org>
parents:
244
diff
changeset
|
46 |
{ |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
47 |
SetInterfaceId (Node::iid); |
484
cf7fbb84d74b
rework the Node and NodeList classes to manage reference counts correctly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
482
diff
changeset
|
48 |
m_id = NodeList::Add (this); |
244
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
49 |
} |
232
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
50 |
|
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
51 |
Node::~Node () |
232
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
52 |
{} |
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
53 |
|
594
bf1c6a6ab58d
make the Node API more consistent
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
585
diff
changeset
|
54 |
TraceResolver * |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
55 |
Node::CreateTraceResolver (TraceContext const &context) |
594
bf1c6a6ab58d
make the Node API more consistent
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
585
diff
changeset
|
56 |
{ |
bf1c6a6ab58d
make the Node API more consistent
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
585
diff
changeset
|
57 |
return DoCreateTraceResolver (context); |
bf1c6a6ab58d
make the Node API more consistent
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
585
diff
changeset
|
58 |
} |
bf1c6a6ab58d
make the Node API more consistent
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
585
diff
changeset
|
59 |
|
244
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
60 |
uint32_t |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
61 |
Node::GetId (void) const |
244
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
62 |
{ |
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
63 |
return m_id; |
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
64 |
} |
359
91b7ad7fa784
OnOffApplication functioning; some Node class cleanup
Tom Henderson <tomh@tomh.org>
parents:
358
diff
changeset
|
65 |
|
244
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
66 |
uint32_t |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
67 |
Node::GetSystemId (void) const |
244
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
68 |
{ |
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
69 |
return m_sid; |
caff04d90a66
remove SetNodeId and implement GetId and GetSystemId
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
70 |
} |
232
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
71 |
|
447
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
72 |
uint32_t |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
73 |
Node::AddDevice (Ptr<NetDevice> device) |
447
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
74 |
{ |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
75 |
uint32_t index = m_devices.size (); |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
76 |
m_devices.push_back (device); |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
77 |
DoAddDevice (device); |
535
fb6735f93868
Enable both ascii and pcap tracing
Tom Henderson <tomh@tomh.org>
parents:
525
diff
changeset
|
78 |
device->SetIfIndex(index); |
447
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
79 |
return index; |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
80 |
} |
568
e1660959ecbb
use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
535
diff
changeset
|
81 |
Ptr<NetDevice> |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
82 |
Node::GetDevice (uint32_t index) const |
447
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
83 |
{ |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
84 |
return m_devices[index]; |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
85 |
} |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
86 |
uint32_t |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
87 |
Node::GetNDevices (void) const |
447
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
88 |
{ |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
89 |
return m_devices.size (); |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
90 |
} |
180117abfb04
add NetDevice list into Node base class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
381
diff
changeset
|
91 |
|
585
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
92 |
uint32_t |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
93 |
Node::AddApplication (Ptr<Application> application) |
585
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
94 |
{ |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
95 |
uint32_t index = m_applications.size (); |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
96 |
m_applications.push_back (application); |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
97 |
return index; |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
98 |
} |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
99 |
Ptr<Application> |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
100 |
Node::GetApplication (uint32_t index) const |
585
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
101 |
{ |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
102 |
return m_applications[index]; |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
103 |
} |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
104 |
uint32_t |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
105 |
Node::GetNApplications (void) const |
585
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
106 |
{ |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
107 |
return m_applications.size (); |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
108 |
} |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
109 |
|
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
110 |
|
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
710
diff
changeset
|
111 |
void Node::DoDispose() |
465
7f620ea278f4
merge in raj's dispose early work
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
448
diff
changeset
|
112 |
{ |
568
e1660959ecbb
use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
535
diff
changeset
|
113 |
for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin (); |
467
319ffa6c5e0a
dispose properly from Node::Dispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
465
diff
changeset
|
114 |
i != m_devices.end (); i++) |
319ffa6c5e0a
dispose properly from Node::Dispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
465
diff
changeset
|
115 |
{ |
568
e1660959ecbb
use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
535
diff
changeset
|
116 |
Ptr<NetDevice> device = *i; |
467
319ffa6c5e0a
dispose properly from Node::Dispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
465
diff
changeset
|
117 |
device->Dispose (); |
568
e1660959ecbb
use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
535
diff
changeset
|
118 |
*i = 0; |
467
319ffa6c5e0a
dispose properly from Node::Dispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
465
diff
changeset
|
119 |
} |
515
e907146a191e
fix valgrind warning: UdpSocket must manage carefully its Ipv4EndPoint to avoid double deleting it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
514
diff
changeset
|
120 |
m_devices.clear (); |
585
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
121 |
for (std::vector<Ptr<Application> >::iterator i = m_applications.begin (); |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
122 |
i != m_applications.end (); i++) |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
123 |
{ |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
124 |
Ptr<Application> application = *i; |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
125 |
application->Dispose (); |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
126 |
*i = 0; |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
127 |
} |
a009b03b720a
remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
580
diff
changeset
|
128 |
m_applications.clear (); |
710
2a9c061219a7
port code from Interface to Object
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
607
diff
changeset
|
129 |
Object::DoDispose (); |
465
7f620ea278f4
merge in raj's dispose early work
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
448
diff
changeset
|
130 |
} |
7f620ea278f4
merge in raj's dispose early work
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
448
diff
changeset
|
131 |
|
232
8cd08910f9a1
initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
132 |
}//namespace ns3 |