Epok Engine

EPOK RUNTIME

Object Model

object_model.hpp · the object model module

Module

the object model module.

Header
object_model.hpp
Include
#include "object_model.hpp"
Stability
Epok runtime API

Include this module

C++ include
#include "object_model.hpp"

Types

ActorClass declared by the object-model module for the object model module.ClassActor2DClass declared by the object-model module for the object model module.ClassActor3DClass declared by the object-model module for the object model module.ClassActorComponentClass declared by the object-model module for the object model module.ClassActorPrepareFn---- spawning ------------------------------------------------------------------ Preparation hook, run once per reserved actor after its defaults, root, owner and registration are in place and *before* any `begin_play` of this batch (design.md section 6, between steps 2 and 5).Type aliasActorSpawnRequestOne spawn request.StructAudioComponentShared audio without a transform.ClassBlobShadowComponentClass declared by the object-model module for the object model module.ClassCamera3DComponentClass declared by the object-model module for the object model module.ClassCanvasComponentClass declared by the object-model module for the object model module.ClassClassDescriptorCooked class table.StructCollider3DComponentClass declared by the object-model module for the object model module.ClassEndPlayReasonEnum declared by the object-model module for the object model module.EnumImageComponentClass declared by the object-model module for the object model module.ClassLevelClass declared by the object-model module for the object model module.ClassLevelPendingOpOne queued spawn/destroy request, executed when the current batch finishes.StructLight3DComponentClass declared by the object-model module for the object model module.ClassMesh3DComponentNative components register their ownership with the Actor lifecycle.ClassNativeComponentDefaultStruct declared by the object-model module for the object model module.StructObjectClass declared by the object-model module for the object model module.ClassObjectClassFlagsClass descriptor flags.EnumObjectDispatchScopeStorage of a destroyed object stays quarantined until every nested callback returns.StructObjectDomainEnum declared by the object-model module for the object model module.EnumObjectFamilyEnum declared by the object-model module for the object model module.EnumObjectIdCompact runtime identity.StructObjectPoolFixed typed storage for one concrete class.Class templateObjectRegistrySlot table over a fixed capacity.StructObjectRegistryStorageDefault capacity for a cooked build; tests instantiate a small table.Class templateObjectSlotStruct declared by the object-model module for the object model module.StructObjectStateEnum declared by the object-model module for the object model module.EnumObjectStatsStruct declared by the object-model module for the object model module.StructPaletteAnimatorComponentClass declared by the object-model module for the object model module.ClassParticleEffectComponentClass declared by the object-model module for the object model module.ClassParticleEmitterComponentClass declared by the object-model module for the object model module.ClassProgressBarComponentClass declared by the object-model module for the object model module.ClassRectTransformComponentClass declared by the object-model module for the object model module.ClassSceneComponent2DClass declared by the object-model module for the object model module.ClassSceneComponent3DClass declared by the object-model module for the object model module.ClassSceneScriptActorOne per loaded Level.ClassSprite3DComponentClass declared by the object-model module for the object model module.ClassTextComponentClass declared by the object-model module for the object model module.ClassTimelineComponentClass declared by the object-model module for the object model module.ClassTransform2D2D world transform: XY position, rotation about the view axis, per-axis scale and a stable draw order.StructUIActorClass declared by the object-model module for the object model module.ClassUIComponentClass declared by the object-model module for the object model module.ClassWorldClass declared by the object-model module for the object model module.Class

Functions and methods

~ObjectReleases the resources owned by `epok::Object`.destructor~ObjectDispatchScopeReleases the resources owned by `epok::ObjectDispatchScope`.destructoracquirePerforms `acquire` as part of the object model module.MethodacquirePool-backed construction of a concrete class.MethodactiveSelf flag only; Level::actor_active() folds the logical parent chain.Methodactor_active---- activation ----------------------------------------------------------------Methodactor_atPerforms `actor at` as part of the object model module.Methodactor_countPerforms `actor count` as part of the object model module.Methodadd_component---- components ----------------------------------------------------------------Function templateadoptAdopt storage owned by somebody else (an actor's embedded default component, the Level itself).Methodattach_componentSpatial attachment between components of the same domain.Functionattach_slotPerforms `attach slot` as part of the object model module.Methodattach_slotPerforms `attach slot` as part of the object model module.Methodattach_slotPerforms `attach slot` as part of the object model module.Methodattach_slotPerforms `attach slot` as part of the object model module.Methodbegin_playBegins play as part of the object model module.Methodbegin_playBegins play as part of the object model module.Methodbegin_playplay_on_start policy.MethodbindBinds the slot table and registers the Level itself.MethodbindPerforms `bind` as part of the object model module.Methodbind_dataPerforms `bind data` as part of the object model module.Methodbind_localPerforms `bind local` as part of the object model module.Methodbind_localPerforms `bind local` as part of the object model module.Methodbind_localNo legacy slot: the component owns the transform.Methodbind_slotBind to the legacy slot's AudioSource, or to component-owned storage.Methodbind_slotPerforms `bind slot` as part of the object model module.Methodbind_slotCanonical storage: the legacy entity slot owns the transform and everything that already reads it (collision, rendering, motion interpolation) keeps working.Methodblueprint_observePerforms `blueprint observe` as part of the object model module.Methodblueprint_observePerforms `blueprint observe` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idRuntime-owned identity hooks; not an authoring API.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_idPerforms `class id` as part of the object model module.Methodclass_ofPerforms `class of` as part of the object model module.Methodcollect_quarantinedRetry the quarantined slots.Methodcompact_class_idSingle-block SHA-256: enough for a 36 character UUID (message + padding <= 64 bytes).Functioncomponent_countPerforms `component count` as part of the object model module.Methodcomponent_idPerforms `component id` as part of the object model module.Methodcreate_scene_scriptThe scene script is created by the loader; it is never part of the actor table.MethoddataLegacy adapter: the canonical slot behind the root scene component, or nullptr.Methoddefault_rootRuntime hook, not reflected: the declarative root component embedded in the actor.Methoddefault_rootPerforms `default root` as part of the object model module.Methoddefault_rootPerforms `default root` as part of the object model module.Methoddefault_rootPerforms `default root` as part of the object model module.MethoddestroyDestroys destroy as part of the object model module.Methoddestroy_actor---- destruction --------------------------------------------------------------- A request made inside a callback marks the actor immediately (it receives no further events) and runs the teardown when the current batch finishes.Methoddispatch_triggerCollision is owned by the spatial services, not by the Level: they resolve the legacy slot to its actor and call this, which fans the event out to the owner's components in registration order.Functionend_playEnds play as part of the object model module.Methodend_playEnds play as part of the object model module.Methodend_playEnds play as part of the object model module.Methodend_play_allExit order: scene script first while the actors are still alive, then every actor.Methodentity_slotPerforms `entity slot` as part of the object model module.Methodentity_slotPerforms `entity slot` as part of the object model module.Methodentity_slotPerforms `entity slot` as part of the object model module.Methodfind_object_classFinds object class as part of the object model module.Functionfinish_releaseCalled when the last dispatch scope unwinds: no callback can still be on the stack of a destroyed object, so its typed storage returns to the pool.Methodframe_updatePerforms `frame update` as part of the object model module.Methodframe_updateOnce per rendered frame, even while paused (legacy Behaviour parity).MethodgetReturns get as part of the object model module.MethodgetReturns get as part of the object model module.Methodget_componentReturns component as part of the object model module.Function templateget_componentsReturns components as part of the object model module.Function templateget_ownerReturns owner as part of the object model module.MethodidPerforms `id` as part of the object model module.Methodis_aReports whether a as part of the object model module.Methodis_playingReports whether playing as part of the object model module.Methodlevel_idReflected identity/hierarchy readers.MethodlivePerforms `live` as part of the object model module.MethodlivePerforms `live` as part of the object model module.Methodlogical_parentPerforms `logical parent` as part of the object model module.MethodnamePerforms `name` as part of the object model module.MethodnamePerforms `name` as part of the object model module.Methodnext_generationPerforms `next generation` as part of the object model module.Methodobject_class_is_aAncestry walk bounded by the table size; the cook rejects cycles before emitting.Functionobject_constructPlacement-new into caller storage; destroy runs the virtual destructor of the concrete type, so a base pointer never slices.Function templateobject_destructPerforms `object destruct` as part of the object model module.Functionobject_domain_bitOwner domain masks for components.Functionobject_storage_quarantinedDefined after AudioComponent; `false` for every object that owns no retained storage.FunctionObjectDispatchScopeConstructs `epok::ObjectDispatchScope` for the object model module.constructorObjectRegistryConstructs `epok::ObjectRegistry` for the object model module.constructorObjectRegistryStorage<Capacity>Constructs `epok::ObjectRegistryStorage` for the object model module.constructoron_disablePerforms `on disable` as part of the object model module.Methodon_disablePerforms `on disable` as part of the object model module.Methodon_disableDeactivation and teardown stop both kinds: lifecycle.hpp::set_active stops a legacy slot's audio through the slot table, and stopping an already stopped source is a no-op, so the two paths are idempotent rather than conflicting.Methodon_enablePerforms `on enable` as part of the object model module.Methodon_enablePerforms `on enable` as part of the object model module.Methodon_triggerForward-only collision hook.Methodoperator!=Performs `operator !=` as part of the object model module.Methodoperator=Performs `operator =` as part of the object model module.Methodoperator=Performs `operator =` as part of the object model module.Methodoperator==Performs `operator ==` as part of the object model module.Methodowner_idPerforms `owner id` as part of the object model module.Methodowns_sourceTrue only for component-owned storage.MethodplayStarts play as part of the object model module.MethodregistryPerforms `registry` as part of the object model module.MethodreleasableFalse while a service still holds this component's storage; the registry then keeps the (already dead) slot quarantined instead of returning it to the pool.MethodreleasableComponent-owned storage stays quarantined while an asynchronous consumer (the XA music service) still points at it, mirroring allocate_actor_data's legacy-slot rule.MethodreleasePerforms `release` as part of the object model module.MethodreleaseInvalidates the handle immediately; storage is quarantined while callbacks run.Methodremove_componentRemoves component as part of the object model module.MethodresolveGeneration and class checked; the runtime class must derive from T's static class.Function templateroot_idPerforms `root id` as part of the object model module.Methodscene_scriptPerforms `scene script` as part of the object model module.Methodset_activeFolded activation with the on_enable/on_disable fan-out, and deferred destruction inside a dispatch scope: the same Level paths the legacy Blueprint nodes take.Methodset_activeSets active as part of the object model module.Methodset_logical_parentSets logical parent as part of the object model module.Methodset_nameSets name as part of the object model module.Methodset_nameSets name as part of the object model module.Methodset_wants_tickSets wants tick as part of the object model module.Methodsha256_rotrPerforms `sha256 rotr` as part of the object model module.FunctionslotPerforms `slot` as part of the object model module.Methodspawn_actorPerforms `spawn actor` as part of the object model module.Methodspawn_batchAll or nothing.MethodstatePerforms `state` as part of the object model module.MethodstatsPerforms `stats` as part of the object model module.MethodstopStops stop as part of the object model module.MethodtickPerforms `tick` as part of the object model module.MethodtickPerforms `tick` as part of the object model module.Methodtick---- ticking -------------------------------------------------------------------Methodtimeline_syncRuntime hooks, not reflected.Methodtimeline_syncPerforms `timeline sync` as part of the object model module.MethodvalidPerforms `valid` as part of the object model module.Methodwants_tickPerforms `wants tick` as part of the object model module.Method

Fields, variables and values

acquireExposes `acquire` on `epok::ClassDescriptor` for the object model module.FieldactiveExposes `active` on `epok::ActorSpawnRequest` for the object model module.Fieldactive_object_registryRegistry bound by the active Level.VariableactorExposes `actor` on `epok::LevelPendingOp` for the object model module.FieldActorNamed value `Actor` in `epok::ObjectFamily`.Enum valueactor_component_capacityExposes `actor_component_capacity` on the `epok` namespace for the object model module.VariablealignExposes `align` on `epok::ClassDescriptor` for the object model module.FieldaliveExposes `alive` on `epok::ObjectStats` for the object model module.Fieldattach_parentExposes `attach_parent` on `epok::NativeComponentDefault` for the object model module.Fieldattach_parentExposes `attach_parent` on `epok::RectTransformComponent` for the object model module.Fieldattach_parentExposes `attach_parent` on `epok::SceneComponent2D` for the object model module.Fieldattach_parentExposes `attach_parent` on `epok::SceneComponent3D` for the object model module.Fieldaudio_source_retained---- service quarantine ------------------------------------------------------------ Some services retain the address of a component's storage across asynchronous callbacks.VariablecapacityExposes `capacity` on `epok::ObjectPool` for the object model module.VariablecapacityExposes `capacity` on `epok::ObjectRegistry` for the object model module.Fieldclass_idExposes `class_id` on `epok::NativeComponentDefault` for the object model module.FieldcomponentExposes `component` on `epok::NativeComponentDefault` for the object model module.FieldComponentNamed value `Component` in `epok::ObjectFamily`.Enum valuecreateExposes `create` on `epok::ClassDescriptor` for the object model module.Fielddefault_componentExposes `default_component` on `epok::ClassDescriptor` for the object model module.Fielddefault_component_countExposes `default_component_count` on `epok::ClassDescriptor` for the object model module.FielddeferredExposes `deferred` on `epok::ObjectStats` for the object model module.FielddestroyExposes `destroy` on `epok::ClassDescriptor` for the object model module.FielddestroyExposes `destroy` on `epok::LevelPendingOp` for the object model module.FieldDestroyedNamed value `Destroyed` in `epok::EndPlayReason`.Enum valueDestroyedNamed value `Destroyed` in `epok::ObjectState`.Enum valuedispatchExposes `dispatch` on `epok::ObjectRegistry` for the object model module.FielddomainExposes `domain` on `epok::ClassDescriptor` for the object model module.Fielddraw_orderExposes `draw_order` on `epok::Transform2D` for the object model module.FieldEndingPlayNamed value `EndingPlay` in `epok::ObjectState`.Enum valuefamilyExposes `family` on `epok::ClassDescriptor` for the object model module.FieldflagsExposes `flags` on `epok::ClassDescriptor` for the object model module.FieldgenerationExposes `generation` on `epok::ObjectId` for the object model module.FieldgenerationExposes `generation` on `epok::ObjectSlot` for the object model module.FieldhandlesExposes `handles` on `epok::ObjectPool` for the object model module.VariableidExposes `id` on `epok::ClassDescriptor` for the object model module.FieldindexExposes `index` on `epok::ObjectId` for the object model module.FieldInitializedNamed value `Initialized` in `epok::ObjectState`.Enum valueinstanceExposes `instance` on `epok::ObjectSlot` for the object model module.FieldlevelService context.FieldLevelNamed value `Level` in `epok::ObjectFamily`.Enum valuelevel_actor_capacityExposes `level_actor_capacity` on the `epok` namespace for the object model module.Variablelevel_pending_capacityExposes `level_pending_capacity` on the `epok` namespace for the object model module.VariableLevelUnloadedNamed value `LevelUnloaded` in `epok::EndPlayReason`.Enum valuelocalExposes `local` on `epok::AudioComponent` for the object model module.FieldlocalExposes `local` on `epok::RectTransformComponent` for the object model module.FieldlocalExposes `local` on `epok::SceneComponent3D` for the object model module.Fieldlogical_parentExposes `logical_parent` on `epok::ActorSpawnRequest` for the object model module.FieldnameExposes `name` on `epok::ActorSpawnRequest` for the object model module.FieldnameExposes `name` on `epok::NativeComponentDefault` for the object model module.FieldNoneNamed value `None` in `epok::ObjectDomain`.Enum valueObjectNamed value `Object` in `epok::ObjectFamily`.Enum valueobject_class_countExposes `object_class_count` on the `epok` namespace for the object model module.Variableobject_classesEmitted by the Rust cook next to the scene banks.Variableobject_hierarchy_depthExposes `object_hierarchy_depth` on the `epok` namespace for the object model module.VariableObjectClassAbstractNamed value `ObjectClassAbstract` in `epok::ObjectClassFlags`.Enum valueObjectClassMultipleNamed value `ObjectClassMultiple` in `epok::ObjectClassFlags`.Enum valueObjectClassPlaceableNamed value `ObjectClassPlaceable` in `epok::ObjectClassFlags`.Enum valueObjectClassRootNamed value `ObjectClassRoot` in `epok::ObjectClassFlags`.Enum valueObjectClassSceneManagedNamed value `ObjectClassSceneManaged` in `epok::ObjectClassFlags`.Enum valueObjectClassSpawnableNamed value `ObjectClassSpawnable` in `epok::ObjectClassFlags`.Enum valueowners_maskExposes `owners_mask` on `epok::ClassDescriptor` for the object model module.Fieldowns_storageExposes `owns_storage` on `epok::ObjectSlot` for the object model module.FieldparentExposes `parent` on `epok::ClassDescriptor` for the object model module.FieldpeakExposes `peak` on `epok::ObjectStats` for the object model module.FieldPlayingNamed value `Playing` in `epok::ObjectState`.Enum valuepositionExposes `position` on `epok::Transform2D` for the object model module.FieldquarantinedExposes `quarantined` on `epok::ObjectStats` for the object model module.FieldQuitNamed value `Quit` in `epok::EndPlayReason`.Enum valuereasonExposes `reason` on `epok::LevelPendingOp` for the object model module.FieldrectExposes `rect` on `epok::RectTransformComponent` for the object model module.FieldregistryExposes `registry` on `epok::ObjectDispatchScope` for the object model module.FieldregistryExposes `registry` on `epok::World` for the object model module.FieldrejectedExposes `rejected` on `epok::ObjectStats` for the object model module.FieldreleaseExposes `release` on `epok::ClassDescriptor` for the object model module.FieldreleasingExposes `releasing` on `epok::ObjectSlot` for the object model module.FieldrequestExposes `request` on `epok::LevelPendingOp` for the object model module.FieldReservedNamed value `Reserved` in `epok::ObjectState`.Enum valuerootExposes `root` on `epok::Actor2D` for the object model module.FieldrootExposes `root` on `epok::Actor3D` for the object model module.FieldrootExposes `root` on `epok::NativeComponentDefault` for the object model module.FieldrootExposes `root` on `epok::UIActor` for the object model module.FieldrotationExposes `rotation` on `epok::Transform2D` for the object model module.FieldscaleExposes `scale` on `epok::Transform2D` for the object model module.Fieldsha256_kExposes `sha256_k` on the `epok::detail` namespace for the object model module.VariablesizeExposes `size` on `epok::ClassDescriptor` for the object model module.FieldslotsExposes `slots` on `epok::ObjectRegistry` for the object model module.FieldsourceExposes `source` on `epok::AudioComponent` for the object model module.FieldspawnedExposes `spawned` on `epok::ObjectStats` for the object model module.FieldstateExposes `state` on `epok::ObjectSlot` for the object model module.Fieldstatic_class_idExposes `static_class_id` on `epok::Actor` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Actor2D` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Actor3D` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::ActorComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::AudioComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::BlobShadowComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Camera3DComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::CanvasComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Collider3DComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::ImageComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Level` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Light3DComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Mesh3DComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Object` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::PaletteAnimatorComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::ParticleEffectComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::ParticleEmitterComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::ProgressBarComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::RectTransformComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::SceneComponent2D` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::SceneComponent3D` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::SceneScriptActor` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::Sprite3DComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::TextComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::TimelineComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::UIActor` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::UIComponent` for the object model module.Variablestatic_class_idExposes `static_class_id` on `epok::World` for the object model module.VariablestatsExposes `stats` on `epok::ObjectRegistry` for the object model module.Fieldstorage_bytesExposes `storage_bytes` on `epok::ObjectPool` for the object model module.VariabletableExposes `table` on `epok::ObjectRegistryStorage` for the object model module.Fieldtransform2D actors own their transform: no legacy slot carries a Transform2D, and no fictitious 3D transform is created for them.FieldtransformView over the canonical slot transform when the owner is backed by a legacy entity.FieldtypeExposes `type` on `epok::ActorSpawnRequest` for the object model module.FieldtypeExposes `type` on `epok::ObjectSlot` for the object model module.FieldUINamed value `UI` in `epok::ObjectDomain`.Enum valueUnusedNamed value `Unused` in `epok::ObjectState`.Enum valueusedExposes `used` on `epok::ObjectPool` for the object model module.VariableusedExposes `used` on `epok::ObjectSlot` for the object model module.FieldvaluesExposes `values` on `epok::ObjectPool` for the object model module.VariableWorldNamed value `World` in `epok::ObjectFamily`.Enum valueWorld2DNamed value `World2D` in `epok::ObjectDomain`.Enum valueWorld3DNamed value `World3D` in `epok::ObjectDomain`.Enum value