OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TSystem Class Reference

Provides information on OS relevant information. More...

#include <owl/system.h>

Classes

class  TProcessorInfo
 Encapsulates information about a processor core. More...
 

Static Public Member Functions

Accessors for OS info
static uint GetProductInfo ()
 Retrieves the product edition for the operating system on the local computer, and maps the type to the product types supported by the specified operating system, e.g.
 
static auto GetVersionInfo () -> TModuleVersionInfo &
 Returns the product version for "kernel32.dll".
 
static uint GetMajorVersion ()
 
static uint GetMinorVersion ()
 
static uint GetBuildNumber ()
 
static auto GetVersionStr () -> tstring
 
static bool IsWin64Bit ()
 Returns true if the OS is 64-bit.
 
Accessors for processor info
static int GetNumberOfProcessors ()
 Returns the value of the SYSTEM_INFO::dwNumberOfProcessors field returned by ::GetSystemInfo.
 
static uint GetProcessorArchitecture ()
 Returns the value of the SYSTEM_INFO::wProcessorArchitecture field returned by ::GetSystemInfo.
 
static tstring GetProcessorArchitectureName (uint architecture)
 Returns the description string for the given processor architecture.
 
static const TProcessorInfoGetProcessorInfo ()
 Returns info for the current processor.
 

Detailed Description

Provides information on OS relevant information.

Note that this class is only a namespace for the contained static member functions, and hence it should not (and can not) be instantiated or inherited.

Definition at line 35 of file system.h.

Member Function Documentation

◆ GetBuildNumber()

uint owl::TSystem::GetBuildNumber ( )
static

Definition at line 91 of file system.cpp.

References GetVersionInfo().

◆ GetMajorVersion()

uint owl::TSystem::GetMajorVersion ( )
static

Definition at line 81 of file system.cpp.

References GetVersionInfo().

◆ GetMinorVersion()

uint owl::TSystem::GetMinorVersion ( )
static

Definition at line 86 of file system.cpp.

References GetVersionInfo().

◆ GetNumberOfProcessors()

int owl::TSystem::GetNumberOfProcessors ( )
static

Returns the value of the SYSTEM_INFO::dwNumberOfProcessors field returned by ::GetSystemInfo.

Note that the value may specify the number of CPU cores, not necessarily the number of physical processor packages/chips. See the Windows API for details.

Definition at line 131 of file system.cpp.

◆ GetProcessorArchitecture()

uint owl::TSystem::GetProcessorArchitecture ( )
static

Returns the value of the SYSTEM_INFO::wProcessorArchitecture field returned by ::GetSystemInfo.

See the Windows API for details of possible return values. Use GetProcessorArchitectureName to get a description string.

Definition at line 141 of file system.cpp.

◆ GetProcessorArchitectureName()

tstring owl::TSystem::GetProcessorArchitectureName ( uint architecture)
static

Returns the description string for the given processor architecture.

If the given architecture ID is unknown, then an empty string is returned. See GetProcessorArchitecture.

Definition at line 151 of file system.cpp.

References _T, and COUNTOF.

◆ GetProcessorInfo()

const TSystem::TProcessorInfo & owl::TSystem::GetProcessorInfo ( )
static

Returns info for the current processor.

Definition at line 177 of file system.cpp.

◆ GetProductInfo()

uint owl::TSystem::GetProductInfo ( )
static

Retrieves the product edition for the operating system on the local computer, and maps the type to the product types supported by the specified operating system, e.g.

PRODUCT_HOME_BASIC, PRODUCT_HOME_PREMIUM, PRODUCT_PROFESSIONAL, PRODUCT_ENTERPRISE. This function is only supported on Vista and later, and returns 0 (PRODUCT_UNDEFINED) on XP. For more information see GetProductInfo in the Windows API documentation.

Definition at line 60 of file system.cpp.

References CHECK, GetMajorVersion(), GetMinorVersion(), GetProductInfo(), and owl::InUse().

◆ GetVersionInfo()

auto owl::TSystem::GetVersionInfo ( ) -> TModuleVersionInfo&
static

Returns the product version for "kernel32.dll".

Definition at line 75 of file system.cpp.

References _T.

◆ GetVersionStr()

auto owl::TSystem::GetVersionStr ( ) -> tstring
static

Definition at line 96 of file system.cpp.

◆ IsWin64Bit()

bool owl::TSystem::IsWin64Bit ( )
static

Returns true if the OS is 64-bit.

Definition at line 104 of file system.cpp.

References _T, owl::InUse(), and WARN.


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