IBR-DTNSuite  0.8
daemon/src/core/TimeEvent.cpp
Go to the documentation of this file.
00001 /*
00002  * TimeEvent.cpp
00003  *
00004  *  Created on: 16.03.2009
00005  *      Author: morgenro
00006  */
00007 
00008 #include "core/TimeEvent.h"
00009 
00010 namespace dtn
00011 {
00012         namespace core
00013         {
00014                 TimeEvent::TimeEvent(const size_t timestamp, const size_t unixtimestamp, const TimeEventAction action)
00015                 : m_timestamp(timestamp), m_unixtimestamp(unixtimestamp), m_action(action)
00016                 {
00017 
00018                 }
00019 
00020                 TimeEvent::~TimeEvent()
00021                 {
00022 
00023                 }
00024 
00025                 TimeEventAction TimeEvent::getAction() const
00026                 {
00027                         return m_action;
00028                 }
00029 
00030                 size_t TimeEvent::getTimestamp() const
00031                 {
00032                         return m_timestamp;
00033                 }
00034 
00035                 size_t TimeEvent::getUnixTimestamp() const
00036                 {
00037                         return m_unixtimestamp;
00038                 }
00039 
00040                 const std::string TimeEvent::getName() const
00041                 {
00042                         return TimeEvent::className;
00043                 }
00044 
00045                 void TimeEvent::raise(const size_t timestamp, const size_t unixtimestamp, const TimeEventAction action)
00046                 {
00047                         // raise the new event
00048                         raiseEvent( new TimeEvent(timestamp, unixtimestamp, action) );
00049                 }
00050 
00051                 std::string TimeEvent::toString() const
00052                 {
00053                         return TimeEvent::className;
00054                 }
00055 
00056                 const std::string TimeEvent::className = "TimeEvent";
00057         }
00058 }