SPIDAR API Library  0x16033101
Space Interface Device for Artificial Reality
Thread.hpp
Go to the documentation of this file.
1 
5 #ifndef SPIDAR_WIN32_THREAD_HPP
6 #define SPIDAR_WIN32_THREAD_HPP
7 
8 namespace Spidar
9 {
10 namespace Win32
11 {
16 class Thread
17 {
18 public:
19  typedef void(* FuncType)(void*);
20  typedef void* ParamType;
21 
22  Thread(FuncType func, ParamType param=nullptr);
23  ~Thread(void);
24 
25  void join(void);
26 
27 private:
28  Thread(void);
29  Thread(const Thread& other);
30  Thread& operator=(const Thread& other);
31 
32  static unsigned __stdcall threadFunc(void* param);
33 
34  void* handle_;
35  unsigned timeOut_;
36  FuncType workerFunc_;
37  ParamType workerParam_;
38 
39 }; // end of class Thread.
40 
41 } // end of namespace Win32.
42 } // end of namespace Spidar.
43 
44 #endif // SPIDAR_WIN32_THREAD_HPP
45 
46 // end of file.
void join(void)
スレッドの終了を待ちます.
Definition: Thread.cpp:41
Win32APIを用いたスレッドクラスです.
Definition: Thread.hpp:16
SPIDARライブラリのルート名前空間です.
void(* FuncType)(void *)
ワーカー関数のポインタの型
Definition: Thread.hpp:19
void * ParamType
ワーカー関数のパラメータのポインタの型
Definition: Thread.hpp:20
~Thread(void)
デストラクタです.
Definition: Thread.cpp:32