From e33fc49877cb44946c15b9bb677c03260f23d8fb Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Wed, 15 Oct 2008 13:35:49 +0200 Subject: [PATCH] avoid using Ptr --- src/simulator/default-simulator-impl.cc | 12 +- src/simulator/default-simulator-impl.h | 6 +- src/simulator/realtime-simulator-impl.cc | 12 +- src/simulator/realtime-simulator-impl.h | 38 +++--- src/simulator/realtime-simulator.h | 25 ---- src/simulator/simulator-impl.h | 6 +- src/simulator/simulator.cc | 34 ++++-- src/simulator/simulator.h | 142 ++++++++++++----------- 8 files changed, 134 insertions(+), 141 deletions(-) diff --git a/src/simulator/default-simulator-impl.cc b/src/simulator/default-simulator-impl.cc index 4516fbb4a..fa5263647 100644 --- a/src/simulator/default-simulator-impl.cc +++ b/src/simulator/default-simulator-impl.cc @@ -185,14 +185,14 @@ DefaultSimulatorImpl::Stop (Time const &time) // Schedule an event for a _relative_ time in the future. // EventId -DefaultSimulatorImpl::Schedule (Time const &time, const Ptr &event) +DefaultSimulatorImpl::Schedule (Time const &time, EventImpl *event) { Time tAbsolute = time + Now(); NS_ASSERT (tAbsolute.IsPositive ()); NS_ASSERT (tAbsolute >= TimeStep (m_currentTs)); Scheduler::Event ev; - ev.impl = GetPointer (event); + ev.impl = event; ev.key.m_ts = (uint64_t) tAbsolute.GetTimeStep (); ev.key.m_uid = m_uid; m_uid++; @@ -202,10 +202,10 @@ DefaultSimulatorImpl::Schedule (Time const &time, const Ptr &event) } EventId -DefaultSimulatorImpl::ScheduleNow (const Ptr &event) +DefaultSimulatorImpl::ScheduleNow (EventImpl *event) { Scheduler::Event ev; - ev.impl = GetPointer (event); + ev.impl = event; ev.key.m_ts = m_currentTs; ev.key.m_uid = m_uid; m_uid++; @@ -215,9 +215,9 @@ DefaultSimulatorImpl::ScheduleNow (const Ptr &event) } EventId -DefaultSimulatorImpl::ScheduleDestroy (const Ptr &event) +DefaultSimulatorImpl::ScheduleDestroy (EventImpl *event) { - EventId id (event, m_currentTs, 2); + EventId id (Ptr (event, false), m_currentTs, 2); m_destroyEvents.push_back (id); m_uid++; return id; diff --git a/src/simulator/default-simulator-impl.h b/src/simulator/default-simulator-impl.h index 3dc92e4b5..790cf6a50 100644 --- a/src/simulator/default-simulator-impl.h +++ b/src/simulator/default-simulator-impl.h @@ -48,9 +48,9 @@ public: virtual Time Next (void) const; virtual void Stop (void); virtual void Stop (Time const &time); - virtual EventId Schedule (Time const &time, const Ptr &event); - virtual EventId ScheduleNow (const Ptr &event); - virtual EventId ScheduleDestroy (const Ptr &event); + virtual EventId Schedule (Time const &time, EventImpl *event); + virtual EventId ScheduleNow (EventImpl *event); + virtual EventId ScheduleDestroy (EventImpl *event); virtual void Remove (const EventId &ev); virtual void Cancel (const EventId &ev); virtual bool IsExpired (const EventId &ev) const; diff --git a/src/simulator/realtime-simulator-impl.cc b/src/simulator/realtime-simulator-impl.cc index dc311416d..18cdfee45 100644 --- a/src/simulator/realtime-simulator-impl.cc +++ b/src/simulator/realtime-simulator-impl.cc @@ -589,7 +589,7 @@ RealtimeSimulatorImpl::Stop (Time const &time) // Schedule an event for a _relative_ time in the future. // EventId -RealtimeSimulatorImpl::Schedule (Time const &time, const Ptr &impl) +RealtimeSimulatorImpl::Schedule (Time const &time, EventImpl *impl) { NS_LOG_FUNCTION (time << impl); @@ -605,7 +605,7 @@ RealtimeSimulatorImpl::Schedule (Time const &time, const Ptr &impl) Time tAbsolute = Simulator::Now () + time; NS_ASSERT_MSG (tAbsolute.IsPositive (), "RealtimeSimulatorImpl::Schedule(): Negative time"); NS_ASSERT_MSG (tAbsolute >= TimeStep (m_currentTs), "RealtimeSimulatorImpl::Schedule(): time < m_currentTs"); - ev.impl = GetPointer (impl); + ev.impl = impl; ev.key.m_ts = (uint64_t) tAbsolute.GetTimeStep (); ev.key.m_uid = m_uid; m_uid++; @@ -618,14 +618,14 @@ RealtimeSimulatorImpl::Schedule (Time const &time, const Ptr &impl) } EventId -RealtimeSimulatorImpl::ScheduleNow (const Ptr &impl) +RealtimeSimulatorImpl::ScheduleNow (EventImpl *impl) { NS_LOG_FUNCTION_NOARGS (); Scheduler::Event ev; { CriticalSection cs (m_mutex); - ev.impl = GetPointer (impl); + ev.impl = impl; ev.key.m_ts = m_currentTs; ev.key.m_uid = m_uid; m_uid++; @@ -702,7 +702,7 @@ RealtimeSimulatorImpl::RealtimeNow (void) const } EventId -RealtimeSimulatorImpl::ScheduleDestroy (const Ptr &impl) +RealtimeSimulatorImpl::ScheduleDestroy (EventImpl *impl) { NS_LOG_FUNCTION_NOARGS (); @@ -715,7 +715,7 @@ RealtimeSimulatorImpl::ScheduleDestroy (const Ptr &impl) // overridden by the uid of 2 which identifies this as an event to be // executed at Simulator::Destroy time. // - id = EventId (impl, m_currentTs, 2); + id = EventId (Ptr (impl, false), m_currentTs, 2); m_destroyEvents.push_back (id); m_uid++; } diff --git a/src/simulator/realtime-simulator-impl.h b/src/simulator/realtime-simulator-impl.h index 55a19417a..3b610188c 100644 --- a/src/simulator/realtime-simulator-impl.h +++ b/src/simulator/realtime-simulator-impl.h @@ -61,29 +61,27 @@ public: RealtimeSimulatorImpl (); ~RealtimeSimulatorImpl (); - void Destroy (); - - bool IsFinished (void) const; - Time Next (void) const; - void Stop (void); - void Stop (Time const &time); - EventId Schedule (Time const &time, const Ptr &event); - EventId ScheduleNow (const Ptr &event); + virtual void Destroy (); + virtual bool IsFinished (void) const; + virtual Time Next (void) const; + virtual void Stop (void); + virtual void Stop (Time const &time); + virtual EventId Schedule (Time const &time, EventImpl *event); + virtual EventId ScheduleNow (EventImpl *event); + virtual EventId ScheduleDestroy (EventImpl *event); + virtual void Remove (const EventId &ev); + virtual void Cancel (const EventId &ev); + virtual bool IsExpired (const EventId &ev) const; + virtual void Run (void); + virtual void RunOneEvent (void); + virtual Time Now (void) const; + virtual Time GetDelayLeft (const EventId &id) const; + virtual Time GetMaximumSimulationTime (void) const; + virtual void SetScheduler (Ptr scheduler); + virtual Ptr GetScheduler (void) const; EventId ScheduleRealtime (Time const &time, const Ptr &event); EventId ScheduleRealtimeNow (const Ptr &event); - EventId ScheduleDestroy (const Ptr &event); - Time Now (void) const; Time RealtimeNow (void) const; - void Remove (const EventId &ev); - void Cancel (const EventId &ev); - bool IsExpired (const EventId &ev) const; - virtual void RunOneEvent (void); - void Run (void); - Time GetDelayLeft (const EventId &id) const; - Time GetMaximumSimulationTime (void) const; - - void SetScheduler (Ptr scheduler); - Ptr GetScheduler (void) const; void SetSynchronizationMode (RealtimeSimulatorImpl::SynchronizationMode mode); RealtimeSimulatorImpl::SynchronizationMode GetSynchronizationMode (void) const; diff --git a/src/simulator/realtime-simulator.h b/src/simulator/realtime-simulator.h index a6028a693..b30518d66 100644 --- a/src/simulator/realtime-simulator.h +++ b/src/simulator/realtime-simulator.h @@ -299,34 +299,9 @@ public: typename T1, typename T2, typename T3, typename T4, typename T5> static EventId ScheduleRealtimeNow (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); - /** - * Return the "current normalized real-time". - */ - static Time RealtimeNow (void); - - /** - * \param time delay until the event expires - * \param event the event to schedule - * \returns a unique identifier for the newly-scheduled event. - * - * This method will be typically used by language bindings - * to delegate events to their own subclass of the EventImpl base class. - */ - static EventId ScheduleRealtime (Time const &time, const Ptr &event); - - /** - * \param event the event to schedule - * \returns a unique identifier for the newly-scheduled event. - * - * This method will be typically used by language bindings - * to delegate events to their own subclass of the EventImpl base class. - */ - static EventId ScheduleRealtimeNow (const Ptr &event); private: RealtimeSimulator (); ~RealtimeSimulator (); - - static RealtimeSimulatorImpl *GetRealtimeImpl (void); }; template diff --git a/src/simulator/simulator-impl.h b/src/simulator/simulator-impl.h index 177133ea6..9e68ac971 100644 --- a/src/simulator/simulator-impl.h +++ b/src/simulator/simulator-impl.h @@ -43,9 +43,9 @@ public: virtual Time Next (void) const = 0; virtual void Stop (void) = 0; virtual void Stop (Time const &time) = 0; - virtual EventId Schedule (Time const &time, const Ptr &event) = 0; - virtual EventId ScheduleNow (const Ptr &event) = 0; - virtual EventId ScheduleDestroy (const Ptr &event) = 0; + virtual EventId Schedule (Time const &time, EventImpl *event) = 0; + virtual EventId ScheduleNow (EventImpl *event) = 0; + virtual EventId ScheduleDestroy (EventImpl *event) = 0; virtual void Remove (const EventId &ev) = 0; virtual void Cancel (const EventId &ev) = 0; virtual bool IsExpired (const EventId &ev) const = 0; diff --git a/src/simulator/simulator.cc b/src/simulator/simulator.cc index ddfe84cee..f04c10ea4 100644 --- a/src/simulator/simulator.cc +++ b/src/simulator/simulator.cc @@ -184,7 +184,7 @@ Simulator::GetDelayLeft (const EventId &id) return GetImpl ()->GetDelayLeft (id); } -Ptr +EventImpl * Simulator::MakeEvent (void (*f) (void)) { NS_LOG_FUNCTION (f); @@ -205,49 +205,65 @@ Simulator::MakeEvent (void (*f) (void)) private: F m_function; } *ev = new EventFunctionImpl0 (f); - return Ptr (ev, false); + return ev; } EventId Simulator::Schedule (Time const &time, const Ptr &ev) { NS_LOG_FUNCTION (time << ev); - return GetImpl ()->Schedule (time, ev); + return DoSchedule (time, GetPointer (ev)); } EventId Simulator::ScheduleNow (const Ptr &ev) { NS_LOG_FUNCTION (ev); - return GetImpl ()->ScheduleNow (ev); + return DoScheduleNow (GetPointer (ev)); } EventId Simulator::ScheduleDestroy (const Ptr &ev) { NS_LOG_FUNCTION (ev); - return GetImpl ()->ScheduleDestroy (ev); -} + return DoScheduleDestroy (GetPointer (ev)); +} +EventId +Simulator::DoSchedule (Time const &time, EventImpl *impl) +{ + return GetImpl ()->Schedule (time, impl); +} +EventId +Simulator::DoScheduleNow (EventImpl *impl) +{ + return GetImpl ()->ScheduleNow (impl); +} +EventId +Simulator::DoScheduleDestroy (EventImpl *impl) +{ + return GetImpl ()->ScheduleDestroy (impl); +} + EventId Simulator::Schedule (Time const &time, void (*f) (void)) { NS_LOG_FUNCTION (time << f); - return Schedule (time, MakeEvent (f)); + return DoSchedule (time, MakeEvent (f)); } EventId Simulator::ScheduleNow (void (*f) (void)) { NS_LOG_FUNCTION (f); - return ScheduleNow (MakeEvent (f)); + return DoScheduleNow (MakeEvent (f)); } EventId Simulator::ScheduleDestroy (void (*f) (void)) { NS_LOG_FUNCTION (f); - return ScheduleDestroy (MakeEvent (f)); + return DoScheduleDestroy (MakeEvent (f)); } void diff --git a/src/simulator/simulator.h b/src/simulator/simulator.h index a13c1ada4..adb7253a0 100644 --- a/src/simulator/simulator.h +++ b/src/simulator/simulator.h @@ -619,40 +619,44 @@ private: Simulator (); ~Simulator (); + static EventId DoSchedule (Time const &time, EventImpl *event); + static EventId DoScheduleNow (EventImpl *event); + static EventId DoScheduleDestroy (EventImpl *event); + template - static Ptr MakeEvent (MEM mem_ptr, OBJ obj); + static EventImpl *MakeEvent (MEM mem_ptr, OBJ obj); template - static Ptr MakeEvent (MEM mem_ptr, OBJ obj, T1 a1); + static EventImpl *MakeEvent (MEM mem_ptr, OBJ obj, T1 a1); template - static Ptr MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2); + static EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2); template - static Ptr MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3); + static EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3); template - static Ptr MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4); + static EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4); template - static Ptr MakeEvent (MEM mem_ptr, OBJ obj, + static EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); - static Ptr MakeEvent (void (*f) (void)); + static EventImpl * MakeEvent (void (*f) (void)); template - static Ptr MakeEvent (void (*f) (U1), T1 a1); + static EventImpl * MakeEvent (void (*f) (U1), T1 a1); template - static Ptr MakeEvent (void (*f) (U1,U2), T1 a1, T2 a2); + static EventImpl * MakeEvent (void (*f) (U1,U2), T1 a1, T2 a2); template - static Ptr MakeEvent (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3); + static EventImpl * MakeEvent (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3); template - static Ptr MakeEvent (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); + static EventImpl * MakeEvent (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); template - static Ptr MakeEvent (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); + static EventImpl * MakeEvent (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); static SimulatorImpl *GetImpl (void); static Ptr m_impl; @@ -673,7 +677,7 @@ private: */ Time Now (void); -}; // namespace ns3 +} // namespace ns3 /******************************************************************** @@ -694,7 +698,7 @@ struct EventMemberImplObjTraits }; template -Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj) +EventImpl * Simulator::MakeEvent (MEM mem_ptr, OBJ obj) { // zero argument version class EventMemberImpl0 : public EventImpl { @@ -711,13 +715,13 @@ Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj) OBJ m_obj; MEM m_function; } * ev = new EventMemberImpl0 (obj, mem_ptr); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1) +EventImpl * Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1) { // one argument version class EventMemberImpl1 : public EventImpl { @@ -737,12 +741,12 @@ Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1) MEM m_function; typename TypeTraits::ReferencedType m_a1; } *ev = new EventMemberImpl1 (obj, mem_ptr, a1); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) +EventImpl * Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) { // two argument version class EventMemberImpl2 : public EventImpl { @@ -764,12 +768,12 @@ Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) typename TypeTraits::ReferencedType m_a1; typename TypeTraits::ReferencedType m_a2; } *ev = new EventMemberImpl2 (obj, mem_ptr, a1, a2); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) +EventImpl * Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) { // three argument version class EventMemberImpl3 : public EventImpl { @@ -793,12 +797,12 @@ Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) typename TypeTraits::ReferencedType m_a2; typename TypeTraits::ReferencedType m_a3; } *ev = new EventMemberImpl3 (obj, mem_ptr, a1, a2, a3); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) +EventImpl * Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) { // four argument version class EventMemberImpl4 : public EventImpl { @@ -824,12 +828,12 @@ Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, typename TypeTraits::ReferencedType m_a3; typename TypeTraits::ReferencedType m_a4; } *ev = new EventMemberImpl4 (obj, mem_ptr, a1, a2, a3, a4); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, +EventImpl * Simulator::MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { // five argument version @@ -858,11 +862,11 @@ Ptr Simulator::MakeEvent (MEM mem_ptr, OBJ obj, typename TypeTraits::ReferencedType m_a4; typename TypeTraits::ReferencedType m_a5; } *ev = new EventMemberImpl5 (obj, mem_ptr, a1, a2, a3, a4, a5); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (void (*f) (U1), T1 a1) +EventImpl * Simulator::MakeEvent (void (*f) (U1), T1 a1) { // one arg version class EventFunctionImpl1 : public EventImpl { @@ -882,11 +886,11 @@ Ptr Simulator::MakeEvent (void (*f) (U1), T1 a1) F m_function; typename TypeTraits::ReferencedType m_a1; } *ev = new EventFunctionImpl1 (f, a1); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (void (*f) (U1,U2), T1 a1, T2 a2) +EventImpl * Simulator::MakeEvent (void (*f) (U1,U2), T1 a1, T2 a2) { // two arg version class EventFunctionImpl2 : public EventImpl { @@ -908,12 +912,12 @@ Ptr Simulator::MakeEvent (void (*f) (U1,U2), T1 a1, T2 a2) typename TypeTraits::ReferencedType m_a1; typename TypeTraits::ReferencedType m_a2; } *ev = new EventFunctionImpl2 (f, a1, a2); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) +EventImpl * Simulator::MakeEvent (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) { // three arg version class EventFunctionImpl3 : public EventImpl { @@ -937,12 +941,12 @@ Ptr Simulator::MakeEvent (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) typename TypeTraits::ReferencedType m_a2; typename TypeTraits::ReferencedType m_a3; } *ev = new EventFunctionImpl3 (f, a1, a2, a3); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) +EventImpl * Simulator::MakeEvent (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) { // four arg version class EventFunctionImpl4 : public EventImpl { @@ -968,12 +972,12 @@ Ptr Simulator::MakeEvent (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a typename TypeTraits::ReferencedType m_a3; typename TypeTraits::ReferencedType m_a4; } *ev = new EventFunctionImpl4 (f, a1, a2, a3, a4); - return Ptr (ev, false); + return ev; } template -Ptr Simulator::MakeEvent (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) +EventImpl * Simulator::MakeEvent (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { // five arg version class EventFunctionImpl5 : public EventImpl { @@ -1001,13 +1005,13 @@ Ptr Simulator::MakeEvent (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T typename TypeTraits::ReferencedType m_a4; typename TypeTraits::ReferencedType m_a5; } *ev = new EventFunctionImpl5 (f, a1, a2, a3, a4, a5); - return Ptr (ev, false); + return ev; } template EventId Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj) { - return Schedule (time, MakeEvent (mem_ptr, obj)); + return DoSchedule (time, MakeEvent (mem_ptr, obj)); } @@ -1015,28 +1019,28 @@ template EventId Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1) { - return Schedule (time, MakeEvent (mem_ptr, obj, a1)); + return DoSchedule (time, MakeEvent (mem_ptr, obj, a1)); } template EventId Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2) { - return Schedule (time, MakeEvent (mem_ptr, obj, a1, a2)); + return DoSchedule (time, MakeEvent (mem_ptr, obj, a1, a2)); } template EventId Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) { - return Schedule (time, MakeEvent (mem_ptr, obj, a1, a2, a3)); + return DoSchedule (time, MakeEvent (mem_ptr, obj, a1, a2, a3)); } template EventId Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) { - return Schedule (time, MakeEvent (mem_ptr, obj, a1, a2, a3, a4)); + return DoSchedule (time, MakeEvent (mem_ptr, obj, a1, a2, a3, a4)); } template EventId Simulator::Schedule (Time const &time, void (*f) (U1), T1 a1) { - return Schedule (time, MakeEvent (f, a1)); + return DoSchedule (time, MakeEvent (f, a1)); } template EventId Simulator::Schedule (Time const &time, void (*f) (U1,U2), T1 a1, T2 a2) { - return Schedule (time, MakeEvent (f, a1, a2)); + return DoSchedule (time, MakeEvent (f, a1, a2)); } template EventId Simulator::Schedule (Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) { - return Schedule (time, MakeEvent (f, a1, a2, a3)); + return DoSchedule (time, MakeEvent (f, a1, a2, a3)); } template EventId Simulator::Schedule (Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) { - return Schedule (time, MakeEvent (f, a1, a2, a3, a4)); + return DoSchedule (time, MakeEvent (f, a1, a2, a3, a4)); } template EventId Simulator::Schedule (Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { - return Schedule (time, MakeEvent (f, a1, a2, a3, a4, a5)); + return DoSchedule (time, MakeEvent (f, a1, a2, a3, a4, a5)); } @@ -1088,7 +1092,7 @@ template EventId Simulator::ScheduleNow (MEM mem_ptr, OBJ obj) { - return ScheduleNow (MakeEvent (mem_ptr, obj)); + return DoScheduleNow (MakeEvent (mem_ptr, obj)); } @@ -1097,7 +1101,7 @@ template EventId Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj) { - return ScheduleDestroy (MakeEvent (mem_ptr, obj)); + return DoScheduleDestroy (MakeEvent (mem_ptr, obj)); } @@ -1188,7 +1192,7 @@ template