Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields  

base.System.h

00001 /*----------------------------------------------------------------------------
00002   SWORD 2000 - Software With Objects for Rapid Development
00003   Copyright (C) 2003 Eric NICOLAS
00004   ----------------------------------------------------------------------------
00005   SWORD is free software; you can redistribute it and/or modify
00006   it under the terms of the GNU Lesser General Public License as published by
00007   the Free Software Foundation; either version 2 of the License, or
00008   (at your option) any later version.
00009 
00010   SWORD is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013   GNU Lesser General Public License for more details.
00014 
00015   You should have received a copy of the GNU Lesser General Public License
00016   along with SWORD; if not, write to the Free Software
00017   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018   --------------------------------------------------------------------------*/
00019 #ifndef _SWORD_BASE_SYSTEM_
00020 #define _SWORD_BASE_SYSTEM_
00021 
00022 namespace sword {
00023 
00025         class SWORDDECL System {
00026         public:
00028 
00033                 static void copy(void *dst, const void *src, size_t length) throw();
00034 
00036 
00040                 static void move(void *dst, const void *src, size_t length) throw();
00041 
00043 
00047                 static void zero(void *dst, size_t length) throw();
00048 
00050 
00054                 static void fill(void *dst, size_t length, word8 value) throw();
00055 
00057 
00062                 static int  compare(const void *a, const void *b, size_t length) throw();
00063 
00065                 static ACE_Thread_Mutex consoleMutex;
00066 
00068 
00072                 static void sleep(int milliseconds);
00073 
00075                 static std::string uuid();
00076 
00078 
00083                 static word64 memoryFootprint();
00084 
00086 #ifdef WIN32
00087                 static std::string errorMessage(DWORD dwError);
00088 #else
00089                 static std::string errorMessage(int error);
00090 #endif
00091 
00092 #ifdef WIN32
00093                 static HKEY regAccess(HKEY hKey, const std::string &name, DWORD* lpdwDisposition);
00094                 static void regSetValue(HKEY hKey, const std::string &name, const std::string &s);
00095                 static void regSetValue(HKEY hKey, const std::string &name, DWORD d);
00096 #endif
00097 
00099     static std::string hostName();
00100 
00102     static std::string userName();
00103 
00105     static std::string applicationPath();
00106         };
00107 
00108 } // namespace sword
00109 
00110 #include "sword.private/base.System.inl"
00111 
00112 #endif // _SWORD_BASE_SYSTEM_

Generated on Tue Dec 23 20:08:56 2003 for SWORD by doxygen1.3-rc2