00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __XVR2_PLATFORM_H__
00027 #define __XVR2_PLATFORM_H__
00028
00029 #include<xvr2/String.h>
00030 #include<xvr2/Platform/PlatformException.h>
00031 #include<xvr2/Platform/CPU.h>
00032 #include<vector>
00033
00034 #if defined(__linux) || defined(__linux__) || defined(linux__) || defined(__LINUX__) || defined(__LINUX) || defined(LINUX__)
00035 #define XVR2_HOST_PLATFORM_LINUX
00036 #else
00037
00038 #if defined(__sun) || defined(__sun__) || defined(sun__)
00039 #define XVR2_HOST_PLATFORM_SOLARIS
00040 #endif
00041
00042 #endif
00043
00044
00045
00046 namespace xvr2 {
00047 namespace Platform {
00049 struct SystemInformation : public xvr2::Object {
00051 static UInt32 cpuCount();
00053 static const CPU &getCPU(UInt32 idx = 0);
00054
00057 static UInt64 memorySize();
00059 static UInt64 physicalMemorySize();
00061 static UInt64 swapSize();
00062
00064 static const String &OSDistribution();
00065 static const String &OSName();
00066 static const String &OSVersionString();
00067 static const std::vector<int> &OSVersion();
00068 };
00069 };
00070 };
00071
00072
00073 #endif