|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Contains methods for finding out about the current hardware and OS configuration. More...
#include "juce_SystemStats.h"
Public Types | |
| enum | OperatingSystemType { UnknownOS , MacOSX , Windows , Linux , Android , iOS , WASM , MacOSX_10_7 , MacOSX_10_8 , MacOSX_10_9 , MacOSX_10_10 , MacOSX_10_11 , MacOSX_10_12 , MacOSX_10_13 , MacOSX_10_14 , MacOSX_10_15 , MacOS_11 , MacOS_12 , MacOS_13 , MacOS_14 , Win2000 , WinXP , WinVista , Windows7 , Windows8_0 , Windows8_1 , Windows10 , Windows11 } |
| The set of possible results of the getOperatingSystemType() method. More... | |
| enum class | MachineIdFlags { macAddresses , fileSystemId , legacyUniqueId , uniqueId } |
| Kinds of identifier that are passed to getMachineIdentifiers(). More... | |
| using | CrashHandlerFunction = void(*)(void *) |
| A function type for use in setApplicationCrashHandler(). | |
Static Public Member Functions | |
| static String | getJUCEVersion () |
| Returns the current version of JUCE, See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VERSION macros. | |
| 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 String | getEnvironmentVariable (const String &name, const String &defaultValue) |
| Returns an environment variable. | |
| 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 language of the user's locale. | |
| static String | getUserRegion () |
| Returns the region of the user's locale. | |
| static String | getDisplayLanguage () |
| Returns the user's display language. | |
| static String | getDeviceDescription () |
| This will attempt to return some kind of string describing the device. | |
| static String | getDeviceManufacturer () |
| This will attempt to return the manufacturer of the device. | |
| static StringArray | getDeviceIdentifiers () |
| This method calculates some IDs to uniquely identify the device. | |
| static String | getUniqueDeviceID () |
| This method returns a machine unique ID unaffected by storage or peripheral changes. | |
| static StringArray | getMachineIdentifiers (MachineIdFlags flags) |
| Returns a list of strings that can be used to uniquely identify a machine. | |
| static int | getNumCpus () noexcept |
| Returns the number of logical CPU cores. | |
| static int | getNumPhysicalCpus () noexcept |
| Returns the number of physical CPU cores. | |
| static int | getCpuSpeedInMegahertz () |
| Returns the approximate CPU speed. | |
| static String | getCpuVendor () |
| Returns a string to indicate the CPU vendor. | |
| static String | getCpuModel () |
| Attempts to return a string describing the CPU model. | |
| static bool | hasMMX () noexcept |
| Returns true if Intel MMX instructions are available. | |
| static bool | has3DNow () noexcept |
| Returns true if AMD 3DNOW instructions are available. | |
| static bool | hasFMA3 () noexcept |
| Returns true if AMD FMA3 instructions are available. | |
| static bool | hasFMA4 () noexcept |
| Returns true if AMD FMA4 instructions are available. | |
| static bool | hasSSE () noexcept |
| Returns true if Intel SSE instructions are available. | |
| static bool | hasSSE2 () noexcept |
| Returns true if Intel SSE2 instructions are available. | |
| static bool | hasSSE3 () noexcept |
| Returns true if Intel SSE3 instructions are available. | |
| static bool | hasSSSE3 () noexcept |
| Returns true if Intel SSSE3 instructions are available. | |
| static bool | hasSSE41 () noexcept |
| Returns true if Intel SSE4.1 instructions are available. | |
| static bool | hasSSE42 () noexcept |
| Returns true if Intel SSE4.2 instructions are available. | |
| static bool | hasAVX () noexcept |
| Returns true if Intel AVX instructions are available. | |
| static bool | hasAVX2 () noexcept |
| Returns true if Intel AVX2 instructions are available. | |
| static bool | hasAVX512F () noexcept |
| Returns true if Intel AVX-512 Foundation instructions are available. | |
| static bool | hasAVX512BW () noexcept |
| Returns true if Intel AVX-512 Byte and Word instructions are available. | |
| static bool | hasAVX512CD () noexcept |
| Returns true if Intel AVX-512 Conflict Detection instructions are available. | |
| static bool | hasAVX512DQ () noexcept |
| Returns true if Intel AVX-512 Doubleword and Quadword instructions are available. | |
| static bool | hasAVX512ER () noexcept |
| Returns true if Intel AVX-512 Exponential and Reciprocal instructions are available. | |
| static bool | hasAVX512IFMA () noexcept |
| Returns true if Intel AVX-512 Integer Fused Multiply-Add instructions are available. | |
| static bool | hasAVX512PF () noexcept |
| Returns true if Intel AVX-512 Prefetch instructions are available. | |
| static bool | hasAVX512VBMI () noexcept |
| Returns true if Intel AVX-512 Vector Bit Manipulation instructions are available. | |
| static bool | hasAVX512VL () noexcept |
| Returns true if Intel AVX-512 Vector Length instructions are available. | |
| static bool | hasAVX512VPOPCNTDQ () noexcept |
| Returns true if Intel AVX-512 Vector Population Count Double and Quad-word instructions are available. | |
| static bool | hasNeon () noexcept |
| Returns true if ARM NEON instructions are available. | |
| static int | getMemorySizeInMegabytes () |
| Finds out how much RAM is in the machine. | |
| static int | getPageSize () |
| Returns the system page-size. | |
| static String | getStackBacktrace () |
| Returns a backtrace of the current call-stack. | |
| static void | setApplicationCrashHandler (CrashHandlerFunction) |
| Sets up a global callback function that will be called if the application executes some kind of illegal instruction. | |
| static bool | isRunningInAppExtensionSandbox () noexcept |
| Returns true if this code is running inside an app extension sandbox. | |
Contains methods for finding out about the current hardware and OS configuration.
@tags{Core}
Definition at line 32 of file juce_SystemStats.h.
A function type for use in setApplicationCrashHandler().
When called, its void* argument will contain platform-specific data about the crash.
Definition at line 263 of file juce_SystemStats.h.
Kinds of identifier that are passed to getMachineIdentifiers().
Definition at line 168 of file juce_SystemStats.h.
The set of possible results of the getOperatingSystemType() method.
| Enumerator | |
|---|---|
| MacOSX | To test whether any version of OSX is running, you can use the expression ((getOperatingSystemType() & MacOSX) != 0). |
| Windows | To test whether any version of Windows is running, you can use the expression ((getOperatingSystemType() & Windows) != 0). |
Definition at line 43 of file juce_SystemStats.h.
|
static |
Returns the host-name of the computer.
Definition at line 189 of file juce_SystemStats_linux.cpp.
|
static |
Attempts to return a string describing the CPU model.
May not be available on some systems.
Definition at line 113 of file juce_SystemStats_linux.cpp.
|
static |
Returns the approximate CPU speed.
Definition at line 134 of file juce_SystemStats_linux.cpp.
|
static |
Returns a string to indicate the CPU vendor.
Might not be known on some systems.
Definition at line 99 of file juce_SystemStats_linux.cpp.
|
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.
Definition at line 73 of file juce_SystemStats_linux.cpp.
|
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.
|
static |
This will attempt to return the manufacturer of the device.
If no description is available, it'll just return an empty string.
Definition at line 94 of file juce_SystemStats_linux.cpp.
|
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"
Definition at line 220 of file juce_SystemStats_linux.cpp.
|
static |
Returns an environment variable.
If the named value isn't set, this will return the defaultValue string instead.
Definition at line 552 of file juce_SharedCode_posix.h.
|
static |
Returns the current user's full name, if available.
On some OSes, this may just return the same value as getLogonName().
Definition at line 184 of file juce_SystemStats_linux.cpp.
|
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.
|
static |
Returns the current user's name, if available.
Definition at line 173 of file juce_SystemStats_linux.cpp.
|
static |
Returns a list of strings that can be used to uniquely identify a machine.
To get multiple kinds of identifier at once, you can combine flags using bitwise-or, e.g. uniqueId | legacyUniqueId.
If a particular kind of identifier isn't available, it will be omitted from the StringArray of results, so passing uniqueId | legacyUniqueId may return 0, 1, or 2 results, depending on the platform and whether any errors are encountered.
If you've previously generated a machine ID and just want to check it against all possible identifiers, you can enable all of the flags and check whether the stored identifier matches any of the results.
Definition at line 73 of file juce_SystemStats.cpp.
|
static |
Finds out how much RAM is in the machine.
Definition at line 146 of file juce_SystemStats_linux.cpp.
|
staticnoexcept |
Returns the number of logical CPU cores.
Definition at line 149 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns the number of physical CPU cores.
Definition at line 150 of file juce_SystemStats.cpp.
|
static |
Returns the name of the type of operating system we're running on.
Definition at line 57 of file juce_SystemStats_linux.cpp.
|
static |
Returns the type of operating system we're running on.
Definition at line 52 of file juce_SystemStats_linux.cpp.
|
static |
Returns the system page-size.
This is only used by programmers with beards.
Definition at line 167 of file juce_SystemStats_linux.cpp.
|
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 177 of file juce_SystemStats.cpp.
|
static |
This method returns a machine unique ID unaffected by storage or peripheral changes.
This ID will be invalidated by changes to the motherboard and CPU on non-mobile platforms, or performing a system restore on an Android device.
There are some extra caveats on iOS: The returned ID is unique to the vendor part of your 'Bundle Identifier' and is stable for all associated apps. The key is invalidated once all associated apps are uninstalled. This function can return an empty string under certain conditions, for example, If the device has not been unlocked since a restart.
Definition at line 307 of file juce_SystemStats_linux.cpp.
|
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)
Definition at line 199 of file juce_SystemStats_linux.cpp.
|
static |
Returns the region of the user's locale.
The return value is a 2 letter country code (ISO 3166-1 alpha-2).
Definition at line 211 of file juce_SystemStats_linux.cpp.
|
staticnoexcept |
Returns true if AMD 3DNOW instructions are available.
Definition at line 152 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX instructions are available.
Definition at line 161 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX2 instructions are available.
Definition at line 162 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Byte and Word instructions are available.
Definition at line 164 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Conflict Detection instructions are available.
Definition at line 165 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Doubleword and Quadword instructions are available.
Definition at line 166 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Exponential and Reciprocal instructions are available.
Definition at line 167 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Foundation instructions are available.
Definition at line 163 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Integer Fused Multiply-Add instructions are available.
Definition at line 168 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Prefetch instructions are available.
Definition at line 169 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Vector Bit Manipulation instructions are available.
Definition at line 170 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Vector Length instructions are available.
Definition at line 171 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel AVX-512 Vector Population Count Double and Quad-word instructions are available.
Definition at line 172 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if AMD FMA3 instructions are available.
Definition at line 153 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if AMD FMA4 instructions are available.
Definition at line 154 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel MMX instructions are available.
Definition at line 151 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if ARM NEON instructions are available.
Definition at line 173 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel SSE instructions are available.
Definition at line 155 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel SSE2 instructions are available.
Definition at line 156 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel SSE3 instructions are available.
Definition at line 157 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel SSE4.1 instructions are available.
Definition at line 159 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel SSE4.2 instructions are available.
Definition at line 160 of file juce_SystemStats.cpp.
|
staticnoexcept |
Returns true if Intel SSSE3 instructions are available.
Definition at line 158 of file juce_SystemStats.cpp.
|
static |
Returns true if the OS is 64-bit, or false for a 32-bit OS.
Definition at line 62 of file juce_SystemStats_linux.cpp.
|
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 270 of file juce_SystemStats.cpp.
|
static |
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 250 of file juce_SystemStats.cpp.