OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1
//
2
/// \file system.h
3
/// Definition of TSystem, a system information provider class
4
//
5
// Part of OWLNext - the next generation Object Windows Library
6
// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved.
7
//
8
// For more information, including license details, see
9
// http://owlnext.sourceforge.net
10
//
11
12
#if !defined(OWL_SYSTEM_H)
13
#define OWL_SYSTEM_H
14
15
#include <
owl/private/defs.h
>
16
#if defined(BI_HAS_PRAGMA_ONCE)
17
# pragma once
18
#endif
19
20
#include <
owl/wsysinc.h
>
21
#include <
owl/defs.h
>
22
23
namespace
owl
{
24
25
class
TModuleVersionInfo
;
26
27
#include <
owl/preclass.h
>
28
29
//
30
/// \class TSystem
31
/// Provides information on OS relevant information.
32
/// Note that this class is only a namespace for the contained static member functions,
33
/// and hence it should not (and can not) be instantiated or inherited.
34
//
35
class
_OWLCLASS
TSystem
// final
36
{
37
public
:
38
39
/// \name Accessors for OS info
40
/// @{
41
42
static
uint
GetProductInfo
();
43
static
auto
GetVersionInfo
() ->
TModuleVersionInfo
&;
44
static
uint
GetMajorVersion
();
45
static
uint
GetMinorVersion
();
46
static
uint
GetBuildNumber
();
47
static
auto
GetVersionStr
() ->
tstring
;
48
static
bool
IsWin64Bit
();
49
50
/// @}
51
52
//
53
/// Encapsulates information about a processor core.
54
/// See TSystem::GetProcessorInfo.
55
//
56
class
_OWLCLASS
TProcessorInfo
// final
57
{
58
public
:
59
60
TProcessorInfo
();
61
~TProcessorInfo
();
62
63
/// \name CPU attributes
64
/// @{
65
66
tstring
GetName
()
const
;
67
tstring
GetVendorId
()
const
;
68
static
tstring
GetVendorName
(
const
tstring
& vendorId);
69
auto
GetIdentifier
()
const
->
tstring
;
70
int
GetNominalFrequency
()
const
;
71
72
/// @}
73
/// \name x86 CPU feature predicates
74
/// @{
75
76
static
bool
HasMmx
();
77
static
bool
Has3dNow
();
78
static
bool
HasSse
();
79
static
bool
HasSse2
();
80
static
bool
HasSse3
();
81
82
/// @}
83
84
private
:
85
86
struct
TImpl;
87
TImpl* Pimpl;
88
89
// Copy prevention
90
91
TProcessorInfo
(
const
TProcessorInfo
&);
// = delete
92
const
TProcessorInfo
& operator =(
const
TProcessorInfo
&);
// = delete
93
};
94
95
/// \name Accessors for processor info
96
/// @{
97
98
static
int
GetNumberOfProcessors
();
99
static
uint
GetProcessorArchitecture
();
100
static
tstring
GetProcessorArchitectureName
(
uint
architecture);
101
static
const
TProcessorInfo
&
GetProcessorInfo
();
102
103
/// @}
104
105
private
:
106
107
// Instantiation and inheritance prevention
108
109
TSystem();
// = delete
110
TSystem(
const
TSystem&);
// = delete
111
TSystem& operator =(
const
TSystem&);
// = delete
112
113
};
114
115
#include <
owl/posclass.h
>
116
117
}
// OWL namespace
118
119
#endif
// OWL_SYSTEM_H
owl::TModuleVersionInfo
TModuleVersionInfo provides access to a TModule's VERSIONINFO resource.
Definition
module.h:185
owl::TSystem::TProcessorInfo
Encapsulates information about a processor core.
Definition
system.h:57
owl::TSystem::TProcessorInfo::GetNominalFrequency
int GetNominalFrequency() const
Returns the frequency of CPU 0 as reported by the Windows Registry ("CentralProcessor/0/~MHz").
Definition
system.cpp:296
owl::TSystem::TProcessorInfo::TProcessorInfo
TProcessorInfo()
Queries CPU info and initializes members.
Definition
system.cpp:244
owl::TSystem::TProcessorInfo::HasMmx
static bool HasMmx()
Definition
system.cpp:301
owl::TSystem::TProcessorInfo::HasSse3
static bool HasSse3()
Definition
system.cpp:321
owl::TSystem::TProcessorInfo::GetVendorName
static tstring GetVendorName(const tstring &vendorId)
Returns the name of the CPU vendor.
Definition
system.cpp:273
owl::TSystem::TProcessorInfo::GetVendorId
tstring GetVendorId() const
Definition
system.cpp:259
owl::TSystem::TProcessorInfo::HasSse2
static bool HasSse2()
Definition
system.cpp:316
owl::TSystem::TProcessorInfo::GetIdentifier
auto GetIdentifier() const -> tstring
Definition
system.cpp:264
owl::TSystem::TProcessorInfo::Has3dNow
static bool Has3dNow()
Definition
system.cpp:306
owl::TSystem::TProcessorInfo::GetName
tstring GetName() const
Definition
system.cpp:254
owl::TSystem::TProcessorInfo::HasSse
static bool HasSse()
Definition
system.cpp:311
owl::TSystem::GetBuildNumber
static uint GetBuildNumber()
Definition
system.cpp:91
owl::TSystem::IsWin64Bit
static bool IsWin64Bit()
Returns true if the OS is 64-bit.
Definition
system.cpp:104
owl::TSystem::GetNumberOfProcessors
static int GetNumberOfProcessors()
Returns the value of the SYSTEM_INFO::dwNumberOfProcessors field returned by GetSystemInfo.
Definition
system.cpp:131
owl::TSystem::GetVersionStr
static auto GetVersionStr() -> tstring
Definition
system.cpp:96
owl::TSystem::GetMinorVersion
static uint GetMinorVersion()
Definition
system.cpp:86
owl::TSystem::GetProcessorArchitecture
static uint GetProcessorArchitecture()
Returns the value of the SYSTEM_INFO::wProcessorArchitecture field returned by GetSystemInfo.
Definition
system.cpp:141
owl::TSystem::GetMajorVersion
static uint GetMajorVersion()
Definition
system.cpp:81
owl::TSystem::GetProcessorArchitectureName
static tstring GetProcessorArchitectureName(uint architecture)
Returns the description string for the given processor architecture.
Definition
system.cpp:151
owl::TSystem::GetVersionInfo
static auto GetVersionInfo() -> TModuleVersionInfo &
Returns the product version for "kernel32.dll".
Definition
system.cpp:75
owl::TSystem::GetProcessorInfo
static const TProcessorInfo & GetProcessorInfo()
Returns info for the current processor.
Definition
system.cpp:177
owl::TSystem::GetProductInfo
static uint GetProductInfo()
Retrieves the product edition for the operating system on the local computer, and maps the type to th...
Definition
system.cpp:60
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
owl::tstring
std::string tstring
Definition
defs.h:79
owl::uint
unsigned int uint
Definition
number.h:25
defs.h
General definitions used by all ObjectWindows programs.
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
posclass.h
preclass.h
wsysinc.h
Includes windowing system headers, with necessary macros defined.
include
owl
system.h
Generated by
1.18.0