DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
OperatingSystem.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include "Common.h"
9#include "System/Object.h"
10#include "System/String.h"
11#include "System/Version.h"
12
13namespace DotNetDupe
14{
15 namespace System
16 {
19 enum class PlatformID
20 {
21 Win32S = 0,
23 Win32NT = 2,
24 WinCE = 3,
25 Unix = 4,
26 Xbox = 5
27 };
28
33 class OperatingSystem : public Object
34 {
35 public:
39 DOTNETDUPE_API OperatingSystem(PlatformID platform, const Version& version);
40
44
47 DOTNETDUPE_API const Version& GetVersion() const;
48
52
56
59 DOTNETDUPE_API static bool IsWindows();
60
63 DOTNETDUPE_API static bool IsLinux();
64
65 private:
66 PlatformID m_ePlatform;
67 Version m_vVersion;
68 };
69 }
70}
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Base object class for DotNetDupe mirroring .NET System.Object.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Represents the version number of an assembly, operating system, or application component.
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
static bool IsWindows()
Indicates whether the current application is running on Windows.
const Version & GetVersion() const
Gets a Version object that identifies the operating system.
String GetVersionString() const
Gets the concatenated string representation of the platform identifier and version.
static bool IsLinux()
Indicates whether the current application is running on Linux.
OperatingSystem(PlatformID platform, const Version &version)
Initializes a new instance of the OperatingSystem class, using the specified platform identifier and ...
String GetServicePack() const
Gets the service pack version represented by this OperatingSystem object.
PlatformID GetPlatform() const
Gets a PlatformID value that identifies the operating system platform.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition String.h:74
Represents the version number for an assembly, operating system, or component.
Definition Version.h:21
PlatformID
Identifies the operating system, or platform, supported by an assembly.
@ Unix
Unix or Linux platform.
@ Win32NT
Windows NT, 2000, XP, Vista, 7, 8, 10, 11, or Windows Server.
@ Win32Windows
Windows 95, Windows 98, or Windows Me.
@ Win32S
Win32s operating system.