utils/bench-simulator.cc
changeset 5507 915abd2b907b
parent 4682 b9d9ae596f83
child 6821 203367ae7433
     1.1 --- a/utils/bench-simulator.cc	Wed Jul 15 08:36:41 2009 +0200
     1.2 +++ b/utils/bench-simulator.cc	Thu Nov 12 13:19:35 2009 +0100
     1.3 @@ -162,21 +162,26 @@
     1.4      }
     1.5    while (argc > 0) 
     1.6      {
     1.7 +      ObjectFactory factory;
     1.8        if (strcmp ("--list", argv[0]) == 0) 
     1.9          {
    1.10 -          Simulator::SetScheduler (CreateObject<ListScheduler> ());
    1.11 +          factory.SetTypeId ("ns3::ListScheduler");
    1.12 +          Simulator::SetScheduler (factory);
    1.13          } 
    1.14        else if (strcmp ("--heap", argv[0]) == 0) 
    1.15          {
    1.16 -          Simulator::SetScheduler (CreateObject<HeapScheduler> ());
    1.17 +          factory.SetTypeId ("ns3::HeapScheduler");
    1.18 +          Simulator::SetScheduler (factory);
    1.19          } 
    1.20        else if (strcmp ("--map", argv[0]) == 0) 
    1.21          {
    1.22 -          Simulator::SetScheduler (CreateObject<MapScheduler> ());
    1.23 +          factory.SetTypeId ("ns3::HeapScheduler");
    1.24 +          Simulator::SetScheduler (factory);
    1.25          } 
    1.26        else if (strcmp ("--calendar", argv[0]) == 0)
    1.27          {
    1.28 -          Simulator::SetScheduler (CreateObject<CalendarScheduler> ());
    1.29 +          factory.SetTypeId ("ns3::CalendarScheduler");
    1.30 +          Simulator::SetScheduler (factory);
    1.31          }
    1.32        else if (strcmp ("--debug", argv[0]) == 0) 
    1.33          {