UOperatingSystemDataObject is a base class for operating system data objects. It inherits from UObject and provides functionality for tick-based updates and object creation.
More...
#include "OperatingSystemDataObject.h"
UOperatingSystemDataObject is a base class for operating system data objects. It inherits from UObject and provides functionality for tick-based updates and object creation.
◆ CreateDataObj() [1/2]
Creates a new instance of UOperatingSystemDataObject.
- Parameters
-
OwningObject | The owning object that will own the created data object. |
DataClassPtr | The class pointer to the data object's class. |
- Returns
- The newly created data object if successful, nullptr otherwise.
◆ CreateDataObj() [2/2]
template<class T >
static OPERATINGSYSTEMSIMULATOR_API T * UOperatingSystemDataObject::CreateDataObj |
( |
UObject * | OwningObject, |
|
|
TSoftClassPtr< UOperatingSystemDataObject > | DataClassPtr ) |
|
inlinestatic |
This method creates a new instance of a data object of type T.
- Parameters
-
OwningObject | The owning object that will own the created data object. |
DataClassPtr | The class pointer to the data object's class. |
- Template Parameters
-
T | The type of data object to create. |
- Returns
- The newly created data object if successful, otherwise nullptr.
◆ GetParentObject()
T * UOperatingSystemDataObject::GetParentObject |
( |
| ) |
const |
|
inline |
Cast the Parent Object to the given type.
Example:
static OPERATINGSYSTEMSIMULATOR_API UOperatingSystemDataObject * CreateDataObj(UObject *OwningObject, const TSoftClassPtr< UOperatingSystemDataObject > &DataClassPtr)
Definition OperatingSystemDataObject.cpp:20
◆ IsTickEnabled()
bool UOperatingSystemDataObject::IsTickEnabled |
( |
| ) |
const |
Check if the tick is enabled for this object.
- Returns
- True if the tick is enabled, false otherwise.
◆ K2_OnCreate()
void UOperatingSystemDataObject::K2_OnCreate |
( |
| ) |
|
|
protected |
K2_OnCreate.
K2_OnCreate is a BlueprintImplementableEvent that is called when the object is created to provide custom behavior during object creation. This function is called after the object has been created and initialized, and before it is added to the world.
◆ K2_ShouldCreate()
bool UOperatingSystemDataObject::K2_ShouldCreate |
( |
| ) |
const |
|
protected |
Indicates whether the operating system data object should be created.
This method is a BlueprintImplementableEvent and can be overridden in Blueprint subclasses. It allows custom logic to be implemented to determine whether the object should be created.
- Returns
- True if the data object should be created, false otherwise.
◆ K2_Tick()
void UOperatingSystemDataObject::K2_Tick |
( |
const float & | DeltaSeconds | ) |
|
|
protected |
K2_Tick method is an event meant to be overridden in Blueprint subclasses of OperatingSystemDataObject. It allows subclasses to define custom behavior that should be executed every tick.
- Parameters
-
DeltaSeconds | The amount of time in seconds since the last tick. |
◆ OnCreate()
This method is called when a new instance of UOperatingSystemDataObject is created.
This method is called after the data object has been created and initialized, but before tick-based updates begin. This provides an opportunity for the derived class to perform any additional setup or initialization that is required. The derived class can override this method to add any custom initialization logic.
- Note
- This method is virtual and can be overridden by derived classes. By default, this method does nothing.
Reimplemented in UOperatingSystemProgramData, UOperatingSystemTerminalHistory, and UOperatingSystemVideoPlayerProgramData.
◆ OnValidate()
This method is called to validate the data object.
This method is virtual and can be overridden by derived classes to provide custom validation logic for the data object. By default, this method does nothing. The derived class should implement this method to add any specific validation logic that is required.
- Parameters
-
OutError | The error object to store any validation errors. |
- Note
- The derived class can use the OutError parameter to report any validation errors that occur during the validation process. If there are no validation errors, the OutError object should not be modified. By default, this method does nothing.
Reimplemented in UOperatingSystemSettingsData.
◆ SetTickEnabled()
void UOperatingSystemDataObject::SetTickEnabled |
( |
const bool | bEnable | ) |
|
Enable or disable ticking functionality.
This method enables or disables the ticking functionality of the operating system data object. When ticking is enabled, the object will receive tick events at a regular interval, allowing it to perform any necessary updates or computations. When ticking is disabled, the object will no longer receive tick events.
- Parameters
-
bEnable | Whether to enable or disable ticking. |
◆ ShouldCreate()
◆ Tick()
The Tick method receives the time elapsed since the last frame update and performs any necessary updates or computations.
- Parameters
-
DeltaSeconds | The time elapsed since the last frame update in seconds. |
- Note
- This method is virtual and can be overridden by derived classes to provide custom tick functionality. By default, this method does nothing. The derived class should implement this method to add any specific tick functionality that is required.
◆ bStartWithTickEnabled
uint8 UOperatingSystemDataObject::bStartWithTickEnabled |
|
protected |
Flag indicating whether the tick function should start enabled.
This flag is used in conjunction with the "bTickEnabled" property of the owning class to determine whether the tick function is initially enabled or disabled.
By default, this flag is set to false, indicating that the tick function should start disabled. If set to true, the tick function will start enabled.
- Note
- This property can only be modified in editor and not at runtime.
◆ ParentObject
The ParentObject variable is used to store a weak pointer to the owner object. It is useful for maintaining a reference to the parent object without causing a strong reference cycle.
The documentation for this class was generated from the following files: