#include "OperatingSystemCPU.h"
Represents an operating system CPU.
The UOperatingSystemCPU class is a blueprintable class that represents the CPU of an operating system. It inherits from the UOperatingSystemBaseHardware class.
◆ UOperatingSystemCPU()
UOperatingSystemCPU::UOperatingSystemCPU |
( |
| ) |
|
◆ CreateCPU()
Creates a CPU for an operating system.
This method creates and returns a CPU object for an operating system. The CPU is created with the specified owning motherboard and error output parameter.
- Parameters
-
OwningMotherboard | The owning motherboard for the CPU. |
OutError | The error output parameter to capture any error that occurs during CPU creation. |
- Returns
- The created CPU object, or nullptr if an error occurred during creation.
◆ OnValidate()
bool UOperatingSystemCPU::OnValidate |
( |
FGenericError & | OutError | ) |
const |
|
overrideprotectedvirtual |
Validates the operating system CPU.
This method validates the operating system CPU by performing several checks. It checks if the CPU is using the correct hardware tag, if it is compatible with the motherboard's CPU socket, if the speed is within the valid range, and if the CPU speed is compatible with the maximum CPU speed supported by the motherboard.
- Parameters
-
OutError | The output parameter to capture any validation errors that occur. |
- Returns
- true if the CPU is valid, false otherwise.
Reimplemented from UOperatingSystemBaseHardware.
◆ ParentMotherboard
The ParentMotherboard variable represents a weak pointer to an instance of the UOperatingSystemMBB class.
◆ SocketTag
FGameplayTag UOperatingSystemCPU::SocketTag |
|
protected |
Represents the socket tag for the operating system CPU.
The socket tag is categorized under the OperatingSystem.Hardware.CPU.Socket category.
◆ Speed
float UOperatingSystemCPU::Speed |
|
protected |
Represents the speed of the operating system's CPU.
The speed of the CPU is measured in gigahertz (GHz) and can range from 1 to 5 GHz. It is used to determine the processing power of the CPU and you can use it to affect the overall performance of the operating system although this is not implemented natively.
The documentation for this class was generated from the following files: