sttcl  v0.9c
STTCL C++ template state machine framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sttcl::internal::SttclThread< Impl > Class Template Reference

#include <SttclThread.h>

List of all members.

Public Types

typedef void *(* ThreadMethodPtr )(void *)

Public Member Functions

 SttclThread (ThreadMethodPtr argThreadMethod)
 ~SttclThread ()
bool run (void *args)
void join ()
void detach ()

Static Public Member Functions

static bool isSelf (const Impl &otherThread)

Detailed Description

template<class Impl = STTCL_DEFAULT_THREADIMPL>
class sttcl::internal::SttclThread< Impl >

Adapter class for a (OS-)specific thread implementation.

Template Parameters:
ImplSelects a (OS-)specific thread implementation.
Todo:
Implement a static interface check for the Impl class.

Member Typedef Documentation

template<class Impl = STTCL_DEFAULT_THREADIMPL>
typedef void*(* sttcl::internal::SttclThread< Impl >::ThreadMethodPtr)(void *)

Defines the method pointer signature used for the thread method.

Reimplemented in sttcl::ClassMethodThread< T, UserArgs, ThreadImpl, MutexImpl >.


Constructor & Destructor Documentation

template<class Impl = STTCL_DEFAULT_THREADIMPL>
sttcl::internal::SttclThread< Impl >::SttclThread ( ThreadMethodPtr  argThreadMethod)
inline

Constructor for class SttclThread.

Parameters:
argThreadMethodA pointer tor the method that should be executed as thread method.
template<class Impl = STTCL_DEFAULT_THREADIMPL>
sttcl::internal::SttclThread< Impl >::~SttclThread ( )
inline

Destructor for class SttclThread.


Member Function Documentation

template<class Impl = STTCL_DEFAULT_THREADIMPL>
void sttcl::internal::SttclThread< Impl >::detach ( )
inline

Kills the thread method.

template<class Impl = STTCL_DEFAULT_THREADIMPL>
static bool sttcl::internal::SttclThread< Impl >::isSelf ( const Impl &  otherThread)
inlinestatic

Returns true if the other thread reference represents the thread method path, false otherwise.

Parameters:
otherThreadA thread reference.
template<class Impl = STTCL_DEFAULT_THREADIMPL>
void sttcl::internal::SttclThread< Impl >::join ( )
inline

Waits blocking forever until the thread method exits.

Reimplemented in sttcl::ClassMethodThread< T, UserArgs, ThreadImpl, MutexImpl >.

template<class Impl = STTCL_DEFAULT_THREADIMPL>
bool sttcl::internal::SttclThread< Impl >::run ( void *  args)
inline

Runs the thread method within a separate thread.

Parameters:
argsArguments passed to the thread method.

The documentation for this class was generated from the following file: