xtd 0.2.0
Loading...
Searching...
No Matches
compiler.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "build_type.hpp"
6#include "compiler_id.hpp"
7#include "object.hpp"
8#include "string.hpp"
9#include "version.hpp"
10#include <vector>
11
13namespace xtd {
27 class compiler final : public object {
28 public:
30
39
41 compiler() = default;
42 compiler(const compiler&) = default;
43 compiler& operator =(const compiler&) = default;
45
47
51 [[nodiscard]] auto additional_information() const noexcept -> xtd::string;
52
55 [[nodiscard]] auto build_type() const noexcept -> xtd::build_type;
56
59 [[nodiscard]] auto compiler_id() const noexcept -> xtd::compiler_id;
60
63 [[nodiscard]] auto is_build_type_debug() const noexcept -> bool;
64
67 [[nodiscard]] auto is_64_bit() noexcept -> bool;
68
71 [[nodiscard]] auto name() const noexcept -> xtd::string;
72
75 [[nodiscard]] auto version_string() const noexcept -> xtd::string;
76
79 [[nodiscard]] auto version() const noexcept -> const xtd::version&;
81
83
87 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::size override;
88
91 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
93
94 private:
95 [[nodiscard]] auto get_apple_clang_additional_information() const noexcept -> xtd::string;
96 [[nodiscard]] auto get_compiler_version_string(const xtd::string& compiler_name) const noexcept -> xtd::string;
97 [[nodiscard]] auto get_msvc_additional_information() const noexcept -> xtd::string;
98
99 xtd::compiler_id compiler_id_ = xtd::compiler_id::unknown;
100 xtd::version version_;
101 xtd::build_type build_type_ = xtd::build_type::debug;
102 bool is_64_bit_ = false;
103 };
104}
Contains xtd::build_type enum class.
auto version() const noexcept -> const xtd::version &
Gets compiler version.
auto version_string() const noexcept -> xtd::string
Gets compiler version string.
compiler(xtd::compiler_id compiler_id, const xtd::version &version, xtd::build_type build_type, bool is_64_bit)
Initialise a new xtd::compiler class.
auto to_string() const noexcept -> xtd::string override
Converts the value of this operating_system object to its equivalent string representation.
auto get_hash_code() const noexcept -> xtd::size override
Serves as a hash function for a particular type.
auto additional_information() const noexcept -> xtd::string
Gets additional information.
auto is_64_bit() noexcept -> bool
Gets is 64 bits.
auto build_type() const noexcept -> xtd::build_type
Gets the build type.
auto is_build_type_debug() const noexcept -> bool
Gets build type is debug.
auto compiler_id() const noexcept -> xtd::compiler_id
Gets the compiler id.
auto name() const noexcept -> xtd::string
Gets compiler name.
object()=default
Create a new instance of the ultimate base class object.
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition version.hpp:115
Contains xtd::compiler_id enum class.
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
build_type
Identifies the build type.
Definition build_type.hpp:20
compiler_id
Identifies the compiler, supported by an assembly.
Definition compiler_id.hpp:20
@ debug
Build type debug.
Definition build_type.hpp:22
@ unknown
The processor architecture is unknown.
Definition architecture_id.hpp:22
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.
Contains xtd::string alias.
Contains xtd::version class.