openshot-audio  0.1.7
Public Types | Static Public Member Functions | List of all members
juce::SystemStats Class Reference

#include <juce_core.h>

Public Types

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, Win2000 = Windows | 1, WinXP = Windows | 2, WinVista = Windows | 3,
  Windows7 = Windows | 4, Windows8_0 = Windows | 5, Windows8_1 = Windows | 6, Windows10 = Windows | 7
}
 
typedef void(* CrashHandlerFunction )()
 

Static Public Member Functions

static String getJUCEVersion ()
 
static OperatingSystemType getOperatingSystemType ()
 
static String getOperatingSystemName ()
 
static bool isOperatingSystem64Bit ()
 
static String getEnvironmentVariable (const String &name, const String &defaultValue)
 
static String getLogonName ()
 
static String getFullUserName ()
 
static String getComputerName ()
 
static String getUserLanguage ()
 
static String getUserRegion ()
 
static String getDisplayLanguage ()
 
static String getDeviceDescription ()
 
static int getNumCpus () noexcept
 
static int getCpuSpeedInMegaherz ()
 
static String getCpuVendor ()
 
static bool hasMMX () noexcept
 
static bool has3DNow () noexcept
 
static bool hasSSE () noexcept
 
static bool hasSSE2 () noexcept
 
static bool hasSSE3 () noexcept
 
static bool hasSSSE3 () noexcept
 
static bool hasAVX () noexcept
 
static int getMemorySizeInMegabytes ()
 
static int getPageSize ()
 
static String getStackBacktrace ()
 
static void setApplicationCrashHandler (CrashHandlerFunction)
 

Detailed Description

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

Member Typedef Documentation

typedef void(* juce::SystemStats::CrashHandlerFunction)()

A void() function type, used by setApplicationCrashHandler().

Member Enumeration Documentation

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

Enumerator
UnknownOS 
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).

Linux 
Android 
iOS 
MacOSX_10_4 
MacOSX_10_5 
MacOSX_10_6 
MacOSX_10_7 
MacOSX_10_8 
MacOSX_10_9 
MacOSX_10_10 
Win2000 
WinXP 
WinVista 
Windows7 
Windows8_0 
Windows8_1 
Windows10 

Member Function Documentation

static String juce::SystemStats::getComputerName ( )
static

Returns the host-name of the computer.

static int juce::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 juce::SystemStats::getCpuVendor ( )
static

Returns a string to indicate the CPU vendor. Might not be known on some systems.

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.

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"

String 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.

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()
String SystemStats::getJUCEVersion ( )
static

Returns the current version of JUCE, See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VERSION macros.

static String juce::SystemStats::getLogonName ( )
static

Returns the current user's name, if available.

See Also
getFullUserName()
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.
int SystemStats::getNumCpus ( )
staticnoexcept

Returns the number of CPU cores.

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
static OperatingSystemType juce::SystemStats::getOperatingSystemType ( )
static

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

Returns
one of the values from the OperatingSystemType enum.
See Also
getOperatingSystemName
static int juce::SystemStats::getPageSize ( )
static

Returns the system page-size. This is only used by programmers with beards.

String 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.

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)

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).

bool SystemStats::has3DNow ( )
staticnoexcept

Returns true if AMD 3DNOW instructions are available.

bool SystemStats::hasAVX ( )
staticnoexcept

Returns true if Intel AVX instructions are available.

bool SystemStats::hasMMX ( )
staticnoexcept

Returns true if Intel MMX instructions are available.

bool SystemStats::hasSSE ( )
staticnoexcept

Returns true if Intel SSE instructions are available.

bool SystemStats::hasSSE2 ( )
staticnoexcept

Returns true if Intel SSE2 instructions are available.

bool SystemStats::hasSSE3 ( )
staticnoexcept

Returns true if Intel SSE2 instructions are available.

bool SystemStats::hasSSSE3 ( )
staticnoexcept

Returns true if Intel SSSE3 instructions are available.

static bool juce::SystemStats::isOperatingSystem64Bit ( )
static

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

void SystemStats::setApplicationCrashHandler ( CrashHandlerFunction  handler)
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.


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