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