IBR-DTNSuite  0.8
daemon/src/core/TimeEvent.h
Go to the documentation of this file.
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                         size_t getUnixTimestamp() const;
00030                         const std::string getName() const;
00031 
00032                         static void raise(const size_t timestamp, const size_t unixtimestamp, const TimeEventAction action);
00033 
00034                         std::string toString() const;
00035 
00036                         static const std::string className;
00037 
00038                 private:
00039                         TimeEvent(const size_t timestamp, const size_t unixtimestamp, const TimeEventAction action);
00040 
00041                         const size_t m_timestamp;
00042                         const size_t m_unixtimestamp;
00043                         const TimeEventAction m_action;
00044                 };
00045         }
00046 }
00047 
00048 #endif /* TIMEEVENT_H_ */