OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
23namespace owl {
24
25class 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//
35class _OWLCLASS TSystem // final
36{
37public:
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 //
57 {
58 public:
59
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
105private:
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
TModuleVersionInfo provides access to a TModule's VERSIONINFO resource.
Definition module.h:182
Encapsulates information about a processor core.
Definition system.h:57
Provides information on OS relevant information.
Definition system.h:36
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
std::string tstring
Definition defs.h:79
unsigned int uint
Definition number.h:25
General definitions used by all ObjectWindows programs.
#define _OWLCLASS
Definition defs.h:338
Includes windowing system headers, with necessary macros defined.