Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/platform/Thread.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _THREAD_H_
00004 #define _THREAD_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 
00009 namespace platform
00010 {
00011 
00012 enum ThreadPriority
00013 {
00014         TP_LOWEST,      
00015         TP_LOW,         
00016         TP_NORMAL,      
00017         TP_HIGH,        
00018         TP_HIGHEST      
00019 };
00020 
00022 class ENGINE_PUBLIC_EXPORT Thread
00023 {
00024 public:
00025 
00026         Thread();
00027 
00028         virtual ~Thread();
00029 
00030         const u32& getID() const;
00031 
00032         const ThreadPriority& getPriority() const;
00033 
00034         void setPriority(const ThreadPriority& priority);
00035 
00036         void start();
00037 
00038         void join();
00039 
00040         bool isRunning() const;
00041         
00042 private:
00043 
00044         u32 mID;
00045         ThreadPriority mPriority;
00046 
00047         static u32 mIndexCounter;
00048 
00049         virtual void setPriorityImpl(const ThreadPriority& priority) = 0;
00050 
00051         virtual void startImpl() = 0;
00052 
00053         virtual void joinImpl() = 0;
00054 
00055         virtual bool isRunningImpl() const = 0;
00056 };
00057 
00058 } // end namespace platform
00059 
00060 #endif

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by Doxygen (1.7.4)