Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
ecs_type_hooks_t Struct Reference

Type that contains component lifecycle callbacks. More...

#include <flecs.h>

Public Attributes

ecs_xtor_t ctor
 ctor More...
 
ecs_xtor_t dtor
 dtor More...
 
ecs_copy_t copy
 copy assignment More...
 
ecs_move_t move
 move assignment More...
 
ecs_copy_t copy_ctor
 Ctor + copy. More...
 
ecs_move_t move_ctor
 Ctor + move. More...
 
ecs_move_t ctor_move_dtor
 Ctor + move + dtor (or move_ctor + dtor). More...
 
ecs_move_t move_dtor
 Move + dtor. More...
 
ecs_iter_action_t on_add
 Callback that is invoked when an instance of a component is added. More...
 
ecs_iter_action_t on_set
 Callback that is invoked when an instance of the component is set. More...
 
ecs_iter_action_t on_remove
 Callback that is invoked when an instance of the component is removed. More...
 
void * ctx
 User defined context. More...
 
void * binding_ctx
 Language binding context. More...
 
ecs_ctx_free_t ctx_free
 Callback to free ctx. More...
 
ecs_ctx_free_t binding_ctx_free
 Callback to free binding_ctx. More...
 

Detailed Description

Type that contains component lifecycle callbacks.

Definition at line 689 of file flecs.h.

Member Data Documentation

◆ binding_ctx

void* ecs_type_hooks_t::binding_ctx

Language binding context.

Definition at line 728 of file flecs.h.

◆ binding_ctx_free

ecs_ctx_free_t ecs_type_hooks_t::binding_ctx_free

Callback to free binding_ctx.

Definition at line 731 of file flecs.h.

◆ copy

ecs_copy_t ecs_type_hooks_t::copy

copy assignment

Definition at line 692 of file flecs.h.

◆ copy_ctor

ecs_copy_t ecs_type_hooks_t::copy_ctor

Ctor + copy.

Definition at line 696 of file flecs.h.

◆ ctor

ecs_xtor_t ecs_type_hooks_t::ctor

ctor

Definition at line 690 of file flecs.h.

◆ ctor_move_dtor

ecs_move_t ecs_type_hooks_t::ctor_move_dtor

Ctor + move + dtor (or move_ctor + dtor).

This combination is typically used when a component is moved from one location to a new location, like when it is moved to a new table. If not set explicitly it will be derived from other callbacks.

Definition at line 705 of file flecs.h.

◆ ctx

void* ecs_type_hooks_t::ctx

User defined context.

Definition at line 727 of file flecs.h.

◆ ctx_free

ecs_ctx_free_t ecs_type_hooks_t::ctx_free

Callback to free ctx.

Definition at line 730 of file flecs.h.

◆ dtor

ecs_xtor_t ecs_type_hooks_t::dtor

dtor

Definition at line 691 of file flecs.h.

◆ move

ecs_move_t ecs_type_hooks_t::move

move assignment

Definition at line 693 of file flecs.h.

◆ move_ctor

ecs_move_t ecs_type_hooks_t::move_ctor

Ctor + move.

Definition at line 699 of file flecs.h.

◆ move_dtor

ecs_move_t ecs_type_hooks_t::move_dtor

Move + dtor.

This combination is typically used when a component is moved from one location to an existing location, like what happens during a remove. If not set explicitly it will be derived from other callbacks.

Definition at line 711 of file flecs.h.

◆ on_add

ecs_iter_action_t ecs_type_hooks_t::on_add

Callback that is invoked when an instance of a component is added.

This callback is invoked before triggers are invoked.

Definition at line 715 of file flecs.h.

◆ on_remove

ecs_iter_action_t ecs_type_hooks_t::on_remove

Callback that is invoked when an instance of the component is removed.

This callback is invoked after the triggers are invoked, and before the destructor is invoked.

Definition at line 725 of file flecs.h.

◆ on_set

ecs_iter_action_t ecs_type_hooks_t::on_set

Callback that is invoked when an instance of the component is set.

This callback is invoked before triggers are invoked, and enable the component to respond to changes on itself before others can.

Definition at line 720 of file flecs.h.


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