xtd 1.0.0
Loading...
Searching...
No Matches
xtd::processor Class Referencefinal
Inheritance diagram for xtd::processor:
xtd::object

Definition

Represents information about a processor, such as the architecture. This class cannot be inherited.

Namespace
xtd
Library
xtd.core

Public Constructors

 processor (xtd::architecture_id architecture, bool is_64_bit, uint32 core_count)
 Initialise a new instance oof xtd::processor class.

Public Properties

auto architecture () const noexcept -> xtd::architecture_id
 Gets a xtd::platform_id enumeration value that identifies the operating system platform.
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 is_64_bit () const noexcept -> bool
 Determines whether the current operating system is a 64-bit operating system.
auto name () const noexcept -> xtd::string
 Gets the concatenated string representation of the platform identifier.

Public Methods

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.

Additional Inherited Members

 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto equals (const object &obj) const noexcept -> bool
 Determines whether the specified object is equal to the current object.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.

Constructor & Destructor Documentation

◆ processor()

xtd::processor::processor ( xtd::architecture_id architecture,
bool is_64_bit,
uint32 core_count )

Initialise a new instance oof xtd::processor class.

Parameters
architectureOne of xtd::architectuure_id valuues.
is_64_bittrue if 64 bit architecture; otherwise false.
core_countTHe number of cores.

Member Function Documentation

◆ architecture()

auto xtd::processor::architecture ( ) const -> xtd::architecture_id
nodiscardnoexcept

Gets a xtd::platform_id enumeration value that identifies the operating system platform.

Returns
xtd::platform_id One of the xtd::platform_id values.

◆ architecture_string()

auto xtd::processor::architecture_string ( ) const -> xtd::string
nodiscardnoexcept

Gets architecture string.

Returns
The architecture string.

◆ core_count()

auto xtd::processor::core_count ( ) const -> xtd::uint32
nodiscardnoexcept

Gets the number of processors on the current machine.

Returns
The 32-bit unsigned integer that specifies the number of processors on the current machine. There is no default. If the current machine contains multiple processor groups, this property returns the number of logical processors that are available for use.

◆ is_64_bit()

auto xtd::processor::is_64_bit ( ) const -> bool
nodiscardnoexcept

Determines whether the current operating system is a 64-bit operating system.

Returns
true if the operating system is 64-bit; otherwise, false.

◆ name()

auto xtd::processor::name ( ) const -> xtd::string
nodiscardnoexcept

Gets the concatenated string representation of the platform identifier.

Returns
The string representation of the values returned by the platform.

◆ get_hash_code()

auto xtd::processor::get_hash_code ( ) const -> xtd::usize
nodiscardoverridevirtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

Reimplemented from xtd::object.

◆ to_string()

auto xtd::processor::to_string ( ) const -> xtd::string
nodiscardoverridevirtualnoexcept

Converts the value of this processor object to its equivalent string representation.

Returns
The string representation of the values returned by the platform, version, and service_pack methods.

Reimplemented from xtd::object.


The documentation for this class was generated from the following file: