43#include <StormByte/byte_size.hxx>
44#include <StormByte/error.hxx>
45#include <StormByte/safe/string.hxx>
49#include <system_error>
276 static constexpr const char*
Name =
"StormByte.System.Host";
288 return "Host operation failed";
290 return "Host property is not supported";
292 return "Host property is unavailable";
294 return "Host property access denied";
296 return "Unknown Host error";
314 return std::error_code(
static_cast<int>(e),
host_category());
323 struct is_error_code_enum<
StormByte::System::Host::Error>: true_type {};
StormByte::Safe::String Model() const
Processor brand text.
unsigned LogicalProcessors() const noexcept
Logical processor count visible to the OS.
~CPU()=default
Destroy a query object.
unsigned PhysicalCores() const
Physical core count across processor packages.
StormByte::Safe::String Manufacturer() const
Processor vendor identifier, when exposed by the OS.
CPU()=default
Construct a stateless query object without probing.
CPU & operator=(const CPU &other)=default
Copy-assign a query object.
CPU & operator=(CPU &&other) noexcept=default
Move-assign a query object.
CPU(const CPU &other)=default
Copy a query object.
StormByte::Safe::String Architecture() const
Native instruction-set name.
CPU(CPU &&other) noexcept=default
Move a query object.
unsigned Bitness() const noexcept
Pointer width of this process, not CPU capability.
Motherboard & operator=(Motherboard &&other) noexcept=default
Move-assign a query object.
StormByte::Safe::String Manufacturer() const
Board manufacturer supplied by firmware.
StormByte::Safe::String Revision() const
Board revision supplied by firmware.
Motherboard & operator=(const Motherboard &other)=default
Copy-assign a query object.
Motherboard(const Motherboard &other)=default
Copy a query object.
Motherboard(Motherboard &&other) noexcept=default
Move a query object.
~Motherboard()=default
Destroy a query object.
Motherboard()=default
Construct a stateless query object without probing.
StormByte::Safe::String Model() const
Board product identifier.
Identity and capacity of this machine.
Definition host.hxx:64
bool Name(StormByte::Safe::String &name)
Host name of this machine.
StormByte::ByteSize AvailableMemory()
Currently available physical memory.
StormByte::ByteSize PageSize()
System page size.
Error
Host enumerators.
Definition host.hxx:71
@ Unavailable
The platform did not supply this property.
Definition host.hxx:75
@ Success
No error.
Definition host.hxx:72
@ NotSupported
No native source for this property.
Definition host.hxx:74
@ Failed
The platform call failed.
Definition host.hxx:73
@ Permission
Access to this property was denied.
Definition host.hxx:76
StormByte::Safe::String OS()
Operating system brand and version.
StormByte::Error::Fault LastError() noexcept
Last Host error on this thread.
StormByte::Safe::String Kernel()
Kernel identification.
StormByte::ByteSize PhysicalMemory()
Installed physical memory.
System module of the StormByte suite.
Definition device.hxx:59
STORMBYTE_FORCE_INLINE std::error_code make_error_code(Device::Error e) noexcept
Builds an std::error_code from Device::Error.
Definition device.hxx:341
const StormByte::Error::Category< Host::Error > & host_category() noexcept
Category singleton for Host::Error.
static constexpr const char * Name
Stable category tag.
Definition host.hxx:276
static STORMBYTE_FORCE_INLINE std::string Message(StormByte::System::Host::Error e)
Text for one Host enumerator.
Definition host.hxx:283
#define STORMBYTE_SYSTEM_PUBLIC
Definition visibility.h:53