xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
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
12
namespace
xtd
{
19
class
processor
final :
public
object
{
20
public
:
22
28
processor
(
xtd::architecture_id
architecture
,
bool
is_64_bit
,
xtd::usize
core_count
);
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
::
usize
;
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:
74
xtd
::
architecture_id
architecture_ =
xtd
::
architecture_id
::unknown;
75
bool
is_64_bit_ = false;
76
xtd
::
usize
core_count_ = 1;
77
mutable
xtd
::
string
architecture_string_;
78
};
79
}
architecture_id.hpp
Contains xtd::architecture_id enum class.
xtd::object::object
object()=default
Create a new instance of the ultimate base class object.
xtd::processor::architecture
auto architecture() const noexcept -> xtd::architecture_id
Gets a xtd::platform_id enumeration value that identifies the operating system platform.
xtd::processor::core_count
auto core_count() const noexcept -> xtd::usize
Gets the number of processors on the current machine.
xtd::processor::get_hash_code
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
xtd::processor::to_string
auto to_string() const noexcept -> xtd::string override
Converts the value of this processor object to its equivalent string representation.
xtd::processor::architecture_string
auto architecture_string() const noexcept -> xtd::string
Gets architecture string.
xtd::processor::processor
processor(xtd::architecture_id architecture, bool is_64_bit, xtd::usize core_count)
Initialise a new instance oof xtd::processor class.
xtd::processor::name
auto name() const noexcept -> xtd::string
Gets the concatenated string representation of the platform identifier.
xtd::processor::is_64_bit
auto is_64_bit() const noexcept -> bool
Determines whether the current operating system is a 64-bit operating system.
xtd::usize
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition
usize.hpp:22
xtd::architecture_id
architecture_id
Identifies the processor architecture, supported by an assembly.
Definition
architecture_id.hpp:20
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
object.hpp
Contains xtd::object class.
string.hpp
Contains xtd::string alias.
Generated on
for xtd by
Gammasoft
. All rights reserved.