DCL 4.0
Loading...
Searching...
No Matches
SerialPollThread.h
Go to the documentation of this file.
1#ifndef __DCL_SERIAL_POLL_THREAD_H__
2#define __DCL_SERIAL_POLL_THREAD_H__ 20110224
3
4#ifndef __DCL_POLL_THREAD_H__
5#include <dcl/PollThread.h>
6#endif
7
8__DCL_BEGIN_NAMESPACE
9
10#if __DCL_WINDOWS
11class SerialPort;
12
25class DCLCAPI SerialPollThread : protected PollThread
26{
28public:
29 SerialPollThread(const char_t* _name = NULL);
30 virtual ~SerialPollThread();
31
32 void start() __DCL_THROWS1(SysError*)
33 { Thread::start(); }
34 int join()
35 { return Thread::join(); }
36 bool started() const
37 { return Thread::started(); }
38 unsigned long id() const
39 { return Thread::id(); }
40 const String& name() const
41 { return Thread::name(); }
42
55 virtual bool add(PollAble* _pPollAble, short _events)
56 __DCL_THROWS1(IOException*);
57
63 virtual bool remove(PollAble* _pPollAble);
64
69 void terminate();
70
71protected:
72 virtual int run();
73
74 HANDLE __pollInterrupt;
75};
76#else
78#endif // __DCL_WINDOWS
79
80__DCL_END_NAMESPACE
81
82#endif // __DCL_SERIAL_POLL_THREAD_H__
#define NULL
Definition Config.h:340
#define DCLCAPI
Definition Config.h:100
wchar_t char_t
Definition Config.h:275
#define __DCL_THROWS1(e)
Definition Config.h:167
#define DECLARE_CLASSINFO(class_name)
Definition Object.h:210
__DCL_BEGIN_NAMESPACE typedef PollThread SerialPollThread
virtual int run()