IBR-DTN  1.0.0
dtn::core::EventSwitch Class Reference

#include <EventSwitch.h>

Inheritance diagram for dtn::core::EventSwitch:
Inheritance graph
Collaboration diagram for dtn::core::EventSwitch:
Collaboration graph

Public Member Functions

void loop (size_t threads, bool profiling=false)
 
bool empty () const
 
void shutdown ()
 
- Public Member Functions inherited from dtn::daemon::IntegratedComponent
 IntegratedComponent ()
 
virtual ~IntegratedComponent ()
 
virtual void initialize () throw ()
 
virtual void startup () throw ()
 
virtual void terminate () throw ()
 
- Public Member Functions inherited from dtn::daemon::Component
virtual ~Component ()=0
 

Static Public Member Functions

static EventSwitchgetInstance ()
 
static void queue (EventProcessor &proc, Event *evt)
 

Protected Member Functions

virtual void componentUp () throw ()
 
virtual void componentDown () throw ()
 
bool isStalled ()
 

Friends

class Worker
 

Detailed Description

Definition at line 40 of file EventSwitch.h.

Member Function Documentation

void dtn::core::EventSwitch::componentDown ( )
throw (
)
protectedvirtual

Implements dtn::daemon::IntegratedComponent.

Definition at line 65 of file EventSwitch.cpp.

References _shutdown.

void dtn::core::EventSwitch::componentUp ( )
throw (
)
protectedvirtual

Implements dtn::daemon::IntegratedComponent.

Definition at line 48 of file EventSwitch.cpp.

References _running, and _shutdown.

bool dtn::core::EventSwitch::empty ( ) const

checks if all the queues are empty

Definition at line 83 of file EventSwitch.cpp.

EventSwitch & dtn::core::EventSwitch::getInstance ( )
static
bool dtn::core::EventSwitch::isStalled ( )
protected

Definition at line 161 of file EventSwitch.cpp.

void dtn::core::EventSwitch::loop ( size_t  threads,
bool  profiling = false 
)

Definition at line 168 of file EventSwitch.cpp.

References _running.

Referenced by dtn::daemon::NativeEventLoop::run().

void dtn::core::EventSwitch::queue ( EventProcessor proc,
Event evt 
)
static

Queue an event to one of the event queues of the event switch.

Definition at line 206 of file EventSwitch.cpp.

References dtn::core::Event::prio.

void dtn::core::EventSwitch::shutdown ( )

Bring down the EventSwitch. Do not accept any further events, but deliver all events in the queue.

Definition at line 236 of file EventSwitch.cpp.

References _shutdown.

Referenced by dtn::daemon::NativeEventLoop::__cancellation().

Friends And Related Function Documentation

friend class Worker
friend

Definition at line 145 of file EventSwitch.h.


The documentation for this class was generated from the following files: