mx::mxThread Class Reference

Inheritance diagram for mx::mxThread:

mx::mxExec

List of all members.

Public Member Functions

 mxThread ()
void threadRun ()
virtual int threadExec ()=0
void threadStop ()
void threadWait ()

Protected Attributes

SDL_Thread * thread_identifier


Detailed Description

class

Definition at line 66 of file mxthread.h.


Constructor & Destructor Documentation

mx::mxThread::mxThread (  ) 

constructor

Definition at line 58 of file mxthread.cpp.

00059         {
00060                 thread_identifier = 0;
00061         }


Member Function Documentation

virtual int mx::mxThread::threadExec (  )  [pure virtual]

threadExec thread function

Implements mx::mxExec.

void mx::mxThread::threadRun (  ) 

start thread's execution

Definition at line 69 of file mxthread.cpp.

00070         {
00071                 thread_identifier = SDL_CreateThread(thread_exec, (void*)this);
00072 
00073         }

void mx::mxThread::threadStop (  ) 

stop thread's execution

Definition at line 75 of file mxthread.cpp.

00076         {
00077 
00078                 if(thread_identifier != 0)
00079                         SDL_KillThread(thread_identifier);
00080 
00081                 thread_identifier = 0;
00082 
00083         }

void mx::mxThread::threadWait (  ) 

wait for thread to finish

Definition at line 85 of file mxthread.cpp.

00086         {
00087 
00088                 if(thread_identifier != 0)
00089                         SDL_WaitThread(thread_identifier, 0);
00090 
00091         }


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

Generated on Wed Jun 10 14:52:02 2009 for libmx by  doxygen 1.5.8