From 35eab87f761cad715cce68c5f0b23c9a6c47a1b2 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Sat, 28 Oct 2006 21:21:51 +0200 Subject: [PATCH] start of work to re-implement Schedule* methods --- src/simulator/simulator.cc | 24 ++++++++++++++++++++++++ src/simulator/simulator.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/src/simulator/simulator.cc b/src/simulator/simulator.cc index dbe438759..066fd9003 100644 --- a/src/simulator/simulator.cc +++ b/src/simulator/simulator.cc @@ -59,6 +59,8 @@ public: void Stop (void); void StopAt (Time const &time); EventId Schedule (Time const &time, EventImpl *event); + void ScheduleNow (EventImpl *event); + void ScheduleDestroy (EventImpl *event); void Remove (EventId ev); void Cancel (EventId ev); bool IsExpired (EventId ev); @@ -192,6 +194,17 @@ SimulatorPrivate::Schedule (Time const &time, EventImpl *event) m_uid++; return m_events->Insert (event, key); } +void +SimulatorPrivate::ScheduleNow (EventImpl *event) +{ + //XXX +} +void +SimulatorPrivate::ScheduleDestroy (EventImpl *event) +{ + //XXX +} + Time SimulatorPrivate::Now (void) const { @@ -348,6 +361,17 @@ Simulator::Schedule (Time const &time, EventImpl *ev) { return GetPriv ()->Schedule (time, ev); } +void +Simulator::ScheduleNow (EventImpl *ev) +{ + GetPriv ()->ScheduleNow (ev); +} +void +Simulator::ScheduleDestroy (EventImpl *ev) +{ + GetPriv ()->ScheduleDestroy (ev); +} + EventId Simulator::Schedule (Time const &time, void (*f) (void)) { diff --git a/src/simulator/simulator.h b/src/simulator/simulator.h index 2127feff0..a6e6e38cb 100644 --- a/src/simulator/simulator.h +++ b/src/simulator/simulator.h @@ -347,6 +347,8 @@ private: static SimulatorPrivate *GetPriv (void); static EventId Schedule (Time const &time, EventImpl *event); + static void ScheduleDestroy (EventImpl *event); + static void ScheduleNow (EventImpl *event); static SimulatorPrivate *m_priv; static SchedulerFactory const*m_schedFactory; static enum ListType {