xtd 0.2.0
Loading...
Searching...
No Matches
xtd::distribution Class Referencefinal
Inheritance diagram for xtd::distribution:
xtd::object

Definition

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

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

Public Types

using id_collection = std::vector< xtd::string >
 

Public Constructors

 distribution (const xtd::string &name, const xtd::version &version, const xtd::string &code_name, const xtd::string &description, const xtd::string &id, const id_collection &like_ids, const xtd::string &version_string, const xtd::uri &home, const xtd::uri &bug_repport)
 Initializes a new instance of the distribution class, using the specified name, version, code name, decription, identifier, like identifiers array, version string, home url and bug repport url.
 

Public Properties

const xtd::uribug_repport () const noexcept
 Gets operating system distribution bug repport url.
 
const xtd::stringcode_name () const noexcept
 Gets operating system distribution code name. For example "jammy" is the code name of Ubuntu 22.04.
 
const xtd::stringdescription () const noexcept
 Gets operating system distribution description. For example "Ubuntu 22.04.2 LTS".
 
const xtd::urihome () const noexcept
 Gets operating system distribution home url.
 
const xtd::stringid () const noexcept
 Gets operating system distribution identifier.
 
const id_collection & like_ids () const noexcept
 Gets operating system distribution like identifiers array.
 
const xtd::stringname () const noexcept
 Gets operating system distribution name. For example "Ubuntu".
 
const xtd::versionversion () const noexcept
 Gets a xtd::version object that identifies the operating system distribution. For example xtd::version(22, 4).
 
const xtd::stringversion_string () const noexcept
 Gets operating system distribution version string.
 

Public Methods

xtd::string to_string () const noexcept override
 Converts the value of this distribution object to its equivalent string representation.
 

Additional Inherited Members

- 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.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Constructor & Destructor Documentation

◆ distribution()

xtd::distribution::distribution ( const xtd::string name,
const xtd::version version,
const xtd::string code_name,
const xtd::string description,
const xtd::string id,
const id_collection &  like_ids,
const xtd::string version_string,
const xtd::uri home,
const xtd::uri bug_repport 
)

Initializes a new instance of the distribution class, using the specified name, version, code name, decription, identifier, like identifiers array, version string, home url and bug repport url.

Parameters
nameThe operating system distribution name.
versionA Version object that indicates the version of the operating system distribution.
code_nameThe operating system distribution code name.
descriptionThe operating system distribution description.
idThe operating system distribution identifier.
like_idsThe operating system distribution like identifiers array.
version_stringThe operating system distribution version string.
homeThe operating system distribution home url.
bug_repportThe operating system distribution bug report url.

Member Function Documentation

◆ bug_repport()

const xtd::uri & xtd::distribution::bug_repport ( ) const
noexcept

Gets operating system distribution bug repport url.

Returns
The operating system distribution bug repport url.

◆ code_name()

const xtd::string & xtd::distribution::code_name ( ) const
noexcept

Gets operating system distribution code name. For example "jammy" is the code name of Ubuntu 22.04.

Returns
The operating system distribution code name.

◆ description()

const xtd::string & xtd::distribution::description ( ) const
noexcept

Gets operating system distribution description. For example "Ubuntu 22.04.2 LTS".

Returns
The operating system distribution description.

◆ home()

const xtd::uri & xtd::distribution::home ( ) const
noexcept

Gets operating system distribution home url.

Returns
The operating system distribution home url.

◆ id()

const xtd::string & xtd::distribution::id ( ) const
noexcept

Gets operating system distribution identifier.

Returns
The operating system distribution identifier.

◆ like_ids()

const id_collection & xtd::distribution::like_ids ( ) const
noexcept

Gets operating system distribution like identifiers array.

Returns
The operating system distribution like identifiers array.

◆ name()

const xtd::string & xtd::distribution::name ( ) const
noexcept

Gets operating system distribution name. For example "Ubuntu".

Returns
The operating system distribution name.

◆ version()

const xtd::version & xtd::distribution::version ( ) const
noexcept

Gets a xtd::version object that identifies the operating system distribution. For example xtd::version(22, 4).

Returns
Version A Version object that describes the major version, minor version, build, and revision numbers for the operating system distribution.

◆ version_string()

const xtd::string & xtd::distribution::version_string ( ) const
noexcept

Gets operating system distribution version string.

Returns
The operating system distribution version string.

◆ to_string()

xtd::string xtd::distribution::to_string ( ) const
overridevirtualnoexcept

Converts the value of this distribution object to its equivalent string representation.

Returns
The string representation of the value returned by the description property.

Reimplemented from xtd::object.


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