rework the refcounting framework to use the MakeNewObject function
This commit is contained in:
@@ -101,10 +101,10 @@ int main (int argc, char *argv[])
|
||||
|
||||
// Here, we will explicitly create four nodes. In more sophisticated
|
||||
// topologies, we could configure a node factory.
|
||||
Ptr<Node> n0 = new InternetNode ();
|
||||
Ptr<Node> n1 = new InternetNode ();
|
||||
Ptr<Node> n2 = new InternetNode ();
|
||||
Ptr<Node> n3 = new InternetNode ();
|
||||
Ptr<Node> n0 = MakeNewObject<InternetNode> ();
|
||||
Ptr<Node> n1 = MakeNewObject<InternetNode> ();
|
||||
Ptr<Node> n2 = MakeNewObject<InternetNode> ();
|
||||
Ptr<Node> n3 = MakeNewObject<InternetNode> ();
|
||||
|
||||
// We create the channels first without any IP addressing information
|
||||
Ptr<PointToPointChannel> channel0 =
|
||||
@@ -134,7 +134,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
// Create the OnOff application to send UDP datagrams of size
|
||||
// 210 bytes at a rate of 448 Kb/s
|
||||
Ptr<OnOffApplication> ooff0 = new OnOffApplication(
|
||||
Ptr<OnOffApplication> ooff0 = MakeNewObject<OnOffApplication> (
|
||||
n0,
|
||||
Ipv4Address("10.1.3.2"),
|
||||
80,
|
||||
@@ -151,7 +151,7 @@ int main (int argc, char *argv[])
|
||||
ooff0->Stop (Seconds(10.0));
|
||||
|
||||
// Create a similar flow from n3 to n1, starting at time 1.1 seconds
|
||||
Ptr<OnOffApplication> ooff1 = new OnOffApplication(
|
||||
Ptr<OnOffApplication> ooff1 = MakeNewObject<OnOffApplication> (
|
||||
n3,
|
||||
Ipv4Address("10.1.2.1"),
|
||||
80,
|
||||
|
||||
Reference in New Issue
Block a user