00001 /* 00002 * BundleExpiredEvent.cpp 00003 * 00004 * Created on: 15.02.2010 00005 * Author: morgenro 00006 */ 00007 00008 #include "core/BundleExpiredEvent.h" 00009 #include "core/BundleCore.h" 00010 00011 namespace dtn 00012 { 00013 namespace core 00014 { 00015 BundleExpiredEvent::BundleExpiredEvent(const dtn::data::BundleID &bundle) 00016 : _bundle(bundle) 00017 { 00018 00019 } 00020 00021 BundleExpiredEvent::BundleExpiredEvent(const dtn::data::Bundle &bundle) 00022 : _bundle(bundle) 00023 { 00024 00025 } 00026 00027 BundleExpiredEvent::~BundleExpiredEvent() 00028 { 00029 00030 } 00031 00032 void BundleExpiredEvent::raise(const dtn::data::Bundle &bundle) 00033 { 00034 // raise the new event 00035 raiseEvent( new BundleExpiredEvent(bundle) ); 00036 } 00037 00038 void BundleExpiredEvent::raise(const dtn::data::BundleID &bundle) 00039 { 00040 // raise the new event 00041 raiseEvent( new BundleExpiredEvent(bundle) ); 00042 } 00043 00044 const string BundleExpiredEvent::getName() const 00045 { 00046 return BundleExpiredEvent::className; 00047 } 00048 00049 string BundleExpiredEvent::toString() const 00050 { 00051 return className + ": Bundle has been expired " + _bundle.toString(); 00052 } 00053 00054 const string BundleExpiredEvent::className = "BundleExpiredEvent"; 00055 } 00056 }