xtd 0.2.0
xtd::processor Class Referencefinal

Definition

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

Namespace
xtd
Library
xtd.core

Constructors

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

Properties

xtd::architecture_id architecture () const noexcept
 Gets a xtd::platform_id enumeration value that identifies the operating system platform. More...
 
xtd::ustring architecture_string () const noexcept
 Gets architecture string. More...
 
uint32 core_count () const noexcept
 Gets the number of processors on the current machine. More...
 
bool is_64_bit () const noexcept
 Determines whether the current operating system is a 64-bit operating system. More...
 
xtd::ustring name () const noexcept
 Gets the concatenated string representation of the platform identifier. More...
 

Methods

xtd::ustring to_string () const noexcept override
 Converts the value of this processor object to its equivalent string representation. More...
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

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()

xtd::architecture_id xtd::processor::architecture ( ) const
noexcept

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()

xtd::ustring xtd::processor::architecture_string ( ) const
noexcept

Gets architecture string.

Returns
The architecture string.

◆ core_count()

uint32 xtd::processor::core_count ( ) const
noexcept

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()

bool xtd::processor::is_64_bit ( ) const
noexcept

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

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

◆ name()

xtd::ustring xtd::processor::name ( ) const
noexcept

Gets the concatenated string representation of the platform identifier.

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

◆ to_string()

xtd::ustring xtd::processor::to_string ( ) const
overridevirtualnoexcept

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: