Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::HardwareInfo Class Reference

Core class that represents the info we can get from hardware. More...

Static Public Member Functions

static void Cpuid (UInt32 functionId, UInt32 subFunctionId, UInt32 result[4])
 Generates the cpuid instruction (available on x86 & x64) More...
 
static String GetProcessorBrandString ()
 Gets the brand of the processor. More...
 
static unsigned int GetProcessorCount ()
 Gets the number of threads. More...
 
static ProcessorVendor GetProcessorVendor ()
 Gets the processor vendor. More...
 
static String GetProcessorVendorName ()
 Gets the vendor of the processor. More...
 
static UInt64 GetTotalMemory ()
 Gets the amount of total memory. More...
 
static bool HasCapability (ProcessorCap capability)
 Checks whether the processor owns the capacity to handle certain instructions. More...
 
static bool Initialize ()
 Initializes the HardwareInfo class. More...
 
static bool IsCpuidSupported ()
 Checks whether the instruction of cpuid is supported. More...
 
static bool IsInitialized ()
 Checks whether the class HardwareInfo is initialized. More...
 
static void Uninitialize ()
 Unitializes the class HardwareInfo.
 

Detailed Description

Core class that represents the info we can get from hardware.

Member Function Documentation

◆ Cpuid()

void Nz::HardwareInfo::Cpuid ( UInt32  functionId,
UInt32  subFunctionId,
UInt32  result[4] 
)
static

Generates the cpuid instruction (available on x86 & x64)

Parameters
functionIdInformation to retrieve
subFunctionIdAdditional code for information retrieval
resultSupported features of the CPU

◆ GetProcessorBrandString()

String Nz::HardwareInfo::GetProcessorBrandString ( )
static

Gets the brand of the processor.

Returns
String of the brand
Remarks
Produces a NazaraError if not Initialize

◆ GetProcessorCount()

unsigned int Nz::HardwareInfo::GetProcessorCount ( )
static

Gets the number of threads.

Returns
Number of threads available on the CPU
Remarks
Doesn't need the initialization of HardwareInfo

◆ GetProcessorVendor()

ProcessorVendor Nz::HardwareInfo::GetProcessorVendor ( )
static

Gets the processor vendor.

Returns
ProcessorVendor containing information the vendor
Remarks
Produces a NazaraError if not Initialize

◆ GetProcessorVendorName()

String Nz::HardwareInfo::GetProcessorVendorName ( )
static

Gets the vendor of the processor.

Returns
String of the vendor
Remarks
Produces a NazaraError if not Initialize

◆ GetTotalMemory()

UInt64 Nz::HardwareInfo::GetTotalMemory ( )
static

Gets the amount of total memory.

Returns
Number of total memory available
Remarks
Doesn't need the initialization of HardwareInfo

◆ HasCapability()

bool Nz::HardwareInfo::HasCapability ( ProcessorCap  capability)
static

Checks whether the processor owns the capacity to handle certain instructions.

Returns
true If instructions supported
Remarks
Produces a NazaraError if capability is a wrong enum with NAZARA_DEBUG defined

◆ Initialize()

bool Nz::HardwareInfo::Initialize ( )
static

Initializes the HardwareInfo class.

Returns
true if successful
Remarks
Produces a NazaraError if cpuid is not supported

◆ IsCpuidSupported()

bool Nz::HardwareInfo::IsCpuidSupported ( )
static

Checks whether the instruction of cpuid is supported.

Returns
true if it the case

◆ IsInitialized()

bool Nz::HardwareInfo::IsInitialized ( )
static

Checks whether the class HardwareInfo is initialized.

Returns
true if it is initialized

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