|
IBR-DTNSuite 0.6
|
00001 /* 00002 * TimeEvent.h 00003 * 00004 * Created on: 16.03.2009 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef TIMEEVENT_H_ 00009 #define TIMEEVENT_H_ 00010 00011 #include "core/Event.h" 00012 00013 namespace dtn 00014 { 00015 namespace core 00016 { 00017 enum TimeEventAction 00018 { 00019 TIME_SECOND_TICK = 0 00020 }; 00021 00022 class TimeEvent : public Event 00023 { 00024 public: 00025 virtual ~TimeEvent(); 00026 00027 TimeEventAction getAction() const; 00028 size_t getTimestamp() const; 00029 const std::string getName() const; 00030 00031 static void raise(const size_t timestamp, const TimeEventAction action); 00032 00033 std::string toString() const; 00034 00035 static const std::string className; 00036 00037 private: 00038 TimeEvent(const size_t timestamp, const TimeEventAction action); 00039 00040 const size_t m_timestamp; 00041 const TimeEventAction m_action; 00042 }; 00043 } 00044 } 00045 00046 #endif /* TIMEEVENT_H_ */