DEKI/ENGINE docs
manual api reference
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
Loading...
Searching...
No Matches
SetupComponent.h File Reference

Classes

struct  Deki::AutoSetupRegistrar< T, Phase >
 Registers an auto SetupComponent from a static initializer. More...
class  Deki::SetupComponent
 Base class for components that need asynchronous setup at boot. More...

Namespaces

namespace  Deki

Macros

#define DEKI_REGISTER_EDITOR_AUTO_SETUP(ClassName)
 Runs when the editor finishes loading packages: every project open, and again after a hot reload.
#define DEKI_REGISTER_PLAY_AUTO_SETUP(ClassName)
 Runs when the user presses Play, not before.
#define SETUP_COMPONENT_API

Macro Definition Documentation

◆ DEKI_REGISTER_EDITOR_AUTO_SETUP

#define DEKI_REGISTER_EDITOR_AUTO_SETUP ( ClassName)
Value:
static ::Deki::AutoSetupRegistrar<ClassName, ::Deki::SetupComponent::SetupPhase::EditorLoad> \
s_##ClassName##EditorAutoReg

Runs when the editor finishes loading packages: every project open, and again after a hot reload.

Keep it cheap and local. Anything that reaches the network or the outside world belongs in DEKI_REGISTER_PLAY_AUTO_SETUP.

◆ DEKI_REGISTER_PLAY_AUTO_SETUP

#define DEKI_REGISTER_PLAY_AUTO_SETUP ( ClassName)
Value:
static ::Deki::AutoSetupRegistrar<ClassName, ::Deki::SetupComponent::SetupPhase::PlayStart> \
s_##ClassName##PlayAutoReg

Runs when the user presses Play, not before.

For a setup with a side effect the user would want to have asked for.

◆ SETUP_COMPONENT_API

#define SETUP_COMPONENT_API