IBR-DTNSuite  0.10
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=0)
 
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 ()
 

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 64 of file EventSwitch.cpp.

References ibrcommon::Conditional::abort(), empty(), and ibrcommon::Conditional::wait().

Here is the call graph for this function:

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

Implements dtn::daemon::IntegratedComponent.

Definition at line 47 of file EventSwitch.cpp.

References ibrcommon::Conditional::reset().

Here is the call graph for this function:

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

checks if all the queues are empty

Definition at line 82 of file EventSwitch.cpp.

Referenced by componentDown().

EventSwitch & dtn::core::EventSwitch::getInstance ( )
static
void dtn::core::EventSwitch::loop ( size_t  threads = 0)

Definition at line 141 of file EventSwitch.cpp.

References Worker.

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

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

Definition at line 169 of file EventSwitch.cpp.

References getInstance(), dtn::core::Event::prio, and ibrcommon::Conditional::signal().

Here is the call graph for this function:

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 199 of file EventSwitch.cpp.

References ibrcommon::Conditional::signal().

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

Here is the call graph for this function:

Friends And Related Function Documentation

friend class Worker
friend

Definition at line 108 of file EventSwitch.h.

Referenced by loop().


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