IBR-DTNSuite  0.8
daemon/src/core/NodeEvent.cpp
Go to the documentation of this file.
00001 /*
00002  * NodeEvent.cpp
00003  *
00004  *  Created on: 05.03.2009
00005  *      Author: morgenro
00006  */
00007 
00008 #include "core/NodeEvent.h"
00009 
00010 using namespace dtn::core;
00011 using namespace std;
00012 
00013 namespace dtn
00014 {
00015         namespace core
00016         {
00017                 NodeEvent::NodeEvent(const Node &n, const EventNodeAction action)
00018                 : m_node(n), m_action(action)
00019                 {}
00020 
00021                 void NodeEvent::raise(const Node &n, const EventNodeAction action)
00022                 {
00023                         raiseEvent( new NodeEvent(n, action) );
00024                 }
00025 
00026                 NodeEvent::~NodeEvent()
00027                 {}
00028 
00029                 const Node& NodeEvent::getNode() const
00030                 {
00031                         return m_node;
00032                 }
00033 
00034                 EventNodeAction NodeEvent::getAction() const
00035                 {
00036                         return m_action;
00037                 }
00038 
00039                 const string NodeEvent::getName() const
00040                 {
00041                         return NodeEvent::className;
00042                 }
00043 
00044                 string NodeEvent::toString() const
00045                 {
00046                         return className;
00047                 }
00048 
00049                 const string NodeEvent::className = "NodeEvent";
00050         }
00051 }