Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
PlatformSetupComponent Class Reference

Orchestrates sequential platform initialization of SetupComponents. More...

#include <PlatformSetupComponent.h>

Inherits DekiBehaviour.

Public Member Functions

 PlatformSetupComponent ()
virtual ~PlatformSetupComponent ()
void Start () override
 Called once before first Update, after ALL Awake calls complete.
void Update () override
 Called every frame (only if needs_update is true).
Public Member Functions inherited from DekiBehaviour
 DekiBehaviour ()
virtual ~DekiBehaviour ()=default
ComponentType GetType () const override
ComponentType GetBaseType () const override
DekiBehaviourAsBehaviour () override
virtual void Awake ()
 Called once after AssetRefs and ObjectRefs are resolved.
bool HasAwoken () const
bool HasStarted () const
void MarkAwoken ()
void MarkStarted ()
virtual bool NeedsUpdate () const
 Runtime opt-out for Update() calls.
void SetNeedsUpdate (bool needs)
 Enable or disable per-frame Update() calls.
Public Member Functions inherited from DekiComponent
 DekiComponent ()
virtual ~DekiComponent ()=default
 DekiComponent (const DekiComponent &)=delete
DekiComponentoperator= (const DekiComponent &)=delete
virtual bool DeclaresUpdate () const
 Does this class (or a reflected base) declare Update()?
DekiObjectGetOwner () const
void SetOwner (DekiObject *owner)
virtual void LoadAssets ()
 Load assets needed by this component.
virtual void UnloadAssets ()
 Unload/clear assets held by this component.
virtual void RuntimeUpdate (float deltaTime)
 Update this component (runtime only).
virtual void OnAssetRefResolved (const char *propertyName, void *asset, const char *guid)
 Called after an AssetRef property is resolved by LifecycleManager.
virtual bool NeedsAssetLoading () const
 Check if this component needs asset loading.
virtual bool NeedsRuntimeUpdate () const
 Check if this component needs runtime updates.
virtual bool Deserialize (SceneFormat::SceneMsgPackParser &parser, uint32_t mapSize)
 Deserialize component data from MessagePack.
virtual void ResolveObjectRefs (class Scene *scene)
 Resolve all ObjectRef properties in this component.
virtual void RemapObjectRefs (const std::unordered_map< uint32_t, uint32_t > &idRemap)
 Remap ObjectRef IDs after cloning/instantiation.
bool HasRefsResolved () const
void MarkRefsResolved ()
void ResetRefsResolved ()
virtual void OnPropertyChanged (const char *propertyName)
 Called when a property is modified via the editor.

Public Attributes

std::vector< ObjectRef< SetupComponent > > setupComponents
 SetupComponents to initialize in order (use ObjectRef picker in editor).

Additional Inherited Members

Static Public Attributes inherited from DekiBehaviour
static constexpr ComponentType StaticType = DekiHashString("DekiBehaviour")
Static Public Attributes inherited from DekiComponent
static constexpr ComponentType StaticType = 0
Protected Attributes inherited from DekiComponent
DekiObjectm_Owner
bool m_RefsResolved

Detailed Description

Orchestrates sequential platform initialization of SetupComponents.

Add this component to a boot scene along with SetupComponents (like SDCardComponent). It will call Setup() on each component in order, waiting for each to complete before proceeding to the next. After all setup completes successfully, it loads the startup scene.

If any setup fails, the platform setup stops and the startup scene is not loaded.

Usage in boot scene: BootRoot ├── PlatformSetupComponent │ └── setupComponents: [→SDCardComponent] └── SDCardObj └── SDCardComponent

Constructor & Destructor Documentation

◆ PlatformSetupComponent()

PlatformSetupComponent::PlatformSetupComponent ( )

◆ ~PlatformSetupComponent()

virtual PlatformSetupComponent::~PlatformSetupComponent ( )
virtual

Member Function Documentation

◆ Start()

void PlatformSetupComponent::Start ( )
overridevirtual

Called once before first Update, after ALL Awake calls complete.

Use for cross-component setup. Safe to access other components since all components have been awakened.

Reimplemented from DekiBehaviour.

◆ Update()

void PlatformSetupComponent::Update ( )
overridevirtual

Called every frame (only if needs_update is true).

Reimplemented from DekiBehaviour.

Member Data Documentation

◆ setupComponents

std::vector<ObjectRef<SetupComponent> > PlatformSetupComponent::setupComponents

SetupComponents to initialize in order (use ObjectRef picker in editor).


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