Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

thread.h

Go to the documentation of this file.
00001 
00002 
00003 //
00004 //      THREAD.H                                        (c)     YoY'01                                          WEB: www.aestesis.org
00005 //
00008 #ifndef                                                 _THREAD_H_
00009 #define                                                 _THREAD_H_
00012 #include                                                <windows.h>
00013 #include                                                "object.h"
00014 #include                                                "bitmap.h"
00017 
00018 //      If you use directly the variables in the class API, it's at your own risks. Prefer the methods...   
00019 
00022 
00023 class Athread
00024 {
00025 public:
00026         enum
00027         {
00028                 priorityIDLE,
00029                 priorityLOW,
00030                 priorityNORMAL,
00031                 priorityHIGHT,
00032                 prioritySPEED
00033         };
00034 
00035         ADLL                                            Athread                                                 ();
00036         ADLL virtual                            ~Athread                                                ();
00037 
00038         ADLL bool                                       start                                                   ();
00039         ADLL bool                                       stop                                                    ();
00040         ADLL bool                                       isRunning                                               ();
00041         ADLL void                                       sleep                                                   (int millis);
00042         ADLL void                                       setPriority                                             (int level);
00043         ADLL int                                        getPriority                                             ();
00044 
00045         static int                                      getTickCount                                    ()      { return GetTickCount(); }
00046 
00047         virtual void                            run                                                             ()=0;
00048 
00049         // private
00050 
00051         HANDLE                                          hThread;
00052         int                                                     priority;
00053 };
00054 
00057 #endif                                                  //_SECTION_H_

Generated on Tue Nov 20 10:21:26 2001 for elektronika plugz SDK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001