00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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 }
00109
00110 #include "sword.private/base.System.inl"
00111
00112 #endif // _SWORD_BASE_SYSTEM_