do not use Queue::CreateDefault
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sun, 02 Mar 2008 21:57:28 +0100
changeset 253380cdc3eec057
parent 2532 86a40c7cbfe9
child 2534 0dd75c81244e
do not use Queue::CreateDefault
examples/csma-broadcast.cc
examples/csma-multicast.cc
examples/csma-one-subnet.cc
examples/csma-packet-socket.cc
examples/mixed-global-routing.cc
examples/simple-global-routing.cc
examples/udp-echo.cc
src/devices/csma/csma-ipv4-topology.cc
src/devices/point-to-point/point-to-point-topology.cc
tutorial/point-to-point-ipv4-topology.cc
utils/print-introspected-doxygen.cc
     1.1 --- a/examples/csma-broadcast.cc	Sun Mar 02 21:12:21 2008 +0100
     1.2 +++ b/examples/csma-broadcast.cc	Sun Mar 02 21:57:28 2008 +0100
     1.3 @@ -93,12 +93,6 @@
     1.4  #endif
     1.5  
     1.6    // Set up some default values for the simulation.  Use the Bind()
     1.7 -  // technique to tell the system what subclass of Queue to use,
     1.8 -  // and what the queue limit is
     1.9 -
    1.10 -  // The below Bind command tells the queue factory which class to
    1.11 -  // instantiate, when the queue factory is invoked in the topology code
    1.12 -  DefaultValue::Bind ("Queue", "DropTailQueue");
    1.13  
    1.14    // Allow the user to override any of the defaults and the above
    1.15    // Bind()s at run-time, via command-line arguments
     2.1 --- a/examples/csma-multicast.cc	Sun Mar 02 21:12:21 2008 +0100
     2.2 +++ b/examples/csma-multicast.cc	Sun Mar 02 21:57:28 2008 +0100
     2.3 @@ -93,12 +93,7 @@
     2.4  #endif
     2.5  //
     2.6  // Set up default values for the simulation.  Use the DefaultValue::Bind()
     2.7 -// technique to tell the system what subclass of Queue to use.  The Bind
     2.8 -// command command tells the queue factory which class to instantiate when the
     2.9 -// queue factory is invoked in the topology code
    2.10 -//
    2.11 -  DefaultValue::Bind ("Queue", "DropTailQueue");
    2.12 -//
    2.13 +
    2.14  // Allow the user to override any of the defaults and the above Bind() at
    2.15  // run-time, via command-line arguments
    2.16  //
     3.1 --- a/examples/csma-one-subnet.cc	Sun Mar 02 21:12:21 2008 +0100
     3.2 +++ b/examples/csma-one-subnet.cc	Sun Mar 02 21:57:28 2008 +0100
     3.3 @@ -85,12 +85,6 @@
     3.4    LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_ALL);
     3.5  #endif
     3.6  //
     3.7 -// Set up default values for the simulation.  Use the DefaultValue::Bind()
     3.8 -// technique to tell the system what subclass of Queue to use.  The Bind
     3.9 -// command command tells the queue factory which class to instantiate when the
    3.10 -// queue factory is invoked in the topology code
    3.11 -//
    3.12 -  DefaultValue::Bind ("Queue", "DropTailQueue");
    3.13  //
    3.14  // Allow the user to override any of the defaults and the above Bind() at
    3.15  // run-time, via command-line arguments
     4.1 --- a/examples/csma-packet-socket.cc	Sun Mar 02 21:12:21 2008 +0100
     4.2 +++ b/examples/csma-packet-socket.cc	Sun Mar 02 21:57:28 2008 +0100
     4.3 @@ -54,6 +54,7 @@
     4.4  #include "ns3/socket.h"
     4.5  #include "ns3/onoff-application.h"
     4.6  #include "ns3/queue.h"
     4.7 +#include "ns3/drop-tail-queue.h"
     4.8  
     4.9  using namespace ns3;
    4.10  
    4.11 @@ -67,7 +68,7 @@
    4.12                                                                 "EncapsulationMode", String ("Llc"));
    4.13    node->AddDevice (device);
    4.14    device->Attach (channel);
    4.15 -  Ptr<Queue> queue = Queue::CreateDefault ();
    4.16 +  Ptr<Queue> queue = CreateObject<DropTailQueue> ();
    4.17    device->AddQueue (queue);
    4.18    return device;
    4.19  }
     5.1 --- a/examples/mixed-global-routing.cc	Sun Mar 02 21:12:21 2008 +0100
     5.2 +++ b/examples/mixed-global-routing.cc	Sun Mar 02 21:57:28 2008 +0100
     5.3 @@ -104,13 +104,7 @@
     5.4    LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_ALL);
     5.5  #endif
     5.6    // Set up some default values for the simulation.  Use the Bind ()
     5.7 -  // technique to tell the system what subclass of Queue to use,
     5.8 -  // and what the queue limit is
     5.9  
    5.10 -  // The below DefaultValue::Bind command tells the queue factory which 
    5.11 -  // class to instantiate, when the queue factory is invoked in the 
    5.12 -  // topology code
    5.13 -  DefaultValue::Bind ("Queue", "DropTailQueue");
    5.14  
    5.15    Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
    5.16    Config::SetDefault ("OnOffApplication::DataRate", DataRate ("448kb/s"));
     6.1 --- a/examples/simple-global-routing.cc	Sun Mar 02 21:12:21 2008 +0100
     6.2 +++ b/examples/simple-global-routing.cc	Sun Mar 02 21:57:28 2008 +0100
     6.3 @@ -105,12 +105,6 @@
     6.4    LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_ALL);
     6.5  #endif
     6.6    // Set up some default values for the simulation.  Use the 
     6.7 -  // DefaultValue::Bind () technique to tell the system what subclass of 
     6.8 -  // Queue to use, and what the queue limit is
     6.9 -
    6.10 -  // The below Bind command tells the queue factory which class to
    6.11 -  // instantiate, when the queue factory is invoked in the topology code
    6.12 -  DefaultValue::Bind ("Queue", "DropTailQueue");
    6.13  
    6.14    Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
    6.15    Config::SetDefault ("OnOffApplication::DataRate", DataRate ("448kb/s"));
     7.1 --- a/examples/udp-echo.cc	Sun Mar 02 21:12:21 2008 +0100
     7.2 +++ b/examples/udp-echo.cc	Sun Mar 02 21:57:28 2008 +0100
     7.3 @@ -85,14 +85,7 @@
     7.4    LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_ALL);
     7.5    LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_ALL);
     7.6  #endif
     7.7 -//
     7.8 -// Set up default values for the simulation.  Use the DefaultValue::Bind()
     7.9 -// technique to tell the system what subclass of Queue to use.  The Bind
    7.10 -// command command tells the queue factory which class to instantiate when the
    7.11 -// queue factory is invoked in the topology code
    7.12 -//
    7.13 -  DefaultValue::Bind ("Queue", "DropTailQueue");
    7.14 -//
    7.15 +
    7.16  // Allow the user to override any of the defaults and the above Bind() at
    7.17  // run-time, via command-line arguments
    7.18  //
     8.1 --- a/src/devices/csma/csma-ipv4-topology.cc	Sun Mar 02 21:12:21 2008 +0100
     8.2 +++ b/src/devices/csma/csma-ipv4-topology.cc	Sun Mar 02 21:57:28 2008 +0100
     8.3 @@ -26,6 +26,7 @@
     8.4  #include "ns3/ipv4-address.h"
     8.5  #include "ns3/ipv4.h"
     8.6  #include "ns3/queue.h"
     8.7 +#include "ns3/drop-tail-queue.h"
     8.8  #include "ns3/string.h"
     8.9  
    8.10  #include "csma-channel.h"
    8.11 @@ -40,7 +41,7 @@
    8.12    Ptr<CsmaChannel> channel,
    8.13    Mac48Address addr)
    8.14  {
    8.15 -  Ptr<Queue> q = Queue::CreateDefault ();
    8.16 +  Ptr<Queue> q = CreateObjectWith<DropTailQueue> ();
    8.17  
    8.18    // assume full-duplex
    8.19    Ptr<CsmaNetDevice> nd = CreateObjectWith<CsmaNetDevice> ("Node", node, 
    8.20 @@ -59,7 +60,7 @@
    8.21                                       Ptr<CsmaChannel> ch,
    8.22                                       Mac48Address addr)
    8.23  {
    8.24 -  Ptr<Queue> q = Queue::CreateDefault ();
    8.25 +  Ptr<Queue> q = CreateObjectWith<DropTailQueue> ();
    8.26  
    8.27    Ptr<CsmaNetDevice> nd0 = CreateObjectWith<CsmaNetDevice> ("Node", n1, 
    8.28                                                              "Address", addr,
    8.29 @@ -85,7 +86,7 @@
    8.30                                       Ptr<CsmaChannel> ch,
    8.31                                       Mac48Address addr)
    8.32  {
    8.33 -  Ptr<Queue> q = Queue::CreateDefault ();
    8.34 +  Ptr<Queue> q = CreateObjectWith<DropTailQueue> ();
    8.35  
    8.36    Ptr<CsmaNetDevice> nd0 = CreateObjectWith<CsmaNetDevice> ("Node", n1, 
    8.37                                                              "Address", addr,
     9.1 --- a/src/devices/point-to-point/point-to-point-topology.cc	Sun Mar 02 21:12:21 2008 +0100
     9.2 +++ b/src/devices/point-to-point/point-to-point-topology.cc	Sun Mar 02 21:57:28 2008 +0100
     9.3 @@ -31,6 +31,7 @@
     9.4  #include "ns3/ipv4-address.h"
     9.5  #include "ns3/ipv4.h"
     9.6  #include "ns3/queue.h"
     9.7 +#include "ns3/drop-tail-queue.h"
     9.8  
     9.9  #include "point-to-point-channel.h"
    9.10  #include "point-to-point-net-device.h"
    9.11 @@ -51,7 +52,7 @@
    9.12                                                                               "Address", Mac48Address::Allocate ());
    9.13    n1->AddDevice (net1);
    9.14  
    9.15 -  Ptr<Queue> q = Queue::CreateDefault ();
    9.16 +  Ptr<Queue> q = CreateObjectWith<DropTailQueue> ();
    9.17    net1->AddQueue(q);
    9.18    net1->Attach (channel);
    9.19    
    9.20 @@ -59,7 +60,7 @@
    9.21                                                                               "Address", Mac48Address::Allocate ());
    9.22    n2->AddDevice (net2);
    9.23  
    9.24 -  q = Queue::CreateDefault ();
    9.25 +  q = CreateObjectWith<DropTailQueue> ();
    9.26    net2->AddQueue(q);
    9.27    net2->Attach (channel);
    9.28  
    10.1 --- a/tutorial/point-to-point-ipv4-topology.cc	Sun Mar 02 21:12:21 2008 +0100
    10.2 +++ b/tutorial/point-to-point-ipv4-topology.cc	Sun Mar 02 21:57:28 2008 +0100
    10.3 @@ -21,6 +21,7 @@
    10.4  #include "ns3/ipv4-address.h"
    10.5  #include "ns3/ipv4.h"
    10.6  #include "ns3/queue.h"
    10.7 +#include "ns3/drop-tail-queue.h"
    10.8  
    10.9  #include "ns3/point-to-point-channel.h"
   10.10  #include "ns3/point-to-point-net-device.h"
   10.11 @@ -47,7 +48,7 @@
   10.12      CreateObjectWith<PointToPointNetDevice> ("Node", node, 
   10.13                                               "Address", Mac48Address::Allocate ());
   10.14    node->AddDevice (nd);
   10.15 -  Ptr<Queue> q = Queue::CreateDefault ();
   10.16 +  Ptr<Queue> q = CreateObject<DropTailQueue> ();
   10.17    nd->AddQueue(q);
   10.18    nd->Attach (channel);
   10.19  
    11.1 --- a/utils/print-introspected-doxygen.cc	Sun Mar 02 21:12:21 2008 +0100
    11.2 +++ b/utils/print-introspected-doxygen.cc	Sun Mar 02 21:57:28 2008 +0100
    11.3 @@ -5,6 +5,7 @@
    11.4  #include "ns3/point-to-point-net-device.h"
    11.5  #include "ns3/csma-net-device.h"
    11.6  #include "ns3/queue.h"
    11.7 +#include "ns3/drop-tail-queue.h"
    11.8  #include "ns3/mobility-model-notifier.h"
    11.9  #include "ns3/default-value.h"
   11.10  #include "ns3/string.h"
   11.11 @@ -123,12 +124,12 @@
   11.12    Ptr<PointToPointNetDevice> p2p = CreateObjectWith<PointToPointNetDevice> ("Node", node, 
   11.13  									    "Address", Mac48Address::Allocate ());
   11.14    node->AddDevice (p2p);
   11.15 -  p2p->AddQueue (Queue::CreateDefault ());
   11.16 +  p2p->AddQueue (CreateObject<DropTailQueue> ());
   11.17    Ptr<CsmaNetDevice> csma = CreateObjectWith<CsmaNetDevice> ("Node", node, 
   11.18  							     "Address", Mac48Address::Allocate (),
   11.19  							     "EncapsulationMode", String ("Llc"));
   11.20    node->AddDevice (csma);
   11.21 -  csma->AddQueue (Queue::CreateDefault ());
   11.22 +  csma->AddQueue (CreateObject<DropTailQueue> ());
   11.23  
   11.24    TraceResolver::SourceCollection collection;
   11.25    NodeList::GetTraceResolver ()->CollectSources ("", TraceContext (), &collection);