Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/platform/PlatformDriver.h
Go to the documentation of this file.
00001 
00002 
00003 #ifndef _PLATFORM_DRIVER_H_
00004 #define _PLATFORM_DRIVER_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 
00009 namespace platform
00010 {
00011 
00012 class Thread;
00013 
00015 enum CpuTechnology
00016 {
00017         CT_FPU          = 0x01, // Floating-Point unit on-Chip
00018         CT_MMX          = 0x02, // Intel Architecture technology
00019         CT_SSE          = 0x03, // Streaming SIMD (single instruction, multiple data) extensions instruction set.
00020         CT_SSE2         = 0x04, // Extensions to the SSE instruction set.
00021         CT_SSE3         = 0x05, // Extensions to the SSE2 instruction set.
00022         CT_3DNOW        = 0x06, // AMD 3DNow! instructions
00023         CT_E3DNOW       = 0x07, // Enhanced AMD 3DNow! instructions
00024         CT_CMOV         = 0x08, // Conditional moves
00025         CT_FCMOV        = 0x09, // Floating-Point conditional moves
00026         CT_RDTSC        = 0x0A, // Read Time-Stamp Counter
00027         CT_HT           = 0x0B, // Hyper-Threading technology
00028         CT_EST          = 0x0C, // Enhanced Intel SpeedStep technology
00029         CT_ALTIVEC      = 0x0D  // PPC Altivec Unit(s)
00030 };
00031 
00040 class ENGINE_PUBLIC_EXPORT PlatformDriver
00041 {
00042 public:
00043 
00045         PlatformDriver();
00046 
00048         virtual ~PlatformDriver();
00049 
00050         virtual void initialize();
00051 
00052         virtual void start();
00053 
00054         virtual void stop();
00055 
00056         virtual const char* getCPUVendorId() = 0;
00057 
00058         virtual f32 getCPUFrequency() = 0;
00059 
00060         virtual bool checkCPUTechnology(CpuTechnology tech) = 0;
00061 
00062         virtual u16 getLogicalProcessorsNum() = 0;
00063 
00064         virtual u16 getPhysicalProcessorsNum() = 0;
00065 
00066         virtual u32 getCPUCacheSize(u32 level) = 0;
00067 
00068         virtual u32 getTotalMemory();
00069 
00070         virtual u32 getFreeMemory();
00071 
00072         virtual u32 getSharedMemory();
00073 
00074         virtual u32 getBufferMemory();
00075 
00076         virtual u32 getTotalSwap();
00077 
00078         virtual u32 getFreeSwap();
00079         
00080         virtual void copyToClipboard(const c8* text) = 0;
00081         
00082         virtual c8* getTextFromClipboard() = 0;
00083 
00084         virtual Thread* createThread() = 0;
00085 
00086         virtual void removeThread(Thread* thread) = 0;
00087         
00088         virtual void sleep(u32 miliseconds) = 0;
00089 };
00090 
00091 } // end namespace platform
00092 
00093 #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)