![]() |
Flecs v4.1
A fast entity component system (ECS) for C & C++
|
Use with ecs_system_init() and ecs_system_update(). More...
#include <system.h>
Public Attributes | |
| int32_t | _canary |
| Used for validity testing. | |
| ecs_entity_t | entity |
| Existing entity to associate with the system (optional). | |
| ecs_query_desc_t | query |
| System query parameters. | |
| ecs_entity_t | phase |
| Optional pipeline phase for the system to run in. | |
| ecs_iter_action_t | callback |
| Callback that is run for each result returned by the system's query. | |
| ecs_run_action_t | run |
| Callback that is invoked when a system is run. | |
| void * | ctx |
| Context to be passed to callback (as ecs_iter_t::param). | |
| ecs_ctx_free_t | ctx_free |
| Callback to free ctx. | |
| void * | callback_ctx |
| Context associated with callback (for language bindings). | |
| ecs_ctx_free_t | callback_ctx_free |
| Callback to free callback ctx. | |
| void * | run_ctx |
| Context associated with run (for language bindings). | |
| ecs_ctx_free_t | run_ctx_free |
| Callback to free run ctx. | |
| ecs_ftime_t | interval |
| Interval in seconds at which the system should run. | |
| int32_t | rate |
| Rate at which the system should run. | |
| ecs_entity_t | tick_source |
| External tick source that determines when the system ticks. | |
| bool | multi_threaded |
| If true, the system will be run on multiple threads. | |
| bool | immediate |
| If true, the system will have access to the actual world. | |
Use with ecs_system_init() and ecs_system_update().
| int32_t ecs_system_desc_t::_canary |
| ecs_iter_action_t ecs_system_desc_t::callback |
| void* ecs_system_desc_t::callback_ctx |
| ecs_ctx_free_t ecs_system_desc_t::callback_ctx_free |
| void* ecs_system_desc_t::ctx |
Context to be passed to callback (as ecs_iter_t::param).
| ecs_ctx_free_t ecs_system_desc_t::ctx_free |
| ecs_entity_t ecs_system_desc_t::entity |
| bool ecs_system_desc_t::immediate |
| ecs_ftime_t ecs_system_desc_t::interval |
| bool ecs_system_desc_t::multi_threaded |
| ecs_entity_t ecs_system_desc_t::phase |
| ecs_query_desc_t ecs_system_desc_t::query |
| int32_t ecs_system_desc_t::rate |
| ecs_run_action_t ecs_system_desc_t::run |
Callback that is invoked when a system is run.
When left to NULL, the default system runner is used, which calls the "callback" action for each result returned from the system's query.
It should not be assumed that the input iterator can always be iterated with ecs_query_next(). When a system is multithreaded and/or paged, the iterator can be either a worker or a paged iterator. The correct function to use for iteration is ecs_iter_next().
An implementation can test whether the iterator is a query iterator by testing whether the it->next value is equal to ecs_query_next().
| void* ecs_system_desc_t::run_ctx |
| ecs_ctx_free_t ecs_system_desc_t::run_ctx_free |
| ecs_entity_t ecs_system_desc_t::tick_source |