src/simulator/event-id.cc
changeset 1008 6f2ea723a1db
parent 1005 43b0d2c88ab9
child 1009 adc3ac9baea8
--- a/src/simulator/event-id.cc	Fri Jul 27 15:37:05 2007 +0200
+++ b/src/simulator/event-id.cc	Fri Jul 27 15:37:22 2007 +0200
@@ -30,7 +30,7 @@
     m_uid (0)
 {}
   
-EventId::EventId (EventImpl *impl, uint64_t ts, uint32_t uid)
+EventId::EventId (Ptr<EventImpl> impl, uint64_t ts, uint32_t uid)
   : m_eventImpl (impl),
     m_ts (ts),
     m_uid (uid)
@@ -38,11 +38,7 @@
 void 
 EventId::Cancel (void)
 {
-  if (!IsExpired ())
-    {
-      m_eventImpl->Cancel ();
-      m_eventImpl = 0;
-    }
+  Simulator::Cancel (*this);
 }
 bool 
 EventId::IsExpired (void)
@@ -54,8 +50,8 @@
 {
   return !IsExpired ();
 }
-EventImpl *
-EventId::PeekEventImpl (void) const
+Ptr<EventImpl> 
+EventId::GetEventImpl (void) const
 {
   return m_eventImpl;
 }