IBR-DTNSuite  0.8
daemon/src/routing/QueueBundleEvent.cpp
Go to the documentation of this file.
00001 /*
00002  * QueueBundle.cpp
00003  *
00004  *  Created on: 15.02.2010
00005  *      Author: morgenro
00006  */
00007 
00008 #include "routing/QueueBundleEvent.h"
00009 #include "core/BundleCore.h"
00010 
00011 namespace dtn
00012 {
00013         namespace routing
00014         {
00015                 QueueBundleEvent::QueueBundleEvent(const dtn::data::MetaBundle &b, const dtn::data::EID &o)
00016                  : bundle(b), origin(o)
00017                 {
00018 
00019                 }
00020 
00021                 QueueBundleEvent::~QueueBundleEvent()
00022                 {
00023 
00024                 }
00025 
00026                 void QueueBundleEvent::raise(const dtn::data::MetaBundle &bundle, const dtn::data::EID &origin)
00027                 {
00028                         // raise the new event
00029                         raiseEvent( new QueueBundleEvent(bundle, origin) );
00030                 }
00031 
00032                 const string QueueBundleEvent::getName() const
00033                 {
00034                         return QueueBundleEvent::className;
00035                 }
00036 
00037                 string QueueBundleEvent::toString() const
00038                 {
00039                         return className + ": New bundle queued " + bundle.toString();
00040                 }
00041 
00042                 const string QueueBundleEvent::className = "QueueBundleEvent";
00043         }
00044 }