Develop and Download Open Source Software

Browse Subversion Repository

Contents of /common/ThreadCreator.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 383 - (show annotations) (download) (as text)
Tue Dec 11 07:55:09 2012 UTC (11 years, 4 months ago) by satofumi
File MIME type: text/x-chdr
File size: 1129 byte(s)
fix compile error
1 #ifndef THREAD_CREATOR_SDL_H
2 #define THREAD_CREATOR_SDL_H
3
4 /*!
5 \file
6 \brief SDL_Thread によるスレッドハンドラ
7
8 \author Satofumi KAMIMURA
9
10 $Id$
11 */
12
13 #include <memory>
14 #include <cstddef>
15
16
17 namespace beego {
18 /*!
19 \brief スレッドの生成クラス
20 */
21 class ThreadCreator {
22 ThreadCreator(void);
23 ThreadCreator(const ThreadCreator& rhs);
24 ThreadCreator& operator = (const ThreadCreator& rhs);
25
26 struct pImpl;
27 const std::auto_ptr<pImpl> pimpl;
28
29 public:
30 explicit ThreadCreator(int (*fn)(void *), void* args);
31 ~ThreadCreator(void);
32
33 /*!
34 \brief スレッドの起動
35 */
36 void run(void);
37
38 /*!
39 \brief 処理回数を指定してスレッドを起動
40
41 \param times [i] 処理回数
42 */
43 void run(size_t times);
44
45 /*!
46 \brief スレッドを停止
47 */
48 void stop(void);
49
50 /*!
51 \brief スレッドの終了を待つ
52
53 \param retval [o] スレッドの戻り値が格納される
54 */
55 void wait(int* retval = NULL);
56
57 /*!
58 \brief スレッドが動作中かを返す
59
60 \retval true 動作中
61 \retval false 停止中
62 */
63 bool isRunning(void);
64 };
65 };
66
67 #endif /* !THREAD_CREATOR_SDL_H */

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26