00001 /* 00002 * NodeEvent.h 00003 * 00004 * Created on: 05.03.2009 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef NODEEVENT_H_ 00009 #define NODEEVENT_H_ 00010 00011 #include <string> 00012 #include "core/Node.h" 00013 #include "core/Event.h" 00014 00015 using namespace dtn::core; 00016 using namespace std; 00017 00018 namespace dtn 00019 { 00020 namespace core 00021 { 00022 enum EventNodeAction 00023 { 00024 NODE_UNAVAILABLE = 0, 00025 NODE_AVAILABLE = 1, 00026 NODE_INFO_UPDATED = 2 00027 }; 00028 00029 class NodeEvent : public Event 00030 { 00031 public: 00032 NodeEvent(const Node &n, const EventNodeAction action); 00033 ~NodeEvent(); 00034 00035 EventNodeAction getAction() const; 00036 const Node& getNode() const; 00037 const string getName() const; 00038 const EventType getType() const; 00039 00040 #ifdef DO_DEBUG_OUTPUT 00041 string toString(); 00042 #endif 00043 00044 static const string className; 00045 00046 private: 00047 const Node m_node; 00048 const EventNodeAction m_action; 00049 }; 00050 } 00051 } 00052 00053 #endif /* NODEEVENT_H_ */
1.5.6