00001 #ifndef __TIMERNODE_H 00002 #define __TIMERNODE_H 00003 00004 #include <iostream> 00005 #include "pthread.h" 00006 #include "BasicObject.h" 00007 #include "TimeValue.h" 00008 00012 class TimerNode : public BasicObject 00013 { 00014 public: 00015 TimerNode(void* (*func)(void*), void* data, TimeValue wakeup, bool* set); 00016 virtual ~TimerNode() {} 00017 bool past(); 00018 void* getArg(); 00019 bool isValid(); 00020 void* (*getFunc())(void*); 00021 TimeValue getWakeup(); 00022 00023 friend bool operator <(const TimerNode& node1, const TimerNode& node2); 00024 virtual void toStream(std::ostream&); 00025 00026 private: 00027 void* (*m_func)(void *); 00028 void* m_arg; 00029 TimeValue m_wakeup; 00030 bool* m_isValid; 00031 }; 00032 00033 bool operator <(const TimerNode& node1, const TimerNode& node2); 00034 00035 #endif // #define __TIMER_NODE_H