xtd 0.2.0
Loading...
Searching...
No Matches
distribution.h
Go to the documentation of this file.
1
4#pragma once
5#include "optional.h"
6#include "object.h"
7#include "platform_id.h"
8#include "uri.h"
9#include "string.h"
10#include "version.h"
11#include <map>
12#include <vector>
13
15namespace xtd {
29 class distribution final : public object {
30 public:
31 using id_collection = std::vector<xtd::string>;
33
47
49 distribution() = default;
50 distribution(const distribution&) = default;
51 distribution& operator =(const distribution&) = default;
53
55
59 const xtd::uri& bug_repport() const noexcept;
60
63 const xtd::string& code_name() const noexcept;
64
67 const xtd::string& description() const noexcept;
68
71 const xtd::uri& home() const noexcept;
72
75 const xtd::string& id() const noexcept;
76
79 const id_collection& like_ids() const noexcept;
80
83 const xtd::string& name() const noexcept;
84
87 const xtd::version& version() const noexcept;
88
91 const xtd::string& version_string() const noexcept;
93
95
99 xtd::string to_string() const noexcept override;
101
102 private:
103 xtd::string name_;
104 xtd::version version_;
105 xtd::string code_name_;
106 xtd::string description_;
107 xtd::string id_;
108 id_collection like_ids_;
109 xtd::string version_string_;
110 xtd::uri home_;
111 xtd::uri bug_repport_;
112 };
113}
Represents text as a sequence of character units.
Definition basic_string.h:79
Represents information about an operating system distribution, such as the version and name....
Definition distribution.h:29
const xtd::uri & bug_repport() const noexcept
Gets operating system distribution bug repport url.
xtd::string to_string() const noexcept override
Converts the value of this distribution object to its equivalent string representation.
const xtd::string & version_string() const noexcept
Gets operating system distribution version string.
const xtd::uri & home() const noexcept
Gets operating system distribution home url.
const xtd::string & name() const noexcept
Gets operating system distribution name. For example "Ubuntu".
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,...
const xtd::string & code_name() const noexcept
Gets operating system distribution code name. For example "jammy" is the code name of Ubuntu 22....
const id_collection & like_ids() const noexcept
Gets operating system distribution like identifiers array.
const xtd::string & description() const noexcept
Gets operating system distribution description. For example "Ubuntu 22.04.2 LTS".
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition uri.h:103
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition version.h:114
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::object class.
Contains xtd::optional type.
Contains xtd::platform_id enum class.
Contains xtd::string alias.
Contains xtd::uri class.
Contains xtd::version class.