VDKThread Class Reference

This class provides a simple thread implementation Actually is supported only POSIX THREAD. More...

#include <vdkthread.h>

List of all members.

Public Member Functions

Public Attributes

Protected Member Functions


Detailed Description

This class provides a simple thread implementation Actually is supported only POSIX THREAD.

It is possible to use a VDKThread in two way:

via subclassing: if you derive a new class from VDKThread, you have to override the
virtual method "virtual void Execute ();" to do what you want
  class NewClass : public VDKThread {
  protected:
    void Execute () {
      // my code
    }
  public:
    NewClass ();
    ~NewsClass ();
  }
  //...
  NewClass thread;
  thread.Start();

passing a pointer to function when calling "Start ( (void *) func);"
  void * func () {}
  ...
  VDKThread thread;
  thread.Start ((void *) func);


Member Function Documentation

void VDKThread::Exit ( void *  status = 0  )  [protected]

Exit from the thread

VDKThreadEnum VDKThread::Start ( void *  = NULL  ) 

Start the thread.

VDKThreadEnum VDKThread::Stop (  ) 

Stops executing thread (command from other threads).

void * VDKThread::Wait (  ) 

Wait until the thread is terminated (it is used from other threads).

unsigned int VDKThread::GetID (  )  [inline]

Return the thread ID.


Member Data Documentation

VDKThreadEnum VDKThread::state

Store thread status.


The documentation for this class was generated from the following files:
Generated on Fri Jan 12 14:48:29 2007 for vdk 2.4.0 by  doxygen 1.5.1