00001 #ifndef __INSTANTIO_THREADEDNODE_H
00002 #define __INSTANTIO_THREADEDNODE_H
00003
00004 #ifdef _MSC_VER
00005 # pragma once
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "InstantIODef.h"
00027 #include "OutSlot.h"
00028 #include "Time.h"
00029 #include "Node.h"
00030
00031 namespace Medusa
00032 {
00033 class Thread;
00034 }
00035 namespace Hermes
00036 {
00037 class Wait;
00038 }
00039
00040
00041 namespace InstantIO
00042 {
00043
00044
00050 class INSTANTIO_DLLMAPPING ThreadedNode : public Node
00051 {
00052 public:
00053
00055
00058 ThreadedNode();
00059
00061
00064 virtual ~ThreadedNode();
00065
00066 protected:
00067
00069 virtual void start();
00070
00072 virtual void stop();
00073
00075
00078 bool waitThread (int timeout = -1);
00079
00081
00085 virtual int processData() = 0;
00086
00087 private:
00088
00090 ThreadedNode(const ThreadedNode &);
00091
00093 const ThreadedNode &operator=(const ThreadedNode &);
00094
00096 Medusa::Thread *thread_;
00097
00099 Hermes::Wait *wait_;
00100
00101 };
00102
00103
00104 }
00105
00106
00107 #endif // __INSTANTIO_CLOCKNODE_H