Platform.h

Go to the documentation of this file.
00001 /* $Id: Platform.h 567 2007-12-02 08:24:03Z mindstorm2600 $ */
00002 /***************************************************************************
00003  *            Platform.h
00004  *
00005  *  Tue Sep 12 15:48:28 2006
00006  *  Copyright  2006  Juan V. Guerrero
00007  *  mindstorm2600 at users dot sourceforge dot net
00008  ****************************************************************************/
00009 
00010 /*
00011  *  This program is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version.
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU General Public License
00022  *  along with this program; if not, write to the Free Software
00023  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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 /* _PLATFORM_H */

Generated on Fri Jun 20 22:55:48 2008 for X-VR2 SDK by  doxygen 1.5.5