utils/bench-simulator.cc
changeset 5507 915abd2b907b
parent 4682 b9d9ae596f83
child 6821 203367ae7433
equal deleted inserted replaced
5506:8a51fa38a4ee 5507:915abd2b907b
   160     {
   160     {
   161       input = new std::ifstream (filename);
   161       input = new std::ifstream (filename);
   162     }
   162     }
   163   while (argc > 0) 
   163   while (argc > 0) 
   164     {
   164     {
       
   165       ObjectFactory factory;
   165       if (strcmp ("--list", argv[0]) == 0) 
   166       if (strcmp ("--list", argv[0]) == 0) 
   166         {
   167         {
   167           Simulator::SetScheduler (CreateObject<ListScheduler> ());
   168           factory.SetTypeId ("ns3::ListScheduler");
       
   169           Simulator::SetScheduler (factory);
   168         } 
   170         } 
   169       else if (strcmp ("--heap", argv[0]) == 0) 
   171       else if (strcmp ("--heap", argv[0]) == 0) 
   170         {
   172         {
   171           Simulator::SetScheduler (CreateObject<HeapScheduler> ());
   173           factory.SetTypeId ("ns3::HeapScheduler");
       
   174           Simulator::SetScheduler (factory);
   172         } 
   175         } 
   173       else if (strcmp ("--map", argv[0]) == 0) 
   176       else if (strcmp ("--map", argv[0]) == 0) 
   174         {
   177         {
   175           Simulator::SetScheduler (CreateObject<MapScheduler> ());
   178           factory.SetTypeId ("ns3::HeapScheduler");
       
   179           Simulator::SetScheduler (factory);
   176         } 
   180         } 
   177       else if (strcmp ("--calendar", argv[0]) == 0)
   181       else if (strcmp ("--calendar", argv[0]) == 0)
   178         {
   182         {
   179           Simulator::SetScheduler (CreateObject<CalendarScheduler> ());
   183           factory.SetTypeId ("ns3::CalendarScheduler");
       
   184           Simulator::SetScheduler (factory);
   180         }
   185         }
   181       else if (strcmp ("--debug", argv[0]) == 0) 
   186       else if (strcmp ("--debug", argv[0]) == 0) 
   182         {
   187         {
   183           g_debug = true;
   188           g_debug = true;
   184         } 
   189         }