ns3::EventImpl Class Reference
[Simulator]

a simulation event More...

#include <event-impl.h>

List of all members.

Public Member Functions

 EventImpl ()
void Ref (void) const
void Unref (void) const
virtual ~EventImpl ()=0
void Invoke (void)
void Cancel (void)
bool IsCancelled (void)

Protected Member Functions

virtual void Notify (void)=0

Private Attributes

bool m_cancel
uint32_t m_count

Detailed Description

a simulation event

Each subclass of this base class represents a simulation event. The EventImpl::Invoke method will be invoked by the simulation engine when the time associated to this event expires. This class is obviously (there are Ref and Unref methods) reference-counted and most subclasses are usually created by one of the many Simulator::Schedule methods.

Definition at line 38 of file event-impl.h.


Constructor & Destructor Documentation

ns3::EventImpl::EventImpl (  ) 

Definition at line 29 of file event-impl.cc.

ns3::EventImpl::~EventImpl (  )  [pure virtual]

Definition at line 26 of file event-impl.cc.


Member Function Documentation

void ns3::EventImpl::Cancel ( void   ) 

Marks the event as 'canceled'. The event will not be removed from the event list but the simulation engine will check its canceled status before calling Invoke.

Definition at line 44 of file event-impl.cc.

References m_cancel.

void ns3::EventImpl::Invoke ( void   ) 

Called by the simulation engine to notify the event that it has expired.

Definition at line 35 of file event-impl.cc.

References m_cancel, and Notify().

Referenced by ns3::DefaultSimulatorImpl::ProcessOneEvent(), and ns3::RealtimeSimulatorImpl::RunOneEvent().

bool ns3::EventImpl::IsCancelled ( void   ) 
Returns:
true if the event has been canceled.

Invoked by the simulation engine before calling Invoke.

Definition at line 50 of file event-impl.cc.

References m_cancel.

Referenced by ns3::RealtimeSimulatorImpl::IsExpired(), and ns3::DefaultSimulatorImpl::IsExpired().

virtual void ns3::EventImpl::Notify ( void   )  [protected, pure virtual]

Referenced by Invoke().

void ns3::EventImpl::Ref ( void   )  const [inline]

Definition at line 75 of file event-impl.h.

References m_count.

void ns3::EventImpl::Unref ( void   )  const [inline]

Member Data Documentation

bool ns3::EventImpl::m_cancel [private]

Definition at line 66 of file event-impl.h.

Referenced by Cancel(), Invoke(), and IsCancelled().

uint32_t ns3::EventImpl::m_count [mutable, private]

Definition at line 67 of file event-impl.h.

Referenced by Ref(), and Unref().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:12:13 2009 for NS-3 by  doxygen 1.6.3