src/simulator/simulator-impl.h
author Guillaume Seguin <guillaume@segu.in>
Thu Nov 12 13:19:35 2009 +0100 (2009-11-12)
changeset 5507 915abd2b907b
parent 4552 8d3801089629
child 5521 37c6c83d4252
permissions -rw-r--r--
Simulator::SetScheduler now takes an ObjectFactory
     1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
     2 /*
     3  * Copyright (c) 2005,2006 INRIA
     4  *
     5  * This program is free software; you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License version 2 as
     7  * published by the Free Software Foundation;
     8  *
     9  * This program is distributed in the hope that it will be useful,
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12  * GNU General Public License for more details.
    13  *
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    17  *
    18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
    19  */
    20 
    21 #ifndef SIMULATOR_IMPL_H
    22 #define SIMULATOR_IMPL_H
    23 
    24 #include "event-impl.h"
    25 #include "event-id.h"
    26 #include "nstime.h"
    27 #include "ns3/object.h"
    28 #include "ns3/object-factory.h"
    29 #include "ns3/ptr.h"
    30 
    31 namespace ns3 {
    32 
    33 class Scheduler;
    34 
    35 class SimulatorImpl : public Object
    36 {
    37 public:
    38   virtual void Destroy () = 0;
    39   virtual bool IsFinished (void) const = 0;
    40   virtual Time Next (void) const = 0;
    41   virtual void Stop (void) = 0;
    42   virtual EventId Schedule (Time const &time, EventImpl *event) = 0;
    43   virtual EventId ScheduleNow (EventImpl *event) = 0;
    44   virtual EventId ScheduleDestroy (EventImpl *event) = 0;
    45   virtual void Remove (const EventId &ev) = 0;
    46   virtual void Cancel (const EventId &ev) = 0;
    47   virtual bool IsExpired (const EventId &ev) const = 0;
    48   virtual void Run (void) = 0;
    49   virtual void RunOneEvent (void) = 0;
    50   virtual Time Now (void) const = 0;
    51   virtual Time GetDelayLeft (const EventId &id) const = 0;
    52   virtual Time GetMaximumSimulationTime (void) const = 0;
    53   virtual void SetScheduler (ObjectFactory schedulerFactory) = 0;
    54 };
    55 
    56 } // namespace ns3
    57 
    58 #endif /* SIMULATOR_IMPL_H */