#include <juce_SystemStats.h>
|
enum | OperatingSystemType {
UnknownOS = 0
, MacOSX = 0x0100
, Windows = 0x0200
, Linux = 0x0400
,
Android = 0x0800
, iOS = 0x1000
, MacOSX_10_4 = MacOSX | 4
, MacOSX_10_5 = MacOSX | 5
,
MacOSX_10_6 = MacOSX | 6
, MacOSX_10_7 = MacOSX | 7
, MacOSX_10_8 = MacOSX | 8
, MacOSX_10_9 = MacOSX | 9
,
MacOSX_10_10 = MacOSX | 10
, MacOSX_10_11 = MacOSX | 11
, MacOSX_10_12 = MacOSX | 12
, MacOSX_10_13 = MacOSX | 13
,
MacOSX_10_14 = MacOSX | 14
, Win2000 = Windows | 1
, WinXP = Windows | 2
, WinVista = Windows | 3
,
Windows7 = Windows | 4
, Windows8_0 = Windows | 5
, Windows8_1 = Windows | 6
, Windows10 = Windows | 7
} |
|
using | CrashHandlerFunction = void(*)(void*) |
|
Contains methods for finding out about the current hardware and OS configuration.
Definition at line 32 of file juce_SystemStats.h.
◆ CrashHandlerFunction
◆ OperatingSystemType
◆ getComputerName()
static String juce::SystemStats::getComputerName |
( |
| ) |
|
|
static |
Returns the host-name of the computer.
◆ getCpuModel()
static String juce::SystemStats::getCpuModel |
( |
| ) |
|
|
static |
Attempts to return a string describing the CPU model. May not be available on some systems.
◆ getCpuSpeedInMegahertz()
static int juce::SystemStats::getCpuSpeedInMegahertz |
( |
| ) |
|
|
static |
Returns the approximate CPU speed.
- Returns
- the speed in megahertz, e.g. 1500, 2500, 32000 (depending on what year you're reading this...)
◆ getCpuVendor()
static String juce::SystemStats::getCpuVendor |
( |
| ) |
|
|
static |
Returns a string to indicate the CPU vendor. Might not be known on some systems.
◆ getDeviceDescription()
static String juce::SystemStats::getDeviceDescription |
( |
| ) |
|
|
static |
This will attempt to return some kind of string describing the device. If no description is available, it'll just return an empty string. You may want to use this for things like determining the type of phone/iPad, etc.
◆ getDeviceIdentifiers()
StringArray juce::SystemStats::getDeviceIdentifiers |
( |
| ) |
|
|
static |
This method calculates some IDs to uniquely identify the device.
The first choice for an ID is a filesystem ID for the user's home folder or windows directory. If that fails then this function returns the MAC addresses.
Definition at line 61 of file juce_SystemStats.cpp.
◆ getDeviceManufacturer()
static String juce::SystemStats::getDeviceManufacturer |
( |
| ) |
|
|
static |
This will attempt to return the manufacturer of the device. If no description is available, it'll just return an empty string.
◆ getDisplayLanguage()
static String juce::SystemStats::getDisplayLanguage |
( |
| ) |
|
|
static |
Returns the user's display language. The return value is a 2 or 3 letter language code (ISO 639-1 or ISO 639-2). Note that depending on the OS and region, this may also be followed by a dash and a sub-region code, e.g "en-GB"
◆ getEnvironmentVariable()
static String juce::SystemStats::getEnvironmentVariable |
( |
const String & | name, |
|
|
const String & | defaultValue ) |
|
static |
Returns an environment variable. If the named value isn't set, this will return the defaultValue string instead.
◆ getFullUserName()
static String juce::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()
◆ getJUCEVersion()
String juce::SystemStats::getJUCEVersion |
( |
| ) |
|
|
static |
Returns the current version of JUCE, See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VERSION macros.
Definition at line 26 of file juce_SystemStats.cpp.
◆ getLogonName()
static String juce::SystemStats::getLogonName |
( |
| ) |
|
|
static |
◆ getMemorySizeInMegabytes()
static int juce::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.
◆ getNumCpus()
int juce::SystemStats::getNumCpus |
( |
| ) |
|
|
staticnoexcept |
◆ getNumPhysicalCpus()
int juce::SystemStats::getNumPhysicalCpus |
( |
| ) |
|
|
staticnoexcept |
◆ getOperatingSystemName()
static String juce::SystemStats::getOperatingSystemName |
( |
| ) |
|
|
static |
Returns the name of the type of operating system we're running on.
- Returns
- a string describing the OS type.
- See also
- getOperatingSystemType
◆ getOperatingSystemType()
Returns the type of operating system we're running on.
- Returns
- one of the values from the OperatingSystemType enum.
- See also
- getOperatingSystemName
◆ getPageSize()
static int juce::SystemStats::getPageSize |
( |
| ) |
|
|
static |
Returns the system page-size. This is only used by programmers with beards.
◆ getStackBacktrace()
String juce::SystemStats::getStackBacktrace |
( |
| ) |
|
|
static |
Returns a backtrace of the current call-stack. The usefulness of the result will depend on the level of debug symbols that are available in the executable.
Definition at line 137 of file juce_SystemStats.cpp.
◆ getUserLanguage()
static String juce::SystemStats::getUserLanguage |
( |
| ) |
|
|
static |
Returns the language of the user's locale. The return value is a 2 or 3 letter language code (ISO 639-1 or ISO 639-2)
◆ getUserRegion()
static String juce::SystemStats::getUserRegion |
( |
| ) |
|
|
static |
Returns the region of the user's locale. The return value is a 2 letter country code (ISO 3166-1 alpha-2).
◆ has3DNow()
bool juce::SystemStats::has3DNow |
( |
| ) |
|
|
staticnoexcept |
◆ hasAVX()
bool juce::SystemStats::hasAVX |
( |
| ) |
|
|
staticnoexcept |
◆ hasAVX2()
bool juce::SystemStats::hasAVX2 |
( |
| ) |
|
|
staticnoexcept |
◆ hasAVX512BW()
bool juce::SystemStats::hasAVX512BW |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Byte and Word instructions are available.
Definition at line 124 of file juce_SystemStats.cpp.
◆ hasAVX512CD()
bool juce::SystemStats::hasAVX512CD |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Conflict Detection instructions are available.
Definition at line 125 of file juce_SystemStats.cpp.
◆ hasAVX512DQ()
bool juce::SystemStats::hasAVX512DQ |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Doubleword and Quadword instructions are available.
Definition at line 126 of file juce_SystemStats.cpp.
◆ hasAVX512ER()
bool juce::SystemStats::hasAVX512ER |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Exponential and Reciprocal instructions are available.
Definition at line 127 of file juce_SystemStats.cpp.
◆ hasAVX512F()
bool juce::SystemStats::hasAVX512F |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Foundation instructions are available.
Definition at line 123 of file juce_SystemStats.cpp.
◆ hasAVX512IFMA()
bool juce::SystemStats::hasAVX512IFMA |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Integer Fused Multiply-Add instructions are available.
Definition at line 128 of file juce_SystemStats.cpp.
◆ hasAVX512PF()
bool juce::SystemStats::hasAVX512PF |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Prefetch instructions are available.
Definition at line 129 of file juce_SystemStats.cpp.
◆ hasAVX512VBMI()
bool juce::SystemStats::hasAVX512VBMI |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Vector Bit Manipulation instructions are available.
Definition at line 130 of file juce_SystemStats.cpp.
◆ hasAVX512VL()
bool juce::SystemStats::hasAVX512VL |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Vector Length instructions are available.
Definition at line 131 of file juce_SystemStats.cpp.
◆ hasAVX512VPOPCNTDQ()
bool juce::SystemStats::hasAVX512VPOPCNTDQ |
( |
| ) |
|
|
staticnoexcept |
Returns true if Intel AVX-512 Vector Population Count Double and Quad-word instructions are available.
Definition at line 132 of file juce_SystemStats.cpp.
◆ hasFMA3()
bool juce::SystemStats::hasFMA3 |
( |
| ) |
|
|
staticnoexcept |
◆ hasFMA4()
bool juce::SystemStats::hasFMA4 |
( |
| ) |
|
|
staticnoexcept |
◆ hasMMX()
bool juce::SystemStats::hasMMX |
( |
| ) |
|
|
staticnoexcept |
◆ hasNeon()
bool juce::SystemStats::hasNeon |
( |
| ) |
|
|
staticnoexcept |
◆ hasSSE()
bool juce::SystemStats::hasSSE |
( |
| ) |
|
|
staticnoexcept |
◆ hasSSE2()
bool juce::SystemStats::hasSSE2 |
( |
| ) |
|
|
staticnoexcept |
◆ hasSSE3()
bool juce::SystemStats::hasSSE3 |
( |
| ) |
|
|
staticnoexcept |
◆ hasSSE41()
bool juce::SystemStats::hasSSE41 |
( |
| ) |
|
|
staticnoexcept |
◆ hasSSE42()
bool juce::SystemStats::hasSSE42 |
( |
| ) |
|
|
staticnoexcept |
◆ hasSSSE3()
bool juce::SystemStats::hasSSSE3 |
( |
| ) |
|
|
staticnoexcept |
◆ isOperatingSystem64Bit()
static bool juce::SystemStats::isOperatingSystem64Bit |
( |
| ) |
|
|
static |
Returns true if the OS is 64-bit, or false for a 32-bit OS.
◆ isRunningInAppExtensionSandbox()
bool juce::SystemStats::isRunningInAppExtensionSandbox |
( |
| ) |
|
|
staticnoexcept |
Returns true if this code is running inside an app extension sandbox. This function will always return false on windows, linux and android.
Definition at line 226 of file juce_SystemStats.cpp.
◆ setApplicationCrashHandler()
Sets up a global callback function that will be called if the application executes some kind of illegal instruction.
You may want to call getStackBacktrace() in your handler function, to find out where the problem happened and log it, etc.
Definition at line 208 of file juce_SystemStats.cpp.
The documentation for this class was generated from the following files: