MISYSTEM Class Reference

Container for static methods to access various system and execution environment valuses. More...

#include <mi32/misystem.h>

List of all members.

Public Types

enum  PLATFORM {
  PLATFORM_Unknown = 0, PLATFORM_Win32_PreNT = 0x000100, PLATFORM_Win95 = (PLATFORM_Win32_PreNT | 0x01), PLATFORM_Win98 = (PLATFORM_Win32_PreNT | 0x02),
  PLATFORM_WinME = (PLATFORM_Win32_PreNT | 0x03), PLATFORM_Win32_NT = 0x001000, PLATFORM_WinNT = (PLATFORM_Win32_NT | 0x01), PLATFORM_Win2000 = (PLATFORM_Win32_NT | 0x02),
  PLATFORM_WinXP = (PLATFORM_Win32_NT | 0x03), PLATFORM_Unix = 0x002000, PLATFORM_MacOSX = (PLATFORM_Unix | 0x01), PLATFORM_LinuxX86 = (PLATFORM_Unix | 0x02),
  PLATFORM_UnixSun = (PLATFORM_Unix | 0x03), PLATFORM_UnixSGI = (PLATFORM_Unix | 0x04), PLATFORM_UnixIBM = (PLATFORM_Unix | 0x05)
}

Static Public Member Functions

MISTRING GetCurrentUserName ()
MISTRING GetEnvironmentValue (const char *name)
INT64 GetPhysicalMemoryAvailable ()
INT64 GetPhysicalMemoryTotal ()
PLATFORM GetPlatform ()
UINT32 GetTickCount ()
UINT32 GetTicksPerSecond ()
double GetTimerValue ()
INT64 GetVirtualMemoryAvailable ()
INT64 GetVirtualMemoryTotal ()
ERRVALUE SetCurrentWorkingDirectory (const FILEPATH &filepath)
void Sleep (double delay)
bool Supports64BitFileSystem ()
ERRVALUE TranslateSystemError (ERRVALUE DftErrCode, INT32 &SystemError)


Detailed Description

Container for static methods to access various system and execution environment valuses.

Definition at line 82 of file misystem.h.


Member Enumeration Documentation

enum MISYSTEM::PLATFORM
 

Enumeration values:
PLATFORM_Unknown 
PLATFORM_Win32_PreNT 
PLATFORM_Win95 
PLATFORM_Win98  Microsoft Windows 95.
PLATFORM_WinME  Microsoft Windows 98.
PLATFORM_Win32_NT  Microsoft Windows Me.
PLATFORM_WinNT 
PLATFORM_Win2000  Microsoft Windows NT 4.
PLATFORM_WinXP  Microsoft Windows 2000.
PLATFORM_Unix  Microsoft Windows XP.
PLATFORM_MacOSX 
PLATFORM_LinuxX86 
PLATFORM_UnixSun 
PLATFORM_UnixSGI 
PLATFORM_UnixIBM 

Definition at line 85 of file misystem.h.


Member Function Documentation

MISTRING MISYSTEM::GetCurrentUserName  )  [static]
 

Get current user name.

Returns:
MISTRING containing name, will be 'UnknownUser' if cannot determine name.

MISTRING MISYSTEM::GetEnvironmentValue const char *  name  )  [static]
 

Get value of named environment variable.

Returns:
MISTRING containing value, will be empty if no matching environment variable.
Parameters:
name  Environment variable name

INT64 MISYSTEM::GetPhysicalMemoryAvailable  )  [static]
 

Get amount of available physical memory.

Returns:
Number of bytes, -1 if unsupported, < -1 if error.

INT64 MISYSTEM::GetPhysicalMemoryTotal  )  [static]
 

Get amount of total physical memory.

Returns:
Number of bytes, -1 if unsupported, < -1 if error.

PLATFORM MISYSTEM::GetPlatform  )  [static]
 

Get platform.

UINT32 MISYSTEM::GetTickCount  )  [static]
 

Returns a simple clock tick of unknown starting time.

UINT32 MISYSTEM::GetTicksPerSecond  )  [static]
 

Get number of clock ticks per second.

double MISYSTEM::GetTimerValue  )  [static]
 

Return 'timer' value.

Precision of timer is system-dependent, ranging from 1ms and 100ns.

Returns:
Number of seconds from arbitrary starting time.

INT64 MISYSTEM::GetVirtualMemoryAvailable  )  [static]
 

Get amount of available virtual memory.

The return value may change if the OS supports dynamic page/swap file allocation.

Returns:
Number of bytes, -1 if unsupported, < -1 if error.

INT64 MISYSTEM::GetVirtualMemoryTotal  )  [static]
 

Get total amount of virtual memory.

The return value may change if the OS supports dynamic page/swap file allocation.

Returns:
Number of bytes, -1 if unsupported, < -1 if error.

ERRVALUE MISYSTEM::SetCurrentWorkingDirectory const FILEPATH filepath  )  [static]
 

Set the current working directory Note, to get the current working directory, construct a FILEPATH with FILEPATH::PATHTYPE_Current.

void MISYSTEM::Sleep double  delay  )  [static]
 

Delay for specified time.

Parameters:
delay  Time to delay in seconds

bool MISYSTEM::Supports64BitFileSystem  )  [static]
 

Determine if system supports 64-bit filesystems.

ERRVALUE MISYSTEM::TranslateSystemError ERRVALUE  DftErrCode,
INT32 SystemError
[static]
 

Translate OS error code to MicroImages error code Does NOT do a SetErrPosn() on the error code, that is up to the caller.

Parameters:
DftErrCode  Default error code to use if system error not specifically handled
SystemError  Operating sytem error RETURNED


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:20:06 2004 for TNTsdk by  doxygen 1.3.8-20040913