UOperatingSystemPSU
#include <OperatingSystemSimulator/Public/Hardware/OperatingSystemPSU.h>class UOperatingSystemPSUDefined in OperatingSystemPSU.h:19
Inherits:
UOperatingSystemBaseHardware
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemPSU["UOperatingSystemPSU"]
class UOperatingSystemBaseHardware["UOperatingSystemBaseHardware"]
UOperatingSystemBaseHardware <|-- UOperatingSystemPSU
Collaboration diagram
Section titled “Collaboration diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemPSU["UOperatingSystemPSU"]
class UOperatingSystemBaseDevice["UOperatingSystemBaseDevice"]
UOperatingSystemPSU *-- UOperatingSystemBaseDevice
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemPSU {
+UOperatingSystemPSU()
+CreatePSU(UOperatingSystemBaseDevice *OwningDevice, F UOperatingSystemPSU() *
+OnValidate(FGenericError &OutError) const override bool
+ParentDevice : TWeakObjectPtr< UOperatingSystemBaseDevi
}
Represents a Power Supply Unit (PSU) in the operating system simulator.
This class is a blueprintable and blueprint type that inherits from UOperatingSystemBaseHardware. It represents a power supply unit in the operating system simulator. It contains a weak pointer to the parent device and provides a static method to create an instance of the PSU.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemPSU |
UOperatingSystemPSU
Section titled “UOperatingSystemPSU”UOperatingSystemPSU()Defined in OperatingSystemPSU.h:33
References
Section titled “References”Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemPSU * | CreatePSU static | Creates an instance of UOperatingSystemPSU. |
CreatePSU
Section titled “CreatePSU”static
static UOperatingSystemPSU * CreatePSU(UOperatingSystemBaseDevice * OwningDevice, FGenericError & OutError)Defined in OperatingSystemPSU.h:49 Creates an instance of UOperatingSystemPSU.
This method creates and returns an instance of UOperatingSystemPSU. It takes an OwningDevice pointer and an OutError reference as input parameters. The OwningDevice pointer is used to get the PSU class of the parent device. If the parent device does not have a PSU class, the method sets the OutError parameter to an error message and returns nullptr. If the parent device has a PSU class, the method creates a new instance of UOperatingSystemPSU and sets the ParentDevice pointer to the OwningDevice. It then calls the Validate method of the instance to ensure its validity. If the instance is not valid, the method marks it as garbage, sets ProxyPsu to nullptr, and returns nullptr. Otherwise, it returns the instance.
Parameters
Section titled “Parameters”-
OwningDeviceA pointer to the parent device. -
OutErrorA reference to a FGenericError object that will be set with an error message if an error occurs.
Returns
Section titled “Returns”An instance of UOperatingSystemPSU if successful, nullptr otherwise.
Referenced by
Section titled “Referenced by”References
Section titled “References”MAKE_ERRORNEW_SOFT_OBJ
Protected Methods
Section titled “Protected Methods”| Return | Name | Description |
|---|---|---|
bool | OnValidate virtual const override | Validates the Power Supply Unit (PSU). |
OnValidate
Section titled “OnValidate”virtual const override
virtual bool OnValidate(FGenericError & OutError) const overrideDefined in OperatingSystemPSU.h:63 Validates the Power Supply Unit (PSU).
This method validates the Power Supply Unit (PSU). It checks if the HardwareTag is equal to the PsuTag. If they are not equal, an error message is created and assigned to the OutError parameter. The method returns false to indicate that the validation failed. If the HardwareTag is equal to the PsuTag, the method returns true to indicate that the validation passed.
Parameters
Section titled “Parameters”OutErrorA reference to a FGenericError object that will be set with an error message if the validation fails.
Returns
Section titled “Returns”true if the validation passed, false otherwise.
References
Section titled “References”HardwareTagMAKE_ERRORName
Reimplements
Section titled “Reimplements”Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
TWeakObjectPtr< UOperatingSystemBaseDevice > | ParentDevice | Represents the parent device of a specific operating system base device. |
ParentDevice
Section titled “ParentDevice”TWeakObjectPtr< UOperatingSystemBaseDevice > ParentDeviceDefined in OperatingSystemPSU.h:29 Represents the parent device of a specific operating system base device.
See also: UOperatingSystemBaseDevice