xtd 0.2.0
Loading...
Searching...
No Matches
processor.h
Go to the documentation of this file.
1
4#pragma once
5#include "architecture_id.h"
6#include "object.h"
7#include "string.h"
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
43
46 xtd::string architecture_string() const noexcept;
47
50 uint32 core_count() const noexcept;
51
54 bool is_64_bit() const noexcept;
55
58 xtd::string name() const noexcept;
60
62
66 xtd::string to_string() const noexcept override;
68
69 private:
71 bool is_64_bit_ = false;
72 uint32 core_count_ = 1;
73 mutable xtd::string architecture_string_;
74 };
75}
Contains xtd::architecture_id enum class.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
Represents information about a processor, such as the architecture. This class cannot be inherited.
Definition processor.h:19
processor(xtd::architecture_id architecture, bool is_64_bit, uint32 core_count)
Initialise a new instance oof xtd::processor class.
xtd::architecture_id architecture() const noexcept
Gets a xtd::platform_id enumeration value that identifies the operating system platform.
uint32 core_count() const noexcept
Gets the number of processors on the current machine.
xtd::string architecture_string() const noexcept
Gets architecture string.
xtd::string name() const noexcept
Gets the concatenated string representation of the platform identifier.
xtd::string to_string() const noexcept override
Converts the value of this processor object to its equivalent string representation.
bool is_64_bit() const noexcept
Determines whether the current operating system is a 64-bit operating system.
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.h:23
architecture_id
Identifies the processor architecture, supported by an assembly.
Definition architecture_id.h:20
@ unknown
The processor architecture is unknown.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::object class.
Contains xtd::string alias.