A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simulator-impl.h
Go to the documentation of this file.
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 "object.h"
28 #include "object-factory.h"
29 #include "ptr.h"
30 
31 namespace ns3 {
32 
33 class Scheduler;
34 
35 class SimulatorImpl : public Object
36 {
37 public:
38  static TypeId GetTypeId (void);
39 
50  virtual void Destroy () = 0;
56  virtual bool IsFinished (void) const = 0;
62  virtual void Stop (void) = 0;
70  virtual void Stop (Time const &time) = 0;
79  virtual EventId Schedule (Time const &time, EventImpl *event) = 0;
89  virtual void ScheduleWithContext (uint32_t context, Time const &time, EventImpl *event) = 0;
97  virtual EventId ScheduleNow (EventImpl *event) = 0;
105  virtual EventId ScheduleDestroy (EventImpl *event) = 0;
117  virtual void Remove (const EventId &ev) = 0;
130  virtual void Cancel (const EventId &ev) = 0;
143  virtual bool IsExpired (const EventId &ev) const = 0;
152  virtual void Run (void) = 0;
156  virtual Time Now (void) const = 0;
163  virtual Time GetDelayLeft (const EventId &id) const = 0;
170  virtual Time GetMaximumSimulationTime (void) const = 0;
178  virtual void SetScheduler (ObjectFactory schedulerFactory) = 0;
183  virtual uint32_t GetSystemId () const = 0;
187  virtual uint32_t GetContext (void) const = 0;
188 };
189 
190 } // namespace ns3
191 
192 #endif /* SIMULATOR_IMPL_H */