Public 型 | Public メソッド | Protected メソッド
クラス テンプレート mist::thread< thread_parameter >

template 型のデータを扱うことができるスレッドクラス [詳細]

#include <thread.h>

mist::thread_objectを継承しています。

Public 型

typedef unsigned long thread_exit_type
 スレッド終了時の戻り値の型

Public メソッド

thread_exit_type exit_code () const
 スレッドが終了した時に返した戻り値を取得する
const threadoperator= (const thread &t)
 他のスレッドオブジェクトと同じものを作成する
bool operator== (const thread &t) const
 2つのスレッドオブジェクトが同じものかどうかを判定する
virtual bool create ()
 スレッドを生成する
virtual bool create_without_thread ()
 スレッド無しで関数を実行する
virtual bool wait (unsigned long dwMilliseconds=INFINITE)
 スレッドが終了するか,タイムアウトになるまで待機する
virtual bool close ()
 スレッドが使用していたリソースを開放する

Protected メソッド

virtual thread_exit_type thread_function ()=0
 継承した先で必ず実装されるスレッド関数

説明

template<class thread_parameter = thread_dmy_class>
class mist::thread< thread_parameter >

template 型のデータを扱うことができるスレッドクラス

詳細な説明や関数の使用例を書く

注意
MIST_THREAD_SUPPORT が 1 の場合は,スレッドサポートは行わないため,シングルスレッド用に内部実装が変更される
引数
thread_parameter… 引数の説明

関数

template<class thread_parameter = thread_dmy_class>
virtual bool mist::thread< thread_parameter >::close ( )
inlinevirtual

スレッドが使用していたリソースを開放する

スレッドが使用したリソースを開放するために,必ず1つのスレッドに対し1度だけ呼ばれる必要がある

戻り値
true… 正常にスレッドを終了
false… スレッドの終了に失敗
template<class thread_parameter = thread_dmy_class>
virtual bool mist::thread< thread_parameter >::create ( )
inlinevirtual

スレッドを生成する

戻り値
true… スレッドの作成に成功
false… スレッドの作成に失敗
template<class thread_parameter = thread_dmy_class>
virtual bool mist::thread< thread_parameter >::create_without_thread ( )
inlinevirtual

スレッド無しで関数を実行する

戻り値
true… スレッドの作成に成功
false… スレッドの作成に失敗
template<class thread_parameter = thread_dmy_class>
const thread& mist::thread< thread_parameter >::operator= ( const thread< thread_parameter > &  t)
inline

他のスレッドオブジェクトと同じものを作成する

注意
単なるコピーであり,別途スレッドが生成されるわけではない
引数
[in]t… コピー元のスレッドオブジェクト
戻り値
自分自身
template<class thread_parameter = thread_dmy_class>
bool mist::thread< thread_parameter >::operator== ( const thread< thread_parameter > &  t) const
inline

2つのスレッドオブジェクトが同じものかどうかを判定する

詳細な説明や関数の使用例を書く

引数
[in]t… 比較対象のスレッドオブジェクト
戻り値
true… 同じスレッド
false… 別のスレッド
template<class thread_parameter = thread_dmy_class>
virtual thread_exit_type mist::thread< thread_parameter >::thread_function ( )
protectedpure virtual

継承した先で必ず実装されるスレッド関数

本クラスを継承し,スレッドの機能を持たせる場合に必ず実装しなくてはならない関数. スレッドの生成とともに本関数が呼ばれる.

戻り値
スレッド終了時の戻り値
template<class thread_parameter = thread_dmy_class>
virtual bool mist::thread< thread_parameter >::wait ( unsigned long  dwMilliseconds = INFINITE)
inlinevirtual

スレッドが終了するか,タイムアウトになるまで待機する

タイムアウトを INFINITE に設定することで,スレッドが終了するまで待ち続ける

引数
[in]dwMilliseconds… タイムアウト時間(ミリ秒単位)
戻り値
true… スレッドがタイムアウト前に終了した
false… タイムアウトが発生したか,その他のエラーが発生

このクラスの説明は次のファイルから生成されました:

Generated on Wed Nov 12 2014 19:44:29 for MIST by doxygen 1.8.1.2