xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <operating_system.h>
Represents information about an operating system, such as the version and platform identifier. This class cannot be inherited.
Inherits xtd::object.
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. | |
operating_system (xtd::platform_id platform, const xtd::version &version, const xtd::ustring &service_pack) | |
Initializes a new instance of the operating_system class, using the specified platform identifier value and version object. | |
operating_system (xtd::platform_id platform, const xtd::version &version, const xtd::ustring &service_pack, const xtd::ustring &desktop_environment) | |
Initializes a new instance of the operating_system class, using the specified platform identifier value and version object. | |
operating_system (xtd::platform_id platform, const xtd::version &version, const xtd::ustring &service_pack, const xtd::ustring &desktop_environment, bool is_64_bit) | |
Initializes a new instance of the operating_system class, using the specified platform identifier value and version object. | |
xtd::ustring | desktop_environment () const |
Gets the desktop environment . | |
bool | is_64_bit () const noexcept |
Determines whether the current operating system is a 64-bit operating system. | |
bool | is_linux_platform () const noexcept |
Determines whether the current platform is Unix family. | |
bool | is_macos_platform () const noexcept |
Determines whether the current platform is macOS family. | |
bool | is_windows_platform () const noexcept |
Determines whether the current platform is Windows family. | |
xtd::ustring | name () const noexcept |
Gets the concatenated string representation of the platform identifier. | |
xtd::platform_id | platform () const noexcept |
Gets a xtd::platform_id enumeration value that identifies the operating system platform. | |
xtd::ustring | service_pack () const noexcept |
Gets the service pack version represented by this operating_system object. | |
xtd::ustring | to_string () const noexcept |
Converts the value of this operating_system object to its equivalent string representation. | |
const xtd::version & | version () const noexcept |
Gets a xtd::version object that identifies the operating system. | |
xtd::ustring | 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. | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const |
Gets the type of the current instance. | |
virtual xtd::ustring | to_string () const noexcept |
Returns a std::string that represents the current object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
|
inline |
Initializes a new instance of the operating_system class, using the specified platform identifier value and version object.
platform | One of the xtd::platform_id values that indicates the operating system platform. |
version | A Version object that indicates the version of the operating system. |
ArgumentNullException | version is null. |
ArgumentException | platform is not a xtd::platform_id enumeration value. |
|
inline |
Initializes a new instance of the operating_system class, using the specified platform identifier value and version object.
platform | One of the xtd::platform_id values that indicates the operating system platform. |
version | A Version object that indicates the version of the operating system. |
service_pack | A string, such as "Service Pack 3", that represent the service pack. If no Service Pack has been installed, the string must be empty. |
ArgumentNullException | version is null. |
ArgumentException | platform is not a xtd::platform_id enumeration value. |
|
inline |
Initializes a new instance of the operating_system class, using the specified platform identifier value and version object.
platform | One of the xtd::platform_id values that indicates the operating system platform. |
version | A Version object that indicates the version of the operating system. |
service_pack | A string, such as "Service Pack 3", that represent the service pack. If no Service Pack has been installed, the string must be empty. |
desktop_environment | A string, such as "gnome", "kde", "windows", "macos". |
ArgumentNullException | version is null. |
ArgumentException | platform is not a xtd::platform_id enumeration value. |
|
inline |
Initializes a new instance of the operating_system class, using the specified platform identifier value and version object.
platform | One of the xtd::platform_id values that indicates the operating system platform. |
version | A Version object that indicates the version of the operating system. |
service_pack | A string, such as "Service Pack 3", that represent the service pack. If no Service Pack has been installed, the string must be empty. |
desktop_environment | A string, such as "gnome", "kde", "windows", "macos". |
ArgumentNullException | version is null. |
ArgumentException | platform is not a xtd::platform_id enumeration value. |
|
inline |
Gets the desktop environment .
|
inlinenoexcept |
Determines whether the current operating system is a 64-bit operating system.
|
inlinenoexcept |
Determines whether the current platform is Unix family.
|
inlinenoexcept |
Determines whether the current platform is macOS family.
|
inlinenoexcept |
Determines whether the current platform is Windows family.
|
inlinenoexcept |
Gets the concatenated string representation of the platform identifier.
|
inlinenoexcept |
Gets a xtd::platform_id enumeration value that identifies the operating system platform.
|
inlinenoexcept |
Gets the service pack version represented by this operating_system object.
|
inlinevirtualnoexcept |
Converts the value of this operating_system object to its equivalent string representation.
Reimplemented from xtd::object.
|
inlinenoexcept |
Gets a xtd::version object that identifies the operating system.
|
inlinenoexcept |
Gets the concatenated string representation of the platform identifier, version, and service pack that are currently installed on the operating system.