pub type ecs_poly_t = c_void;Expand description
A poly object. A poly (short for polymorph) object is an object that has a variable list of capabilities, determined by a mixin table. This is the current list of types in the flecs API that can be used as an ecs_poly_t:
- ecs_world_t
- ecs_stage_t
- ecs_query_t
- ecs_filter_t
- ecs_rule_t
- (more to come)
Functions that accept an ecs_poly_t argument can accept objects of these types. If the object does not have the requested mixin the API will throw an assert.
The poly/mixin framework enables partially overlapping features to be implemented once, and enables objects of different types to interact with each other depending on what mixins they have, rather than their type (in some ways it’s like a mini-ECS). Additionally, each poly object has a header that enables the API to do sanity checking on the input arguments.
Aliased Type§
pub enum ecs_poly_t {}