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

#include "OperatingSystemMBB.h"

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

Public Member Functions

 UOperatingSystemMBB ()
 
void ClockTick () const
 Performs a clock tick on the operating system motherboard.
 
bool TryOpenBIOS ()
 
UOperatingSystemBaseDeviceGetParentDevice () const
 
UOperatingSystemBIOSGetBIOS () const
 Returns the BIOS of the operating system motherboard. This method retrieves and returns the BIOS of the operating system motherboard.
 
bool IsCpuSocketSupported (const FGameplayTag &CpuSocketTag) const
 Checks if the provided CPU socket tag is supported by the operating system motherboard. The IsCpuSocketSupported method checks if the provided CPU socket tag is supported by the operating system motherboard. It returns true if the tag is supported, false otherwise.
 
bool CanOpenBIOS () const
 
FORCEINLINE float GetMaxCpuSpeed () const
 Get the maximum CPU speed of the operating system motherboard.
 
FORCEINLINE bool IsRamSizeSupported (const EOperatingSystemCommonSizes TestSize) const
 Check if a given RAM size is supported by the operating system motherboard.
 
- 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 UOperatingSystemMBBCreateMotherboard (UOperatingSystemBaseDevice *OwningDevice, FGenericError &OutError)
 Creates a motherboard for the given owning device.
 

Protected Member Functions

virtual bool OnValidate (FGenericError &OutError) const override
 Validates the operating system motherboard.
 
- 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

TSoftClassPtr< UOperatingSystemBIOSBiosClass
 
float MaxCpuSpeed
 
FGameplayTagContainer SupportedCpuSockets
 
EOperatingSystemCommonSizes MaxSupportedRamSize
 
FGameplayTagContainer SupportedDevices
 
TObjectPtr< UOperatingSystemBIOSBIOS
 
TWeakObjectPtr< UOperatingSystemBaseDeviceParentDevice
 
- Protected Attributes inherited from UOperatingSystemBaseHardware
FText Name
 
FText MadeBy
 
FText ModelNumber
 
FGameplayTag HardwareTag
 
bool bHasBlueprintValidateFunction
 

Detailed Description

Represents the operating system motherboard.

The UOperatingSystemMBB class is a child class of UOperatingSystemBaseHardware and represents the operating system motherboard. It provides functionality to manage the BIOS, supported CPU sockets, supported devices, clock tick, validation, and more.

Constructor & Destructor Documentation

◆ UOperatingSystemMBB()

UOperatingSystemMBB::UOperatingSystemMBB ( )

Member Function Documentation

◆ CanOpenBIOS()

bool UOperatingSystemMBB::CanOpenBIOS ( ) const

Determines whether the BIOS can be opened. This function returns a boolean value indicating whether the BIOS can be opened. It checks if the BIOS is valid and if the current state of the parent device is either "Starting" or "BIOS".

Returns
True if the BIOS can be opened, false otherwise.
Here is the caller graph for this function:

◆ ClockTick()

void UOperatingSystemMBB::ClockTick ( ) const

Performs a clock tick on the operating system motherboard.

The ClockTick method performs a clock tick on the operating system motherboard. It calls the ClockTick method of the parent device, which propagates the clock tick to the appropriate components. This method is const and does not modify the state of the object.

See also
UOperatingSystemBaseDevice::ClockTick
Here is the call graph for this function:

◆ CreateMotherboard()

UOperatingSystemMBB * UOperatingSystemMBB::CreateMotherboard ( UOperatingSystemBaseDevice * OwningDevice,
FGenericError & OutError )
static

Creates a motherboard for the given owning device.

This method creates a motherboard object for the given owning device. It checks if the owning device has a valid motherboard class, and if not, sets the error message in OutError and returns nullptr. If the owning device has a valid motherboard class, the method creates the motherboard object, performs validation, and initializes it. If any validation or initialization steps fail, the error message is set in OutError and the motherboard object is marked as garbage and returned as nullptr. On success, the created motherboard object is returned.

Parameters
OwningDeviceThe owning device for which to create the motherboard.
OutErrorA reference to a FGenericError object that will hold the error message if an error occurs.
Returns
A pointer to the created motherboard object, or nullptr if an error occurs.
See also
UOperatingSystemMBB, UOperatingSystemBaseDevice
Here is the caller graph for this function:

◆ GetBIOS()

UOperatingSystemBIOS & UOperatingSystemMBB::GetBIOS ( ) const

Returns the BIOS of the operating system motherboard. This method retrieves and returns the BIOS of the operating system motherboard.

Returns
A reference to an instance of UOperatingSystemBIOS representing the BIOS of the operating system motherboard.
Here is the caller graph for this function:

◆ GetMaxCpuSpeed()

FORCEINLINE float UOperatingSystemMBB::GetMaxCpuSpeed ( ) const
inline

Get the maximum CPU speed of the operating system motherboard.

This method returns the maximum CPU speed supported by the operating system motherboard.

Returns
The maximum CPU speed.

◆ GetParentDevice()

UOperatingSystemBaseDevice & UOperatingSystemMBB::GetParentDevice ( ) const

Retrieves the parent device actor associated with this operating system motherboard.

Returns
The parent device actor, or nullptr if no parent device actor is set.
See also
UOperatingSystemBaseDevice, ParentDevice
Here is the caller graph for this function:

◆ IsCpuSocketSupported()

bool UOperatingSystemMBB::IsCpuSocketSupported ( const FGameplayTag & CpuSocketTag) const

Checks if the provided CPU socket tag is supported by the operating system motherboard. The IsCpuSocketSupported method checks if the provided CPU socket tag is supported by the operating system motherboard. It returns true if the tag is supported, false otherwise.

Parameters
CpuSocketTagThe CPU socket tag to check.
Returns
True if the CPU socket tag is supported, false otherwise.
See also
SupportedCpuSockets
InvalidTag

◆ IsRamSizeSupported()

FORCEINLINE bool UOperatingSystemMBB::IsRamSizeSupported ( const EOperatingSystemCommonSizes TestSize) const
inline

Check if a given RAM size is supported by the operating system motherboard.

This method checks if a given RAM size is supported by the operating system motherboard. The supported RAM size is determined by the MaxSupportedRamSize property.

Parameters
TestSizeThe RAM size to be tested. It should be one of the values defined in the EOperatingSystemCommonSizes enumeration.
Returns
true if the given RAM size is supported, false otherwise.

◆ OnValidate()

bool UOperatingSystemMBB::OnValidate ( FGenericError & OutError) const
overrideprotectedvirtual

Validates the operating system motherboard.

The OnValidate method validates the operating system motherboard by checking various conditions. If any validation step fails, an error message is set in the OutError parameter and the method returns false. If all validation steps pass, the method returns true, indicating that the operating system motherboard is valid.

Parameters
OutErrorA reference to a FGenericError object that will hold the error message if validation fails.
Returns
True if the operating system motherboard is valid, false otherwise.

Reimplemented from UOperatingSystemBaseHardware.

◆ TryOpenBIOS()

bool UOperatingSystemMBB::TryOpenBIOS ( )

This method is used to try opening the BIOS. If it is possible to open the BIOS, it will call the OpenBIOS method and return true. Otherwise, it will return false.

Returns
True if the BIOS was successfully opened, false otherwise.
See:

CanOpenBIOS, OpenBIOS
Here is the call graph for this function:

Member Data Documentation

◆ BIOS

TObjectPtr<UOperatingSystemBIOS> UOperatingSystemMBB::BIOS
protected

◆ BiosClass

TSoftClassPtr<UOperatingSystemBIOS> UOperatingSystemMBB::BiosClass
protected

Bios that belongs to this Motherboard.

◆ MaxCpuSpeed

float UOperatingSystemMBB::MaxCpuSpeed
protected

Maximum speed the CPU can have on this motherboard. If the CPU speed is higher than this one, device won't start.

◆ MaxSupportedRamSize

EOperatingSystemCommonSizes UOperatingSystemMBB::MaxSupportedRamSize
protected

Indicates the maximum supported RAM size for the operating system motherboard.

◆ ParentDevice

TWeakObjectPtr<UOperatingSystemBaseDevice> UOperatingSystemMBB::ParentDevice
protected

The device that owns this motherboard

◆ SupportedCpuSockets

FGameplayTagContainer UOperatingSystemMBB::SupportedCpuSockets
protected

Supported cpu sockets. If empty, it is assumed all CPU sockets are supported.

◆ SupportedDevices

FGameplayTagContainer UOperatingSystemMBB::SupportedDevices
protected

List of devices this Motherboard supports. If empty, it is assumed all devices are supported.


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