Skip to content

UOperatingSystemDataObject

#include <OperatingSystemSimulator/Public/Core/OperatingSystemDataObject.h>
class UOperatingSystemDataObject

Defined in OperatingSystemDataObject.h:15

Inherits: UObject Subclassed by: UOperatingSystemProgramData, UOperatingSystemSettingsData

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemDataObject["UOperatingSystemDataObject"]
  class UObject["UObject"]
  UObject <|-- UOperatingSystemDataObject
  class UOperatingSystemProgramData["UOperatingSystemProgramData"]
  UOperatingSystemDataObject <|-- UOperatingSystemProgramData
  class UOperatingSystemSettingsData["UOperatingSystemSettingsData"]
  UOperatingSystemDataObject <|-- UOperatingSystemSettingsData
---
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()
  }

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.

ReturnNameDescription
T *GetParentObject const inlineCast the Parent Object to the given type.
voidProgramStarted
voidProgramClosed
voidSetTickEnabledEnable or disable ticking functionality.
boolIsTickEnabled constCheck if the tick is enabled for this object.

const inline

template<class T> inline T * GetParentObject() const

Defined in OperatingSystemDataObject.h:104 Cast the Parent Object to the given type.

Example:

auto MySomeObjectParent = GetParentObject<USomeObject>();

void ProgramStarted()

Defined in OperatingSystemDataObject.h:115


void ProgramClosed()

Defined in OperatingSystemDataObject.h:116


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.

  • bEnable Whether to enable or disable ticking.

const

bool IsTickEnabled() const

Defined in OperatingSystemDataObject.h:137 Check if the tick is enabled for this object.

True if the tick is enabled, false otherwise.

ReturnNameDescription
UOperatingSystemDataObject *CreateDataObj staticCreates a new instance of UOperatingSystemDataObject.
T *CreateDataObj static inlineThis method creates a new instance of a data object of type T.

static

static UOperatingSystemDataObject * CreateDataObj(UObject * OwningObject, const TSoftClassPtr< UOperatingSystemDataObject > & DataClassPtr)

Defined in OperatingSystemDataObject.h:78 Creates a new instance of UOperatingSystemDataObject.

  • OwningObject The owning object that will own the created data object.

  • DataClassPtr The class pointer to the data object’s class.

The newly created data object if successful, nullptr otherwise.


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.

  • OwningObject The owning object that will own the created data object.

  • DataClassPtr The class pointer to the data object’s class.

  • T The type of data object to create.

The newly created data object if successful, otherwise nullptr.

ReturnNameDescription
TWeakObjectPtr< UObject >ParentObjectThe 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.
uint8bStartWithTickEnabledFlag indicating whether the tick function should start enabled.
TWeakObjectPtr< UWorld >CachedWorldA mutable weak object pointer to a UWorld instance.

TWeakObjectPtr< UObject > ParentObject

Defined 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.


uint8 bStartWithTickEnabled

Defined 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.


TWeakObjectPtr< UWorld > CachedWorld

Defined 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.

ReturnNameDescription
boolShouldCreate virtual const inlineCheck if the object should be created.
voidTick virtual inlineThe Tick method receives the time elapsed since the last frame update and performs any necessary updates or computations.
voidOnCreate virtual inlineThis method is called when a new instance of UOperatingSystemDataObject is created.
voidOnProgramStarted virtual inline
voidOnProgramClosed virtual inline
voidOnValidate virtual inlineThis method is called to validate the data object.
voidK2_OnCreateK2_OnCreate.
voidK2_OnProgramStarted
voidK2_OnProgramClosed
voidK2_TickK2_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.
boolK2_ShouldCreate constIndicates whether the operating system data object should be created.

virtual const inline

virtual inline bool ShouldCreate() const

Defined in OperatingSystemDataObject.h:146 Check if the object should be created.

True if the object should be created, False otherwise.


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.

  • DeltaSeconds The time elapsed since the last frame update in seconds.

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.


virtual inline

virtual inline void OnProgramStarted()

Defined in OperatingSystemDataObject.h:171


virtual inline

virtual inline void OnProgramClosed()

Defined in OperatingSystemDataObject.h:172


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.

  • OutError The error object to store any validation errors.

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.


void K2_OnProgramStarted()

Defined in OperatingSystemDataObject.h:199


void K2_OnProgramClosed()

Defined in OperatingSystemDataObject.h:202


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.

  • DeltaSeconds The amount of time in seconds since the last tick.

const

bool K2_ShouldCreate() const

Defined 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.

True if the data object should be created, false otherwise.

ReturnNameDescription
uint8bHasBlueprintShouldCreate
uint8bHasBlueprintOnCreate
uint8bHasBlueprintTick
uint8bHasBlueprintOnProgramStarted
uint8bHasBlueprintOnProgramClosed
FTickerDelegateTickDelegate
FTSTicker::FDelegateHandleTickDelegateHandle

uint8 bHasBlueprintShouldCreate

Defined in OperatingSystemDataObject.h:54


uint8 bHasBlueprintOnCreate

Defined in OperatingSystemDataObject.h:55


uint8 bHasBlueprintTick

Defined in OperatingSystemDataObject.h:56


uint8 bHasBlueprintOnProgramStarted

Defined in OperatingSystemDataObject.h:57


uint8 bHasBlueprintOnProgramClosed

Defined in OperatingSystemDataObject.h:58


FTickerDelegate TickDelegate

Defined in OperatingSystemDataObject.h:60


FTSTicker::FDelegateHandle TickDelegateHandle

Defined in OperatingSystemDataObject.h:61

ReturnNameDescription
boolInternal_NativeTick
boolInternal_CanCreate const
voidInternal_Validate
voidInternal_PostCreate

bool Internal_NativeTick(float DeltaSeconds)

Defined in OperatingSystemDataObject.h:108


const

bool Internal_CanCreate() const

Defined in OperatingSystemDataObject.h:109


void Internal_Validate(FGenericError & OutError)

Defined in OperatingSystemDataObject.h:110


void Internal_PostCreate()

Defined in OperatingSystemDataObject.h:111