JUCE
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Types | Static Public Member Functions
SystemStats Class Reference

Contains methods for finding out about the current hardware and OS configuration. More...

List of all members.

Public Types

enum  OperatingSystemType {
  UnknownOS = 0, MacOSX = 0x1000, Linux = 0x2000, Android = 0x3000,
  Win95 = 0x4001, Win98 = 0x4002, WinNT351 = 0x4103, WinNT40 = 0x4104,
  Win2000 = 0x4105, WinXP = 0x4106, WinVista = 0x4107, Windows7 = 0x4108,
  Windows = 0x4000, WindowsNT = 0x0100
}
 The set of possible results of the getOperatingSystemType() method. More...

Static Public Member Functions

static String getJUCEVersion ()
 Returns the current version of JUCE,.
static OperatingSystemType getOperatingSystemType ()
 Returns the type of operating system we're running on.
static String getOperatingSystemName ()
 Returns the name of the type of operating system we're running on.
static bool isOperatingSystem64Bit ()
 Returns true if the OS is 64-bit, or false for a 32-bit OS.
static int getOSXMinorVersionNumber ()
 OSX ONLY - Returns the current OS version number.
static String getLogonName ()
 Returns the current user's name, if available.
static String getFullUserName ()
 Returns the current user's full name, if available.
static String getComputerName ()
 Returns the host-name of the computer.
static String getUserLanguage ()
 Returns the user's language.
static String getUserRegion ()
 Returns the user's region.
static int getNumCpus () noexcept
 Returns the number of CPUs.
static int getCpuSpeedInMegaherz ()
 Returns the approximate CPU speed.
static String getCpuVendor ()
 Returns a string to indicate the CPU vendor.
static bool hasMMX () noexcept
 Checks whether Intel MMX instructions are available.
static bool hasSSE () noexcept
 Checks whether Intel SSE instructions are available.
static bool hasSSE2 () noexcept
 Checks whether Intel SSE2 instructions are available.
static bool has3DNow () noexcept
 Checks whether AMD 3DNOW instructions are available.
static int getMemorySizeInMegabytes ()
 Finds out how much RAM is in the machine.
static int getPageSize ()
 Returns the system page-size.

Detailed Description

Contains methods for finding out about the current hardware and OS configuration.


Member Enumeration Documentation

The set of possible results of the getOperatingSystemType() method.

Enumerator:
UnknownOS 
MacOSX 
Linux 
Android 
Win95 
Win98 
WinNT351 
WinNT40 
Win2000 
WinXP 
WinVista 
Windows7 
Windows 

To test whether any version of Windows is running, you can use the expression ((getOperatingSystemType() & Windows) != 0).

WindowsNT 

To test whether the platform is Windows NT or later (i.e.

not Win95 or 98), you can use the expression ((getOperatingSystemType() & WindowsNT) != 0).


Member Function Documentation

static String SystemStats::getJUCEVersion ( ) [static]

Returns the current version of JUCE,.

See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VERSION macros.

Returns the type of operating system we're running on.

Returns:
one of the values from the OperatingSystemType enum.
See also:
getOperatingSystemName

Returns the name of the type of operating system we're running on.

Returns:
a string describing the OS type.
See also:
getOperatingSystemType
static bool SystemStats::isOperatingSystem64Bit ( ) [static]

Returns true if the OS is 64-bit, or false for a 32-bit OS.

static int SystemStats::getOSXMinorVersionNumber ( ) [static]

OSX ONLY - Returns the current OS version number.

E.g. if it's running on 10.4, this will be 4, 10.5 will return 5, etc.

static String SystemStats::getLogonName ( ) [static]

Returns the current user's name, if available.

See also:
getFullUserName()
static String SystemStats::getFullUserName ( ) [static]

Returns the current user's full name, if available.

On some OSes, this may just return the same value as getLogonName().

See also:
getLogonName()
static String SystemStats::getComputerName ( ) [static]

Returns the host-name of the computer.

static String SystemStats::getUserLanguage ( ) [static]

Returns the user's language.

The return value is a 2 or 3 letter language code (ISO 639-1 or ISO 639-2)

static String SystemStats::getUserRegion ( ) [static]

Returns the user's region.

The return value is a 2 letter country code (ISO 3166-1 alpha-2).

static int SystemStats::getNumCpus ( ) [static]

Returns the number of CPUs.

static int SystemStats::getCpuSpeedInMegaherz ( ) [static]

Returns the approximate CPU speed.

Returns:
the speed in megahertz, e.g. 1500, 2500, 32000 (depending on what year you're reading this...)
static String SystemStats::getCpuVendor ( ) [static]

Returns a string to indicate the CPU vendor.

Might not be known on some systems.

static bool SystemStats::hasMMX ( ) [static]

Checks whether Intel MMX instructions are available.

static bool SystemStats::hasSSE ( ) [static]

Checks whether Intel SSE instructions are available.

static bool SystemStats::hasSSE2 ( ) [static]

Checks whether Intel SSE2 instructions are available.

static bool SystemStats::has3DNow ( ) [static]

Checks whether AMD 3DNOW instructions are available.

static int SystemStats::getMemorySizeInMegabytes ( ) [static]

Finds out how much RAM is in the machine.

Returns:
the approximate number of megabytes of memory, or zero if something goes wrong when finding out.
static int SystemStats::getPageSize ( ) [static]

Returns the system page-size.

This is only used by programmers with beards.


The documentation for this class was generated from the following file: