Operating System Simulator Plugin  3.5.1
Unreal Engine plugin that simulates an Operating System Environment
Loading...
Searching...
No Matches
UOperatingSystemCPU Class Reference

#include "OperatingSystemCPU.h"

Inheritance diagram for UOperatingSystemCPU:
[legend]
Collaboration diagram for UOperatingSystemCPU:
[legend]

Public Member Functions

 UOperatingSystemCPU ()
 
- Public Member Functions inherited from UOperatingSystemBaseHardware
 UOperatingSystemBaseHardware ()
 
FText GetHardwareName () const
 
FText GetHardwareMadeBy () const
 
FText GetModelNumber () const
 
FString GetHardwareNameAsString () const
 Returns the name of the hardware as a string.
 
FGameplayTag GetHardwareTag () const
 Returns the hardware tag associated with the hardware object.
 

Static Public Member Functions

static UOperatingSystemCPUCreateCPU (UOperatingSystemMBB *OwningMotherboard, FGenericError &OutError)
 

Protected Member Functions

virtual bool OnValidate (FGenericError &OutError) const override
 
- Protected Member Functions inherited from UOperatingSystemBaseHardware
bool Validate (FGenericError &OutError) const
 Validates the current state of the operating system hardware object.
 
bool K2_OnValidate (FGenericError &OutError) const
 

Protected Attributes

float Speed
 
FGameplayTag SocketTag
 
TWeakObjectPtr< UOperatingSystemMBBParentMotherboard
 
- Protected Attributes inherited from UOperatingSystemBaseHardware
FText Name
 
FText MadeBy
 
FText ModelNumber
 
FGameplayTag HardwareTag
 
bool bHasBlueprintValidateFunction
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UOperatingSystemCPU()

UOperatingSystemCPU::UOperatingSystemCPU ( )

Member Function Documentation

◆ CreateCPU()

UOperatingSystemCPU * UOperatingSystemCPU::CreateCPU ( UOperatingSystemMBB * OwningMotherboard,
FGenericError & OutError )
static

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
OwningMotherboardThe owning motherboard for the CPU.
OutErrorThe 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.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
OutErrorThe output parameter to capture any validation errors that occur.
Returns
true if the CPU is valid, false otherwise.

Reimplemented from UOperatingSystemBaseHardware.

Member Data Documentation

◆ ParentMotherboard

TWeakObjectPtr<UOperatingSystemMBB> UOperatingSystemCPU::ParentMotherboard
protected

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: