xtd - Reference Guide  0.1.0
Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.
xtd::operating_system Class Referencefinal

Represents information about an operating system, such as the version and platform identifier. This class cannot be inherited. More...

#include <operating_system.h>

Public Member Functions

 operating_system (xtd::platform_id platform, const xtd::version &version)
 Initializes a new instance of the operating_system class, using the specified platform identifier value and version object. More...
 
 operating_system (xtd::platform_id platform, const xtd::version &version, const std::string &service_pack)
 Initializes a new instance of the operating_system class, using the specified platform identifier value and version object. More...
 
 operating_system (xtd::platform_id platform, const xtd::version &version, const std::string &service_pack, const std::string &desktop_environment)
 Initializes a new instance of the operating_system class, using the specified platform identifier value and version object. More...
 
std::string desktop_environment () const
 Gets the desktop environment . More...
 
bool is_linux_platform () const noexcept
 Determines whether the current platform is Unix family. More...
 
bool is_macos_platform () const noexcept
 Determines whether the current platform is macOS family. More...
 
bool is_windows_platform () const noexcept
 Determines whether the current platform is Windows family. More...
 
xtd::platform_id platform () const noexcept
 Gets a System::xtd::platform_id enumeration value that identifies the operating system platform. More...
 
std::string service_pack () const noexcept
 Gets the service pack version represented by this operating_system object. More...
 
std::string to_string () const noexcept
 Converts the value of this operating_system object to its equivalent string representation. More...
 
const xtd::versionversion () const noexcept
 Gets a System::Version object that identifies the operating system. More...
 
std::string version_string () const noexcept
 Gets the concatenated string representation of the platform identifier, version, and service pack that are currently installed on the operating system. More...
 

Detailed Description

Represents information about an operating system, such as the version and platform identifier. This class cannot be inherited.

Remarks
The operating_system class contains information about an operating system.
For information about the current runtime operating system, retrieve the operating_system object returned by the xtd::environment::os_version method.
By design, the operating_system class is not a general purpose means of describing an operating system, and you cannot derive a more inclusive type from the operating_system class. If you need a type to contain other information about an operating system, create your own type, then include a field of type operating_system and any additional fields or methods that you require.

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