UOperatingSystemDataObject
#include <OperatingSystemSimulator/Public/Core/OperatingSystemDataObject.h>class UOperatingSystemDataObjectDefined in OperatingSystemDataObject.h:15
Inherits:
UObjectSubclassed by:UOperatingSystemProgramData,UOperatingSystemSettingsData
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemDataObject["UOperatingSystemDataObject"]
class UObject["UObject"]
UObject <|-- UOperatingSystemDataObject
class UOperatingSystemProgramData["UOperatingSystemProgramData"]
UOperatingSystemDataObject <|-- UOperatingSystemProgramData
class UOperatingSystemSettingsData["UOperatingSystemSettingsData"]
UOperatingSystemDataObject <|-- UOperatingSystemSettingsData
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemDataObject {
+GetParentObject() const T *
+ProgramStarted()
+ProgramClosed()
+SetTickEnabled(const bool bEnable)
+IsTickEnabled() const bool
+CreateDataObj(UObject *OwningObject, const TSoftClassPtr< UOperatingSystemDataObject() *
+CreateDataObj(UObject *OwningObject, TSoftClassPtr< UOper T *
+ParentObject : TWeakObjectPtr< UObject >
+bStartWithTickEnabled : uint8
+CachedWorld : TWeakObjectPtr< UWorld >
+ShouldCreate() const bool
+Tick(const float &DeltaSeconds)
+OnCreate()
+OnProgramStarted()
+OnProgramClosed()
+OnValidate(FGenericError &OutError)
+K2_OnCreate()
+K2_OnProgramStarted()
+K2_OnProgramClosed()
+K2_Tick(const float &DeltaSeconds)
+K2_ShouldCreate() const bool
+bHasBlueprintShouldCreate : uint8
+bHasBlueprintOnCreate : uint8
+bHasBlueprintTick : uint8
+bHasBlueprintOnProgramStarted : uint8
+bHasBlueprintOnProgramClosed : uint8
+TickDelegate : FTickerDelegate
+TickDelegateHandle : FTSTicker::FDelegateHandle
+Internal_NativeTick(float DeltaSeconds) bool
+Internal_CanCreate() const bool
+Internal_Validate(FGenericError &OutError)
+Internal_PostCreate()
}
Caller impact — SetTickEnabled
Section titled “Caller impact — SetTickEnabled”Documented call sites inside the plugin (3):
flowchart LR UOperatingSystemDataObject__SetTickEnabled["UOperatingSystemDataObject::SetTickEnabled"] UOperatingSystemDataObject__Internal_PostCreate["UOperatingSystemDataObject::Internal_PostCreate"] UOperatingSystemDataObject__Internal_PostCreate --> UOperatingSystemDataObject__SetTickEnabled UOperatingSystemCCTVProgramData__OnProgramClosed["UOperatingSystemCCTVProgramData::OnProgramClosed"] UOperatingSystemCCTVProgramData__OnProgramClosed --> UOperatingSystemDataObject__SetTickEnabled UOperatingSystemCCTVProgramData__OnProgramStarted["UOperatingSystemCCTVProgramData::OnProgramStarted"] UOperatingSystemCCTVProgramData__OnProgramStarted --> UOperatingSystemDataObject__SetTickEnabled
UOperatingSystemDataObject is a base class for operating system data objects. It inherits from UObject and provides functionality for tick-based updates and object creation.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
T * | GetParentObject const inline | Cast the Parent Object to the given type. |
void | ProgramStarted | |
void | ProgramClosed | |
void | SetTickEnabled | Enable or disable ticking functionality. |
bool | IsTickEnabled const | Check if the tick is enabled for this object. |
GetParentObject
Section titled “GetParentObject”const inline
template<class T> inline T * GetParentObject() constDefined in OperatingSystemDataObject.h:104 Cast the Parent Object to the given type.
Example:
auto MySomeObjectParent = GetParentObject<USomeObject>();ProgramStarted
Section titled “ProgramStarted”void ProgramStarted()Defined in OperatingSystemDataObject.h:115
References
Section titled “References”ProgramClosed
Section titled “ProgramClosed”void ProgramClosed()Defined in OperatingSystemDataObject.h:116
References
Section titled “References”SetTickEnabled
Section titled “SetTickEnabled”void SetTickEnabled(const bool bEnable)Defined in OperatingSystemDataObject.h:129 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
Section titled “Parameters”bEnableWhether to enable or disable ticking.
Referenced by
Section titled “Referenced by”References
Section titled “References”IsTickEnabled
Section titled “IsTickEnabled”const
bool IsTickEnabled() constDefined in OperatingSystemDataObject.h:137 Check if the tick is enabled for this object.
Returns
Section titled “Returns”True if the tick is enabled, false otherwise.
References
Section titled “References”Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemDataObject * | CreateDataObj static | Creates a new instance of UOperatingSystemDataObject. |
T * | CreateDataObj static inline | This method creates a new instance of a data object of type T. |
CreateDataObj
Section titled “CreateDataObj”static
static UOperatingSystemDataObject * CreateDataObj(UObject * OwningObject, const TSoftClassPtr< UOperatingSystemDataObject > & DataClassPtr)Defined in OperatingSystemDataObject.h:78 Creates a new instance of UOperatingSystemDataObject.
Parameters
Section titled “Parameters”-
OwningObjectThe owning object that will own the created data object. -
DataClassPtrThe class pointer to the data object’s class.
Returns
Section titled “Returns”The newly created data object if successful, nullptr otherwise.
References
Section titled “References”IsValidNEW_SOFT_OBJ
CreateDataObj
Section titled “CreateDataObj”static inline
template<class T> static inline T * CreateDataObj(UObject * OwningObject, TSoftClassPtr< UOperatingSystemDataObject > DataClassPtr)Defined in OperatingSystemDataObject.h:91 This method creates a new instance of a data object of type T.
Parameters
Section titled “Parameters”-
OwningObjectThe owning object that will own the created data object. -
DataClassPtrThe class pointer to the data object’s class.
Parameters
Section titled “Parameters”TThe type of data object to create.
Returns
Section titled “Returns”The newly created data object if successful, otherwise nullptr.
Protected Attributes
Section titled “Protected Attributes”| Return | Name | Description |
|---|---|---|
TWeakObjectPtr< UObject > | 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. |
uint8 | bStartWithTickEnabled | Flag indicating whether the tick function should start enabled. |
TWeakObjectPtr< UWorld > | CachedWorld | A mutable weak object pointer to a UWorld instance. |
ParentObject
Section titled “ParentObject”TWeakObjectPtr< UObject > ParentObjectDefined in OperatingSystemDataObject.h:23 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.
Referenced by
Section titled “Referenced by”bStartWithTickEnabled
Section titled “bStartWithTickEnabled”uint8 bStartWithTickEnabledDefined in OperatingSystemDataObject.h:37 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.
Referenced by
Section titled “Referenced by”CachedWorld
Section titled “CachedWorld”TWeakObjectPtr< UWorld > CachedWorldDefined in OperatingSystemDataObject.h:50 A mutable weak object pointer to a UWorld instance.
The CachedWorld variable allows storing and accessing a UWorld object. It is declared as mutable, meaning it can be modified even if the containing class or structure is declared as const. This mutable pointer is declared using the TWeakObjectPtr smart pointer template, which provides weak reference semantics and automatic cleanup of the referenced object when it is destroyed.
It is recommended to use the CachedWorld variable for caching and accessing the UWorld object to avoid performance overhead caused by constantly querying or searching for the UWorld instance.
Protected Methods
Section titled “Protected Methods”| Return | Name | Description |
|---|---|---|
bool | ShouldCreate virtual const inline | Check if the object should be created. |
void | Tick virtual inline | The Tick method receives the time elapsed since the last frame update and performs any necessary updates or computations. |
void | OnCreate virtual inline | This method is called when a new instance of UOperatingSystemDataObject is created. |
void | OnProgramStarted virtual inline | |
void | OnProgramClosed virtual inline | |
void | OnValidate virtual inline | This method is called to validate the data object. |
void | K2_OnCreate | K2_OnCreate. |
void | K2_OnProgramStarted | |
void | K2_OnProgramClosed | |
void | K2_Tick | 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. |
bool | K2_ShouldCreate const | Indicates whether the operating system data object should be created. |
ShouldCreate
Section titled “ShouldCreate”virtual const inline
virtual inline bool ShouldCreate() constDefined in OperatingSystemDataObject.h:146 Check if the object should be created.
Returns
Section titled “Returns”True if the object should be created, False otherwise.
Referenced by
Section titled “Referenced by”Reimplemented by
Section titled “Reimplemented by”virtual inline
virtual inline void Tick(const float & DeltaSeconds)Defined in OperatingSystemDataObject.h:156 The Tick method receives the time elapsed since the last frame update and performs any necessary updates or computations.
Parameters
Section titled “Parameters”DeltaSecondsThe time elapsed since the last frame update in seconds.
Referenced by
Section titled “Referenced by”Reimplemented by
Section titled “Reimplemented by”OnCreate
Section titled “OnCreate”virtual inline
virtual inline void OnCreate()Defined in OperatingSystemDataObject.h:169 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.
Referenced by
Section titled “Referenced by”Reimplemented by
Section titled “Reimplemented by”OnProgramStarted
Section titled “OnProgramStarted”virtual inline
virtual inline void OnProgramStarted()Defined in OperatingSystemDataObject.h:171
Referenced by
Section titled “Referenced by”Reimplemented by
Section titled “Reimplemented by”OnProgramClosed
Section titled “OnProgramClosed”virtual inline
virtual inline void OnProgramClosed()Defined in OperatingSystemDataObject.h:172
Referenced by
Section titled “Referenced by”Reimplemented by
Section titled “Reimplemented by”OnValidate
Section titled “OnValidate”virtual inline
virtual inline void OnValidate(FGenericError & OutError)Defined in OperatingSystemDataObject.h:187 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
Section titled “Parameters”OutErrorThe error object to store any validation errors.
Referenced by
Section titled “Referenced by”Reimplemented by
Section titled “Reimplemented by”K2_OnCreate
Section titled “K2_OnCreate”void K2_OnCreate()Defined in OperatingSystemDataObject.h:196 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.
Referenced by
Section titled “Referenced by”K2_OnProgramStarted
Section titled “K2_OnProgramStarted”void K2_OnProgramStarted()Defined in OperatingSystemDataObject.h:199
Referenced by
Section titled “Referenced by”K2_OnProgramClosed
Section titled “K2_OnProgramClosed”void K2_OnProgramClosed()Defined in OperatingSystemDataObject.h:202
Referenced by
Section titled “Referenced by”K2_Tick
Section titled “K2_Tick”void K2_Tick(const float & DeltaSeconds)Defined in OperatingSystemDataObject.h:211 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
Section titled “Parameters”DeltaSecondsThe amount of time in seconds since the last tick.
Referenced by
Section titled “Referenced by”K2_ShouldCreate
Section titled “K2_ShouldCreate”const
bool K2_ShouldCreate() constDefined in OperatingSystemDataObject.h:222 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
Section titled “Returns”True if the data object should be created, false otherwise.
Referenced by
Section titled “Referenced by”Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
uint8 | bHasBlueprintShouldCreate | |
uint8 | bHasBlueprintOnCreate | |
uint8 | bHasBlueprintTick | |
uint8 | bHasBlueprintOnProgramStarted | |
uint8 | bHasBlueprintOnProgramClosed | |
FTickerDelegate | TickDelegate | |
FTSTicker::FDelegateHandle | TickDelegateHandle |
bHasBlueprintShouldCreate
Section titled “bHasBlueprintShouldCreate”uint8 bHasBlueprintShouldCreateDefined in OperatingSystemDataObject.h:54
Referenced by
Section titled “Referenced by”bHasBlueprintOnCreate
Section titled “bHasBlueprintOnCreate”uint8 bHasBlueprintOnCreateDefined in OperatingSystemDataObject.h:55
Referenced by
Section titled “Referenced by”bHasBlueprintTick
Section titled “bHasBlueprintTick”uint8 bHasBlueprintTickDefined in OperatingSystemDataObject.h:56
Referenced by
Section titled “Referenced by”bHasBlueprintOnProgramStarted
Section titled “bHasBlueprintOnProgramStarted”uint8 bHasBlueprintOnProgramStartedDefined in OperatingSystemDataObject.h:57
Referenced by
Section titled “Referenced by”bHasBlueprintOnProgramClosed
Section titled “bHasBlueprintOnProgramClosed”uint8 bHasBlueprintOnProgramClosedDefined in OperatingSystemDataObject.h:58
Referenced by
Section titled “Referenced by”TickDelegate
Section titled “TickDelegate”FTickerDelegate TickDelegateDefined in OperatingSystemDataObject.h:60
Referenced by
Section titled “Referenced by”TickDelegateHandle
Section titled “TickDelegateHandle”FTSTicker::FDelegateHandle TickDelegateHandleDefined in OperatingSystemDataObject.h:61
Referenced by
Section titled “Referenced by”Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
bool | Internal_NativeTick | |
bool | Internal_CanCreate const | |
void | Internal_Validate | |
void | Internal_PostCreate |
Internal_NativeTick
Section titled “Internal_NativeTick”bool Internal_NativeTick(float DeltaSeconds)Defined in OperatingSystemDataObject.h:108
References
Section titled “References”Internal_CanCreate
Section titled “Internal_CanCreate”const
bool Internal_CanCreate() constDefined in OperatingSystemDataObject.h:109
References
Section titled “References”bHasBlueprintShouldCreateK2_ShouldCreateOS_LOG_WARNShouldCreate
Internal_Validate
Section titled “Internal_Validate”void Internal_Validate(FGenericError & OutError)Defined in OperatingSystemDataObject.h:110
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_PostCreate
Section titled “Internal_PostCreate”void Internal_PostCreate()Defined in OperatingSystemDataObject.h:111