00001 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 00002 /* 00003 * Copyright (c) 2005,2006 INRIA 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation; 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> 00019 */ 00020 00021 #ifndef SIMULATOR_IMPL_H 00022 #define SIMULATOR_IMPL_H 00023 00024 #include "event-impl.h" 00025 #include "event-id.h" 00026 #include "nstime.h" 00027 #include "ns3/object.h" 00028 #include "ns3/ptr.h" 00029 00030 namespace ns3 { 00031 00032 class Scheduler; 00033 00034 class SimulatorImpl : public Object 00035 { 00036 public: 00037 virtual void Destroy () = 0; 00038 virtual bool IsFinished (void) const = 0; 00039 virtual Time Next (void) const = 0; 00040 virtual void Stop (void) = 0; 00041 virtual EventId Schedule (Time const &time, EventImpl *event) = 0; 00042 virtual EventId ScheduleNow (EventImpl *event) = 0; 00043 virtual EventId ScheduleDestroy (EventImpl *event) = 0; 00044 virtual void Remove (const EventId &ev) = 0; 00045 virtual void Cancel (const EventId &ev) = 0; 00046 virtual bool IsExpired (const EventId &ev) const = 0; 00047 virtual void Run (void) = 0; 00048 virtual void RunOneEvent (void) = 0; 00049 virtual Time Now (void) const = 0; 00050 virtual Time GetDelayLeft (const EventId &id) const = 0; 00051 virtual Time GetMaximumSimulationTime (void) const = 0; 00052 virtual void SetScheduler (Ptr<Scheduler> scheduler) = 0; 00053 virtual Ptr<Scheduler> GetScheduler (void) const = 0; 00054 }; 00055 00056 } // namespace ns3 00057 00058 #endif /* SIMULATOR_IMPL_H */