xtd 1.0.0
Loading...
Searching...
No Matches
processor.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "architecture_id.hpp"
6#include "object.hpp"
7#include "string.hpp"
8#include <map>
9#include <vector>
10
12namespace xtd {
19 class processor final : public object {
20 public:
22
30
32 processor() = default;
33 processor(const processor&) = default;
34 processor& operator =(const processor&) = default;
36
38
42 [[nodiscard]] auto architecture() const noexcept -> xtd::architecture_id;
43
46 [[nodiscard]] auto architecture_string() const noexcept -> xtd::string;
47
50 [[nodiscard]] auto core_count() const noexcept -> xtd::uint32;
51
54 [[nodiscard]] auto is_64_bit() const noexcept -> bool;
55
58 [[nodiscard]] auto name() const noexcept -> xtd::string;
60
62
66 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::usize override;
67
70 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
72
73 private:
75 bool is_64_bit_ = false;
76 uint32 core_count_ = 1;
77 mutable xtd::string architecture_string_;
78 };
79}
Contains xtd::architecture_id enum class.
object()=default
Create a new instance of the ultimate base class object.
processor(xtd::architecture_id architecture, bool is_64_bit, uint32 core_count)
Initialise a new instance oof xtd::processor class.
auto architecture() const noexcept -> xtd::architecture_id
Gets a xtd::platform_id enumeration value that identifies the operating system platform.
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
auto to_string() const noexcept -> xtd::string override
Converts the value of this processor object to its equivalent string representation.
auto architecture_string() const noexcept -> xtd::string
Gets architecture string.
auto core_count() const noexcept -> xtd::uint32
Gets the number of processors on the current machine.
auto name() const noexcept -> xtd::string
Gets the concatenated string representation of the platform identifier.
auto is_64_bit() const noexcept -> bool
Determines whether the current operating system is a 64-bit operating system.
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
architecture_id
Identifies the processor architecture, supported by an assembly.
Definition architecture_id.hpp:20
@ 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.