00001 /* 00002 * ScheduleEvent.h 00003 * 00004 * Created on: 06.03.2009 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef STORAGEEVENT_H_ 00009 #define STORAGEEVENT_H_ 00010 00011 #include "core/Event.h" 00012 #include "core/BundleSchedule.h" 00013 #include "data/Bundle.h" 00014 #include <string> 00015 00016 using namespace std; 00017 00018 namespace dtn 00019 { 00020 namespace core 00021 { 00022 enum EventStorageAction 00023 { 00024 STORE_BUNDLE = 0, 00025 STORE_SCHEDULE = 1 00026 }; 00027 00028 class StorageEvent : public Event 00029 { 00030 public: 00031 StorageEvent(const BundleSchedule &schedule); 00032 StorageEvent(const Bundle &bundle); 00033 00034 ~StorageEvent(); 00035 00036 EventStorageAction getAction() const; 00037 const BundleSchedule& getSchedule() const; 00038 const Bundle& getBundle() const; 00039 00040 const string getName() const; 00041 const EventType getType() const; 00042 00043 #ifdef DO_DEBUG_OUTPUT 00044 string toString(); 00045 #endif 00046 00047 static const string className; 00048 00049 private: 00050 Bundle *m_bundle; 00051 const BundleSchedule m_schedule; 00052 EventStorageAction m_action; 00053 }; 00054 } 00055 } 00056 00057 #endif /* STORAGEEVENT_H_ */
1.5.6