BazisLib::Win32::_BasicThread< DescendantClass > Class Template Reference

Represents a Win32 thread. More...

#include <thread.h>

List of all members.

Public Member Functions

 _BasicThread ()
 Initializes the thread object, but does not start the thread.
bool Start ()
bool Terminate ()
bool Join ()
 Waits for the thread to complete.
bool Suspend ()
bool Resume ()
int GetReturnCode (bool *pbSuccess=NULL)
unsigned GetThreadID ()
 ~_BasicThread ()

Static Public Member Functions

static void Sleep (unsigned Millisecs)

Private Attributes

HANDLE m_hThread
DWORD m_ThreadID


Detailed Description

template<class DescendantClass>
class BazisLib::Win32::_BasicThread< DescendantClass >

Represents a Win32 thread.

The _BasicThread template class represents a single Win32 thread and contains methods for controlling it. The thread body is defined through the template parameter (DescendantClass::ThreadStarter static function is called, passing this as a parameter). That allows declaring VT-less thread classes. However, as VT is not a huge overhead, a classical pure method-based BazisLib::Win32::Thread class is provided.


Constructor & Destructor Documentation

template<class DescendantClass >
BazisLib::Win32::_BasicThread< DescendantClass >::_BasicThread (  )  [inline]

Initializes the thread object, but does not start the thread.

This constructor does not create actual Win32 thread. To create the thread and to start it, call the Start() method.

template<class DescendantClass >
BazisLib::Win32::_BasicThread< DescendantClass >::~_BasicThread (  )  [inline]

Here is the call graph for this function:


Member Function Documentation

template<class DescendantClass >
int BazisLib::Win32::_BasicThread< DescendantClass >::GetReturnCode ( bool *  pbSuccess = NULL  )  [inline]

template<class DescendantClass >
unsigned BazisLib::Win32::_BasicThread< DescendantClass >::GetThreadID (  )  [inline]

template<class DescendantClass >
bool BazisLib::Win32::_BasicThread< DescendantClass >::Join (  )  [inline]

Waits for the thread to complete.

template<class DescendantClass >
bool BazisLib::Win32::_BasicThread< DescendantClass >::Resume (  )  [inline]

template<class DescendantClass >
static void BazisLib::Win32::_BasicThread< DescendantClass >::Sleep ( unsigned  Millisecs  )  [inline, static]

template<class DescendantClass >
bool BazisLib::Win32::_BasicThread< DescendantClass >::Start (  )  [inline]

template<class DescendantClass >
bool BazisLib::Win32::_BasicThread< DescendantClass >::Suspend (  )  [inline]

template<class DescendantClass >
bool BazisLib::Win32::_BasicThread< DescendantClass >::Terminate (  )  [inline]


Member Data Documentation

template<class DescendantClass >
HANDLE BazisLib::Win32::_BasicThread< DescendantClass >::m_hThread [private]

template<class DescendantClass >
DWORD BazisLib::Win32::_BasicThread< DescendantClass >::m_ThreadID [private]


The documentation for this class was generated from the following file:
SourceForge.net Logo