Crate flecs

Source

Re-exports§

pub use filter::*;
pub use id::*;
pub use query::*;
pub use system::*;
pub use terms::*;
pub use world::*;

Modules§

bindings
filter
id
query
system
terms
world

Macros§

expr
tuple_index

Structs§

ComponentDescriptor
EcsAlertInstance
Alert information. Added to each alert instance
EcsAlertsActive
Map with active alerts for entity.
EcsArray
Component added to array type entities
EcsBitmask
Component added to bitmask type entities
EcsComponent
Component information.
EcsDocDescription
EcsEnum
Component added to enum type entities
EcsIdentifier
A (string) identifier. Used as pair with EcsName and EcsSymbol tags
EcsMember
Component added to member entities
EcsMemberRanges
Component added to member entities to express valid value ranges
EcsMetaType
Component that is automatically added to every type with the right kind.
EcsMetaTypeSerialized
EcsMetricSource
EcsMetricValue
EcsOpaque
EcsPipelineStats
EcsPoly
Component for storing a poly object
EcsPrimitive
Component added to primitive types
EcsRateFilter
Apply a rate filter to a tick source
EcsRest
EcsScript
Script component
EcsStatsHeader
EcsStruct
Component added to struct type entities
EcsTarget
Target data for flattened relationships.
EcsTickSource
Component used to provide a tick source to systems
EcsTimer
Component used for one shot/interval timer functionality
EcsUnit
EcsUnitPrefix
EcsVector
Component added to vector type entities
EcsWorldStats
EcsWorldSummary
Entity
EntityTypeInfo
ecs_alert_desc_t
ecs_alert_severity_filter_t
ecs_allocator_t
ecs_app_desc_t
Used with ecs_app_run.
ecs_array_desc_t
Used with ecs_array_init.
ecs_bitmask_constant_t
ecs_bitmask_desc_t
Used with ecs_bitmask_init.
ecs_block_allocator_block_t
ecs_block_allocator_chunk_header_t
ecs_block_allocator_t
ecs_bucket_entry_t
Map type
ecs_bucket_t
ecs_bulk_desc_t
Used with ecs_bulk_init
ecs_component_desc_t
Used with ecs_component_init.
ecs_counter_t
Monotonically increasing counter
ecs_data_t
ecs_entity_desc_t
Used with ecs_entity_init
ecs_entity_to_json_desc_t
Used with ecs_iter_to_json.
ecs_enum_constant_t
ecs_enum_desc_t
Used with ecs_enum_init.
ecs_event_desc_t
Used with ecs_emit.
ecs_event_id_record_t
ecs_event_record_t
Mixin for emitting events to triggers/observers / /* All observers for a specific event
ecs_expr_var_scope_t
ecs_expr_var_t
Storage for parser variables. Variables make it possible to parameterize expression strings, and are referenced with the $ operator (e.g. $var).
ecs_filter_desc_t
Used with ecs_filter_init.
ecs_filter_iter_t
Filter-iterator specific data
ecs_filter_t
Filters alllow for ad-hoc quick filtering of entity tables.
ecs_flatten_desc_t
ecs_from_json_desc_t
Used with ecs_ptr_from_json, ecs_entity_from_json.
ecs_gauge_t
Simple value that indicates current state
ecs_hashmap_t
ecs_header_t
Header for ecs_poly_t objects.
ecs_hm_bucket_t
ecs_http_connection_t
A connection manages communication with the remote host
ecs_http_key_value_t
Helper type used for headers & URL query parameters
ecs_http_reply_t
A reply
ecs_http_request_t
A request
ecs_http_server_desc_t
Used with ecs_http_server_init.
ecs_http_server_t
ecs_id_record_t
ecs_iter_cache_t
Inline iterator arrays to prevent allocations for small array sizes
ecs_iter_private_t
Private iterator data. Used by iterator implementations to keep track of progress & to provide builtin storage.
ecs_iter_t
Iterator
ecs_iter_to_json_desc_t
Used with ecs_iter_to_json.
ecs_iterable_t
Iterable mixin. Allows its container to be iterated.
ecs_map_iter_t
ecs_map_params_t
ecs_map_t
ecs_member_t
Element type of members vector in EcsStruct
ecs_member_value_range_t
Type expressing a range for a member value
ecs_meta_cursor_t
Type that enables iterating/populating a value using reflection data
ecs_meta_scope_t
ecs_meta_type_op_t
ecs_metric_desc_t
ecs_mixins_t
ecs_observable_t
ecs_observer_desc_t
Used with ecs_observer_init.
ecs_observer_t
An observer reacts to events matching a filter
ecs_opaque_desc_t
Used with ecs_opaque_init.
ecs_os_api_t
Prefix members of struct with ‘ecs_’ as some system headers may define macros for functions like “strdup”, “log” or “_free”
ecs_page_iter_t
Page-iterator specific data
ecs_parse_expr_desc_t
Used with ecs_parse_expr.
ecs_pipeline_desc_t
Pipeline descriptor (used with ecs_pipeline_init)
ecs_pipeline_stats_t
Statistics for all systems in a pipeline.
ecs_primitive_desc_t
Used with ecs_primitive_init.
ecs_query_desc_t
Used with ecs_query_init.
ecs_query_group_info_t
Type that contains information about a query group.
ecs_query_iter_t
Query-iterator specific data
ecs_query_stats_t
Statistics for a single query (use ecs_query_stats_get)
ecs_query_t
ecs_query_table_match_t
ecs_record_t
Record for entity index
ecs_ref_t
Cached reference.
ecs_rule_iter_t
Rule-iterator specific data
ecs_rule_op_ctx_t
Operation-specific state
ecs_rule_op_profile_t
ecs_rule_op_t
ecs_rule_t
ecs_rule_var_t
ecs_script_desc_t
Used with ecs_script_init
ecs_serializer_t
Serializer interface
ecs_snapshot_iter_t
Snapshot-iterator specific data
ecs_snapshot_t
ecs_sparse_t
ecs_stack_cursor_t
ecs_stack_page_t
Cursor to stack allocator. Type is public to allow for white box testing.
ecs_stack_t
ecs_stage_t
ecs_strbuf_element
ecs_strbuf_element_embedded
ecs_strbuf_element_str
ecs_strbuf_list_elem
ecs_strbuf_t
ecs_struct_desc_t
Used with ecs_struct_init.
ecs_switch_t
ecs_sync_stats_t
Statistics for sync point
ecs_system_desc_t
Use with ecs_system_init
ecs_system_stats_t
Statistics for a single system (use ecs_system_stats_get)
ecs_table_cache_hdr_t
ecs_table_cache_iter_t
Convenience struct to iterate table array for id
ecs_table_range_t
Range in table
ecs_table_record_t
ecs_table_t
ecs_term_id_t
Type that describes a single identifier in a term
ecs_term_iter_t
Term-iterator specific data
ecs_term_t
Type that describes a term (single element in a query)
ecs_time_t
ecs_type_hooks_t
Type that contains component lifecycle callbacks.
ecs_type_info_t
Type that contains component information (passed to ctors/dtors/…)
ecs_type_t
A type is a list of (component) ids. Types are used to communicate the “type” of an entity. In most type systems a typeof operation returns a single type. In ECS however, an entity can have multiple components, which is why an ECS type consists of a vector of ids.
ecs_unit_desc_t
Used with ecs_unit_init.
ecs_unit_prefix_desc_t
Used with ecs_unit_prefix_init.
ecs_unit_translation_t
Helper type to describe translation between two units. Note that this is not intended as a generic approach to unit conversions (e.g. from celsius to fahrenheit) but to translate between units that derive from the same base (e.g. meters to kilometers).
ecs_value_t
Utility to hold a value of a dynamic type
ecs_var_t
Value of query variable
ecs_vars_t
ecs_vec_t
A component column.
ecs_vector_desc_t
Used with ecs_vector_init.
ecs_worker_iter_t
Worker-iterator specific data
ecs_world_info_t
Type that contains information about the world.
ecs_world_info_t__bindgen_ty_1
– Command counts –
ecs_world_stats_t
ecs_world_stats_t__bindgen_ty_1
Entities
ecs_world_stats_t__bindgen_ty_2
Components and ids
ecs_world_stats_t__bindgen_ty_3
Tables
ecs_world_stats_t__bindgen_ty_4
Queries & events
ecs_world_stats_t__bindgen_ty_5
Commands
ecs_world_stats_t__bindgen_ty_6
Frame data
ecs_world_stats_t__bindgen_ty_7
Timing
ecs_world_stats_t__bindgen_ty_8
ecs_world_stats_t__bindgen_ty_9
REST statistics
ecs_world_stats_t__bindgen_ty_10
HTTP statistics
ecs_world_t
ecs_world_to_json_desc_t
Used with ecs_iter_to_json.
flecs_hashmap_iter_t
flecs_hashmap_result_t

Constants§

ECS_ACCESS_VIOLATION
ECS_ALERT_MAX_SEVERITY_FILTERS
ECS_ALREADY_DEFINED
ECS_ALREADY_IN_USE
ECS_BLACK
ECS_BLUE
ECS_BOLD
ECS_COLUMN_INDEX_OUT_OF_RANGE
ECS_COLUMN_IS_NOT_SHARED
ECS_COLUMN_IS_SHARED
ECS_COLUMN_TYPE_MISMATCH
ECS_COMPONENT_MASK
ECS_COMPONENT_NOT_REGISTERED
ECS_CONSTRAINT_VIOLATED
ECS_CYAN
ECS_CYCLE_DETECTED
ECS_DOUBLE_FREE
ECS_ENTITY_MASK
ECS_GENERATION_MASK
ECS_GREEN
ECS_GREY
ECS_HTTP_HEADER_COUNT_MAX
ECS_HTTP_QUERY_PARAM_COUNT_MAX
ECS_ID_FLAGS_MASK
ECS_ID_IN_USE
ECS_INCONSISTENT_COMPONENT_ACTION
ECS_INCONSISTENT_COMPONENT_ID
ECS_INCONSISTENT_NAME
ECS_INTERNAL_ERROR
ECS_INVALID_COMPONENT_ALIGNMENT
ECS_INVALID_COMPONENT_SIZE
ECS_INVALID_CONVERSION
ECS_INVALID_FROM_WORKER
ECS_INVALID_OPERATION
ECS_INVALID_PARAMETER
ECS_INVALID_WHILE_READONLY
ECS_LEAK_DETECTED
ECS_LOCKED_STORAGE
ECS_MAGENTA
ECS_MAX_RECURSION
ECS_MAX_TOKEN_SIZE
ECS_MEMBER_DESC_CACHE_SIZE
ECS_META_MAX_SCOPE_DEPTH
ECS_MISSING_OS_API
ECS_MISSING_SYMBOL
ECS_MODULE_UNDEFINED
ECS_NAME_IN_USE
ECS_NORMAL
ECS_NOT_A_COMPONENT
ECS_OPERATION_FAILED
ECS_OUT_OF_MEMORY
ECS_OUT_OF_RANGE
ECS_RED
ECS_REST_DEFAULT_PORT
ECS_ROW_FLAGS_MASK
ECS_ROW_MASK
ECS_STAT_WINDOW
ECS_STRBUF_ELEMENT_SIZE
ECS_STRBUF_MAX_LIST_DEPTH
ECS_UNSUPPORTED
ECS_WHITE
ECS_YELLOW
EcsAperiodicComponentMonitors
EcsAperiodicEmptyQueries
EcsAperiodicEmptyTables
EcsCascade
EcsDown
EcsEntityIsId
EcsEntityIsTarget
EcsEntityIsTraversable
EcsEventNoOnSet
EcsEventTableOnly
EcsFilter
EcsFilterHasCondSet
EcsFilterHasPred
EcsFilterHasScopes
EcsFilterIsInstanced
EcsFilterMatchAnything
EcsFilterMatchDisabled
EcsFilterMatchEmptyTables
EcsFilterMatchOnlyThis
EcsFilterMatchPrefab
EcsFilterMatchThis
EcsFilterNoData
EcsFilterPopulate
EcsFilterUnresolvedByName
EcsFirstUserComponentId
EcsFirstUserEntityId
EcsIdAlwaysOverride
EcsIdDontInherit
EcsIdEventMask
EcsIdExclusive
EcsIdHasOnAdd
EcsIdHasOnRemove
EcsIdHasOnSet
EcsIdHasOnTableCreate
EcsIdHasOnTableDelete
EcsIdHasOnTableEmpty
EcsIdHasOnTableFill
EcsIdHasUnSet
EcsIdMarkedForDelete
EcsIdOnDeleteDelete
EcsIdOnDeleteMask
EcsIdOnDeleteObjectDelete
EcsIdOnDeleteObjectMask
EcsIdOnDeleteObjectPanic
EcsIdOnDeleteObjectRemove
EcsIdOnDeletePanic
EcsIdOnDeleteRemove
EcsIdTag
EcsIdTraversable
EcsIdUnion
EcsIdWith
EcsIsEntity
EcsIsName
EcsIsVariable
EcsIterEntityOptional
EcsIterHasCondSet
EcsIterHasShared
EcsIterIgnoreThis
EcsIterIsInstanced
EcsIterIsValid
EcsIterMatchVar
EcsIterNext
EcsIterNextYield
EcsIterNoData
EcsIterNoResults
EcsIterProfile
EcsIterTableOnly
EcsIterYield
EcsOsApiHighResolutionTimer
EcsOsApiLogWithColors
EcsOsApiLogWithTimeDelta
EcsOsApiLogWithTimeStamp
EcsParent
EcsQueryHasMonitor
EcsQueryHasNonThisOutTerms
EcsQueryHasOutTerms
EcsQueryHasRefs
EcsQueryIsOrphaned
EcsQueryIsSubquery
EcsQueryTrivialIter
EcsSelf
EcsTableHasAddActions
EcsTableHasBuiltins
EcsTableHasChildOf
EcsTableHasCopy
EcsTableHasCtors
EcsTableHasDtors
EcsTableHasIsA
EcsTableHasLifecycle
EcsTableHasModule
EcsTableHasMove
EcsTableHasName
EcsTableHasOnAdd
EcsTableHasOnRemove
EcsTableHasOnSet
EcsTableHasOnTableCreate
EcsTableHasOnTableDelete
EcsTableHasOnTableEmpty
EcsTableHasOnTableFill
EcsTableHasOverrides
EcsTableHasPairs
EcsTableHasRemoveActions
EcsTableHasTarget
EcsTableHasToggle
EcsTableHasTraversable
EcsTableHasUnSet
EcsTableHasUnion
EcsTableIsComplex
EcsTableIsDisabled
EcsTableIsPrefab
EcsTableMarkedForDelete
EcsTermIdInherited
EcsTermMatchAny
EcsTermMatchAnySrc
EcsTermMatchDisabled
EcsTermMatchPrefab
EcsTermReflexive
EcsTermSrcFirstEq
EcsTermSrcSecondEq
EcsTermTransitive
EcsTraverseAll
EcsTraverseFlags
EcsUp
EcsWorldFini
EcsWorldInit
EcsWorldMeasureFrameTime
EcsWorldMeasureSystemTime
EcsWorldMultiThreaded
EcsWorldQuit
EcsWorldQuitWorkers
EcsWorldReadonly
FLECS_ENTITY_PAGE_BITS
FLECS_EVENT_DESC_MAX
FLECS_HI_COMPONENT_ID
FLECS_HI_ID_RECORD_ID
FLECS_ID0ID_
FLECS_ID_DESC_MAX
FLECS_QUERY_SCOPE_NESTING_MAX
FLECS_SPARSE_PAGE_BITS
FLECS_SPARSE_PAGE_SIZE
FLECS_TERM_DESC_MAX
FLECS_VARIABLE_COUNT_MAX
ecs_filter_t_magic
ecs_http_method_t_EcsHttpDelete
ecs_http_method_t_EcsHttpGet
ecs_http_method_t_EcsHttpMethodUnsupported
ecs_http_method_t_EcsHttpOptions
ecs_http_method_t_EcsHttpPost
ecs_http_method_t_EcsHttpPut
ecs_inout_kind_t_EcsIn
< Term is only read
ecs_inout_kind_t_EcsInOut
< Term is both read and written
ecs_inout_kind_t_EcsInOutDefault
< InOut for regular terms, In for shared terms
ecs_inout_kind_t_EcsInOutNone
< Term is neither read nor written
ecs_inout_kind_t_EcsOut
< Term is only written
ecs_iter_kind_t_EcsIterEvalChain
ecs_iter_kind_t_EcsIterEvalCondition
ecs_iter_kind_t_EcsIterEvalNone
ecs_iter_kind_t_EcsIterEvalTables
ecs_meta_type_op_kind_t_EcsMetaTypeOpKindLast
ecs_meta_type_op_kind_t_EcsOpArray
ecs_meta_type_op_kind_t_EcsOpBitmask
ecs_meta_type_op_kind_t_EcsOpBool
ecs_meta_type_op_kind_t_EcsOpByte
ecs_meta_type_op_kind_t_EcsOpChar
ecs_meta_type_op_kind_t_EcsOpEntity
ecs_meta_type_op_kind_t_EcsOpEnum
ecs_meta_type_op_kind_t_EcsOpF32
ecs_meta_type_op_kind_t_EcsOpF64
ecs_meta_type_op_kind_t_EcsOpI8
ecs_meta_type_op_kind_t_EcsOpI16
ecs_meta_type_op_kind_t_EcsOpI32
ecs_meta_type_op_kind_t_EcsOpI64
ecs_meta_type_op_kind_t_EcsOpIPtr
ecs_meta_type_op_kind_t_EcsOpOpaque
ecs_meta_type_op_kind_t_EcsOpPop
ecs_meta_type_op_kind_t_EcsOpPrimitive
< Marks first constant that’s a primitive
ecs_meta_type_op_kind_t_EcsOpPush
ecs_meta_type_op_kind_t_EcsOpScope
< Marks last constant that can open/close a scope
ecs_meta_type_op_kind_t_EcsOpString
ecs_meta_type_op_kind_t_EcsOpU8
ecs_meta_type_op_kind_t_EcsOpU16
ecs_meta_type_op_kind_t_EcsOpU32
ecs_meta_type_op_kind_t_EcsOpU64
ecs_meta_type_op_kind_t_EcsOpUPtr
ecs_meta_type_op_kind_t_EcsOpVector
ecs_observer_t_magic
ecs_oper_kind_t_EcsAnd
< The term must match
ecs_oper_kind_t_EcsAndFrom
< Term must match all components from term id
ecs_oper_kind_t_EcsNot
< The term must not match
ecs_oper_kind_t_EcsNotFrom
< Term must match none of the components from term id
ecs_oper_kind_t_EcsOptional
< The term may match
ecs_oper_kind_t_EcsOr
< One of the terms in an or chain must match
ecs_oper_kind_t_EcsOrFrom
< Term must match at least one component from term id
ecs_primitive_kind_t_EcsBool
ecs_primitive_kind_t_EcsByte
ecs_primitive_kind_t_EcsChar
ecs_primitive_kind_t_EcsEntity
ecs_primitive_kind_t_EcsF32
ecs_primitive_kind_t_EcsF64
ecs_primitive_kind_t_EcsI8
ecs_primitive_kind_t_EcsI16
ecs_primitive_kind_t_EcsI32
ecs_primitive_kind_t_EcsI64
ecs_primitive_kind_t_EcsIPtr
ecs_primitive_kind_t_EcsPrimitiveKindLast
ecs_primitive_kind_t_EcsString
ecs_primitive_kind_t_EcsU8
ecs_primitive_kind_t_EcsU16
ecs_primitive_kind_t_EcsU32
ecs_primitive_kind_t_EcsU64
ecs_primitive_kind_t_EcsUPtr
ecs_query_t_magic
ecs_rule_t_magic
ecs_stage_t_magic
ecs_table_t_magic
ecs_trigger_t_magic
ecs_type_kind_t_EcsArrayType
ecs_type_kind_t_EcsBitmaskType
ecs_type_kind_t_EcsEnumType
ecs_type_kind_t_EcsOpaqueType
ecs_type_kind_t_EcsPrimitiveType
ecs_type_kind_t_EcsStructType
ecs_type_kind_t_EcsTypeKindLast
ecs_type_kind_t_EcsVectorType
ecs_world_t_magic
flecs_iter_cache_all
flecs_iter_cache_columns
flecs_iter_cache_ids
flecs_iter_cache_match_indices
flecs_iter_cache_ptrs
flecs_iter_cache_sources
flecs_iter_cache_variables

Statics§

ECS_AND
Include all components from entity to which AND is applied
ECS_FILTER_INIT
Use $this variable to initialize user-allocated filter object
ECS_OVERRIDE
Automatically override component when it is inherited
ECS_PAIR
Indicates that the id is a pair.
ECS_TOGGLE
Adds bitset to storage which allows component to be enabled/disabled
EcsAcceleration
EcsAcyclic
Marks a relationship as acyclic. Acyclic relationships may not form cycles.
EcsAlertCritical
EcsAlertError
EcsAlertInfo
EcsAlertWarning
EcsAlias
Tag to indicate alias identifier
EcsAlwaysOverride
Ensures a component is always overridden.
EcsAmount
EcsAmpere
EcsAngle
EcsAny
Any entity (“_”). Matches any id, returns only the first.
EcsAtto
EcsBar
EcsBel
EcsBits
EcsBitsPerSecond
EcsBytes
EcsBytesPerSecond
EcsCandela
EcsCelsius
EcsCenti
EcsCentiMeters
EcsChildOf
Used to express parent-child relationships.
EcsConstant
EcsCounter
EcsCounterId
EcsCounterIncrement
EcsData
EcsDataRate
EcsDate
EcsDays
EcsDeca
EcsDeci
EcsDeciBel
EcsDefaultChildComponent
Used like (EcsDefaultChildComponent, Component). When added to an entity, this informs serialization formats which component to use when a value is assigned to an entity without specifying the component. This is intended as a hint, serialization formats are not required to use it. Adding this component does not change the behavior of core ECS operations.
EcsDegrees
EcsDelete
Delete cleanup policy. Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.
EcsDependsOn
Used to express dependency relationships
EcsDisabled
When this tag is added to an entity it is skipped by queries, unless EcsDisabled is explicitly queried for.
EcsDocBrief
EcsDocColor
EcsDocDetail
EcsDocLink
EcsDontInherit
Ensures that component is never inherited from an IsA target.
EcsDuration
EcsElectricCurrent
EcsEmpty
Tag used to indicate query is empty
EcsExa
EcsExbi
EcsExclusive
Can be added to relationship to indicate that the relationship can only occur once on an entity. Adding a 2nd instance will replace the 1st.
EcsFahrenheit
EcsFemto
EcsFinal
Ensures that entity/component cannot be used as target in IsA relationship. Final can improve the performance of rule-based queries, as they will not attempt to substitute a final component with its subsets.
EcsFlatten
Tag added to root entity to indicate its subtree should be flattened. Used together with assemblies.
EcsFlecs
Root scope for builtin flecs entities
EcsFlecsCore
Core module scope
EcsForce
EcsFrequency
EcsGauge
EcsGibi
EcsGibiBytes
EcsGiga
EcsGigaBits
EcsGigaBitsPerSecond
EcsGigaBytes
EcsGigaBytesPerSecond
EcsGigaHertz
EcsGrams
EcsHecto
EcsHertz
EcsHours
EcsIsA
Used to express inheritance relationships.
EcsKelvin
EcsKibi
EcsKibiBytes
EcsKilo
EcsKiloBits
EcsKiloBitsPerSecond
EcsKiloBytes
EcsKiloBytesPerSecond
EcsKiloGrams
EcsKiloHertz
EcsKiloMeters
EcsKiloMetersPerHour
EcsKiloMetersPerSecond
EcsLength
EcsLuminousIntensity
EcsMass
EcsMebi
EcsMebiBytes
EcsMega
EcsMegaBits
EcsMegaBitsPerSecond
EcsMegaBytes
EcsMegaBytesPerSecond
EcsMegaHertz
EcsMeters
EcsMetersPerSecond
EcsMetric
EcsMetricInstance
EcsMicro
EcsMicroMeters
EcsMicroSeconds
EcsMiles
EcsMilesPerHour
EcsMilli
EcsMilliMeters
EcsMilliSeconds
EcsMinutes
EcsModule
Tag added to module entities
EcsMole
EcsMonitor
Event that triggers observer when an entity starts/stops matching a query
EcsName
Tag to indicate name identifier
EcsNano
EcsNanoMeters
EcsNanoSeconds
EcsNewton
EcsObserver
EcsOnAdd
Event that triggers when an id is added to an entity
EcsOnDelete
Relationship used for specifying cleanup behavior.
EcsOnDeleteTarget
Relationship used to define what should happen when a target entity (second element of a pair) is deleted.
EcsOnLoad
EcsOnRemove
Event that triggers when an id is removed from an entity
EcsOnSet
Event that triggers when a component is set for an entity
EcsOnStart
EcsOnStore
EcsOnTableCreate
Event that triggers when a table is created.
EcsOnTableDelete
Event that triggers when a table is deleted.
EcsOnTableEmpty
Event that triggers when a table becomes empty (doesn’t emit on creation).
EcsOnTableFill
Event that triggers when a table becomes non-empty.
EcsOnUpdate
EcsOnValidate
EcsOneOf
Ensure that relationship target is child of specified entity.
EcsPanic
Panic cleanup policy. Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.
EcsPascal
EcsPebi
EcsPercentage
EcsPeriod1d
EcsPeriod1h
EcsPeriod1m
EcsPeriod1s
EcsPeriod1w
EcsPeta
EcsPhase
EcsPico
EcsPicoMeters
EcsPicoSeconds
EcsPixels
EcsPostFrame
EcsPostLoad
EcsPostUpdate
EcsPreFrame
EcsPreStore
EcsPreUpdate
EcsPredEq
Builtin predicates for comparing entity ids in queries. Only supported by rules
EcsPredLookup
EcsPredMatch
EcsPrefab
Tag added to prefab entities. Any entity with this tag is automatically ignored by queries, unless EcsPrefab is explicitly queried for.
EcsPressure
EcsPrivate
Tag to indicate an entity/component/system is private to a module
EcsQuantity
EcsQuery
EcsRadians
EcsReflexive
Marks a relatoinship as reflexive. Behavior: R(X, X) == true
EcsRemove
Remove cleanup policy. Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.
EcsScopeClose
EcsScopeOpen
Builtin marker entities for opening/closing query scopes
EcsSeconds
EcsSlotOf
Used to express a slot (used with prefab inheritance)
EcsSpeed
EcsSymbol
Tag to indicate symbol identifier
EcsSymmetric
Marks relationship as commutative. Behavior: if R(X, Y) then R(Y, X)
EcsSystem
System module component ids
EcsTag
Can be added to relationship to indicate that it should never hold data, even when it or the relationship target is a component.
EcsTebi
EcsTemperature
EcsTera
EcsThis
This entity. Default source for queries.
EcsTime
EcsTransitive
Marks a relationship as transitive. Behavior: if R(X, Y) and R(Y, Z) then R(X, Z)
EcsTraversable
Marks a relationship as traversable. Traversable relationships may be traversed with “up” queries. Traversable relationships are acyclic.
EcsUnSet
Event that triggers when a component is unset for an entity
EcsUnion
Tag to indicate that relationship is stored as union. Union relationships enable changing the target of a union without switching tables. Union relationships are also marked as exclusive.
EcsUnitPrefixes
EcsUri
EcsUriFile
EcsUriHyperlink
EcsUriImage
EcsVariable
Variable entity (“$”). Used in expressions to prefix variable names
EcsWildcard
Wildcard entity (“*”). Matches any id, returns all matches.
EcsWith
Ensure that a component always is added together with another component.
EcsWorld
Entity associated with world (used for “attaching” components to world)
EcsYobi
EcsYocto
EcsYotta
EcsZebi
EcsZepto
EcsZetta
FLECS_IDEcsAccelerationID_
FLECS_IDEcsAlertCriticalID_
FLECS_IDEcsAlertErrorID_
FLECS_IDEcsAlertID_
FLECS_IDEcsAlertInfoID_
FLECS_IDEcsAlertInstanceID_
FLECS_IDEcsAlertTimeoutID_
FLECS_IDEcsAlertWarningID_
FLECS_IDEcsAlertsActiveID_
FLECS_IDEcsAmountID_
FLECS_IDEcsAmpereID_
FLECS_IDEcsAngleID_
FLECS_IDEcsArrayID_
FLECS_IDEcsAttoID_
FLECS_IDEcsBarID_
FLECS_IDEcsBelID_
FLECS_IDEcsBitmaskID_
FLECS_IDEcsBitsID_
FLECS_IDEcsBitsPerSecondID_
FLECS_IDEcsBytesID_
FLECS_IDEcsBytesPerSecondID_
FLECS_IDEcsCandelaID_
FLECS_IDEcsCelsiusID_
FLECS_IDEcsCentiID_
FLECS_IDEcsCentiMetersID_
FLECS_IDEcsComponentID_
FLECS_IDEcsCounterID_
FLECS_IDEcsCounterIdID_
FLECS_IDEcsCounterIncrementID_
FLECS_IDEcsDataID_
FLECS_IDEcsDataRateID_
FLECS_IDEcsDateID_
FLECS_IDEcsDaysID_
FLECS_IDEcsDecaID_
FLECS_IDEcsDeciBelID_
FLECS_IDEcsDeciID_
FLECS_IDEcsDegreesID_
FLECS_IDEcsDocDescriptionID_
FLECS_IDEcsDurationID_
FLECS_IDEcsElectricCurrentID_
FLECS_IDEcsEnumID_
FLECS_IDEcsExaID_
FLECS_IDEcsExbiID_
FLECS_IDEcsFahrenheitID_
FLECS_IDEcsFemtoID_
FLECS_IDEcsForceID_
FLECS_IDEcsFrequencyID_
FLECS_IDEcsGaugeID_
FLECS_IDEcsGibiBytesID_
FLECS_IDEcsGibiID_
FLECS_IDEcsGigaBitsID_
FLECS_IDEcsGigaBitsPerSecondID_
FLECS_IDEcsGigaBytesID_
FLECS_IDEcsGigaBytesPerSecondID_
FLECS_IDEcsGigaHertzID_
FLECS_IDEcsGigaID_
FLECS_IDEcsGramsID_
FLECS_IDEcsHectoID_
FLECS_IDEcsHertzID_
FLECS_IDEcsHoursID_
FLECS_IDEcsIdentifierID_
FLECS_IDEcsIterableID_
FLECS_IDEcsKelvinID_
FLECS_IDEcsKibiBytesID_
FLECS_IDEcsKibiID_
FLECS_IDEcsKiloBitsID_
FLECS_IDEcsKiloBitsPerSecondID_
FLECS_IDEcsKiloBytesID_
FLECS_IDEcsKiloBytesPerSecondID_
FLECS_IDEcsKiloGramsID_
FLECS_IDEcsKiloHertzID_
FLECS_IDEcsKiloID_
FLECS_IDEcsKiloMetersID_
FLECS_IDEcsKiloMetersPerHourID_
FLECS_IDEcsKiloMetersPerSecondID_
FLECS_IDEcsLengthID_
FLECS_IDEcsLuminousIntensityID_
FLECS_IDEcsMassID_
FLECS_IDEcsMebiBytesID_
FLECS_IDEcsMebiID_
FLECS_IDEcsMegaBitsID_
FLECS_IDEcsMegaBitsPerSecondID_
FLECS_IDEcsMegaBytesID_
FLECS_IDEcsMegaBytesPerSecondID_
FLECS_IDEcsMegaHertzID_
FLECS_IDEcsMegaID_
FLECS_IDEcsMemberID_
FLECS_IDEcsMemberRangesID_
FLECS_IDEcsMetaTypeID_
FLECS_IDEcsMetaTypeSerializedID_
FLECS_IDEcsMetersID_
FLECS_IDEcsMetersPerSecondID_
FLECS_IDEcsMetricID_
FLECS_IDEcsMetricInstanceID_
FLECS_IDEcsMetricSourceID_
FLECS_IDEcsMetricValueID_
FLECS_IDEcsMicroID_
FLECS_IDEcsMicroMetersID_
FLECS_IDEcsMicroSecondsID_
FLECS_IDEcsMilesID_
FLECS_IDEcsMilesPerHourID_
FLECS_IDEcsMilliID_
FLECS_IDEcsMilliMetersID_
FLECS_IDEcsMilliSecondsID_
FLECS_IDEcsMinutesID_
FLECS_IDEcsMoleID_
FLECS_IDEcsNanoID_
FLECS_IDEcsNanoMetersID_
FLECS_IDEcsNanoSecondsID_
FLECS_IDEcsNewtonID_
FLECS_IDEcsOpaqueID_
FLECS_IDEcsPascalID_
FLECS_IDEcsPebiID_
FLECS_IDEcsPercentageID_
FLECS_IDEcsPetaID_
FLECS_IDEcsPicoID_
FLECS_IDEcsPicoMetersID_
FLECS_IDEcsPicoSecondsID_
FLECS_IDEcsPipelineID_
FLECS_IDEcsPipelineQueryID_
FLECS_IDEcsPipelineStatsID_
FLECS_IDEcsPixelsID_
FLECS_IDEcsPolyID_
FLECS_IDEcsPressureID_
FLECS_IDEcsPrimitiveID_
FLECS_IDEcsRadiansID_
FLECS_IDEcsRateFilterID_
FLECS_IDEcsRestID_
FLECS_IDEcsScriptID_
FLECS_IDEcsSecondsID_
FLECS_IDEcsSpeedID_
FLECS_IDEcsStructID_
FLECS_IDEcsTargetID_
FLECS_IDEcsTebiID_
FLECS_IDEcsTemperatureID_
FLECS_IDEcsTeraID_
FLECS_IDEcsTickSourceID_
FLECS_IDEcsTimeID_
FLECS_IDEcsTimerID_
FLECS_IDEcsUnitID_
FLECS_IDEcsUnitPrefixID_
FLECS_IDEcsUnitPrefixesID_
FLECS_IDEcsUriFileID_
FLECS_IDEcsUriHyperlinkID_
FLECS_IDEcsUriID_
FLECS_IDEcsUriImageID_
FLECS_IDEcsVectorID_
FLECS_IDEcsWorldStatsID_
FLECS_IDEcsWorldSummaryID_
FLECS_IDEcsYobiID_
FLECS_IDEcsYoctoID_
FLECS_IDEcsYottaID_
FLECS_IDEcsZebiID_
FLECS_IDEcsZeptoID_
FLECS_IDEcsZettaID_
FLECS_IDFlecsAlertsID_
FLECS_IDFlecsMetricsID_
FLECS_IDFlecsMonitorID_
FLECS_IDecs_bool_tID_
FLECS_IDecs_byte_tID_
FLECS_IDecs_char_tID_
FLECS_IDecs_entity_tID_
FLECS_IDecs_f32_tID_
FLECS_IDecs_f64_tID_
FLECS_IDecs_i8_tID_
FLECS_IDecs_i16_tID_
FLECS_IDecs_i32_tID_
FLECS_IDecs_i64_tID_
FLECS_IDecs_iptr_tID_
FLECS_IDecs_string_tID_
FLECS_IDecs_u8_tID_
FLECS_IDecs_u16_tID_
FLECS_IDecs_u32_tID_
FLECS_IDecs_u64_tID_
FLECS_IDecs_uptr_tID_
ecs_block_allocator_alloc_count
ecs_block_allocator_free_count
ecs_http_busy_count
ecs_http_request_handled_error_count
ecs_http_request_handled_ok_count
ecs_http_request_invalid_count
ecs_http_request_not_handled_count
ecs_http_request_preflight_count
ecs_http_request_received_count
Global statistics.
ecs_http_send_error_count
ecs_http_send_ok_count
ecs_os_api
ecs_os_api_calloc_count
ecs_os_api_free_count
ecs_os_api_malloc_count
Allocation counters
ecs_os_api_realloc_count
ecs_rest_delete_count
ecs_rest_delete_error_count
ecs_rest_enable_count
ecs_rest_enable_error_count
ecs_rest_entity_count
ecs_rest_entity_error_count
ecs_rest_pipeline_stats_count
ecs_rest_query_count
ecs_rest_query_error_count
ecs_rest_query_name_count
ecs_rest_query_name_error_count
ecs_rest_query_name_from_cache_count
ecs_rest_request_count
Global statistics
ecs_rest_stats_error_count
ecs_rest_world_stats_count
ecs_stack_allocator_alloc_count
ecs_stack_allocator_free_count

Traits§

AsEcsId
Component
ComponentGroup
Represents a group of components. Used for specifying which component types should be matched in query’s.

Functions§

FlecsAlertsImport
Module import
FlecsCoreDocImport
Module import
FlecsDocImport
Module import
FlecsMetaImport
Module import
FlecsMetricsImport
Module import
FlecsMonitorImport
Module import
FlecsPipelineImport
Module
FlecsRestImport
Module import
FlecsScriptImport
Module import
FlecsSystemImport
FlecsTimerImport
Module
FlecsUnitsImport
Module
ecs_abort_
ecs_add_id
Add a (component) id to an entity. This operation adds a single (component) id to an entity. If the entity already has the id, this operation will have no side effects.
ecs_add_path_w_sep
Add specified path to entity. This operation is similar to ecs_new_from_path, but will instead add the path to an existing entity.
ecs_alert_init
Create a new alert. An alert is a query that is evaluated periodically and creates alert instances for each entity that matches the query. Alerts can be used to automate detection of errors in an application.
ecs_app_run
Run application. This will run the application with the parameters specified in desc. After the application quits (ecs_quit is called) the world will be cleaned up.
ecs_app_run_frame
Default frame callback. This operation will run a single frame. By default this operation will invoke ecs_progress directly, unless a custom frame action is set.
ecs_app_set_frame_action
Set custom frame action. See ecs_app_run_frame.
ecs_app_set_run_action
Set custom run action. See ecs_app_run.
ecs_array_init
Create a new array type
ecs_array_to_json
Serialize array into JSON string. This operation serializes a value of the provided type to a JSON string. The memory pointed to must be large enough to contain a value of the used type.
ecs_array_to_json_buf
Serialize array into JSON string buffer. Same as ecs_array_to_json_buf, but serializes to an ecs_strbuf_t instance.
ecs_asprintf
Create allocated string from format
ecs_assert_
ecs_astresc
Return escaped string. Return escaped version of input string. Same as ecs_stresc, but returns an allocated string of the right size.
ecs_async_stage_free
Free asynchronous stage. The provided stage must be an asynchronous stage. If a non-asynchronous stage is provided, the operation will fail.
ecs_async_stage_new
Create asynchronous stage. An asynchronous stage can be used to asynchronously queue operations for later merging with the world. An asynchronous stage is similar to a regular stage, except that it does not allow reading from the world.
ecs_atfini
Register action to be executed when world is destroyed. Fini actions are typically used when a module needs to clean up before a world shuts down.
ecs_bitmask_init
Create a new bitmask type
ecs_bulk_init
Bulk create/populate new entities. This operation bulk inserts a list of new or predefined entities into a single table.
ecs_bulk_new_w_id
Create N new entities. This operation is the same as ecs_new_w_id, but creates N entities instead of one.
ecs_children
Iterator for a parent’s children. This operation is equivalent to a term iterator for (ChildOf, parent). Iterate the result with ecs_children_next.
ecs_children_next
Progress a children iterator. Equivalent to ecs_term_next.
ecs_chresc
Write an escaped character. Write a character to an output string, insert escape character if necessary.
ecs_chrparse
Parse an escaped character. Parse a character with a potential escape sequence.
ecs_clear
Clear all components. This operation will remove all components from an entity.
ecs_clone
Clone an entity This operation clones the components of one entity into another entity. If no destination entity is provided, a new entity will be created. Component values are not copied unless copy_value is true.
ecs_commit
Commit (move) entity to a table. This operation moves an entity from its current table to the specified table. This may cause the following actions:
ecs_component_init
Find or create a component. This operation creates a new component, or finds an existing one. The find or create behavior is the same as ecs_entity_init.
ecs_count_id
Count entities that have the specified id. Returns the number of entities that have the specified id.
ecs_cpp_component_register
ecs_cpp_component_register_explicit
ecs_cpp_component_validate
ecs_cpp_enum_constant_register
ecs_cpp_enum_init
ecs_cpp_get_constant_name
ecs_cpp_get_symbol_name
ecs_cpp_get_type_name
ecs_cpp_last_member
ecs_cpp_reset_count_get
ecs_cpp_reset_count_inc
ecs_cpp_trim_module
ecs_default_ctor
Constructor that zeromem’s a component value
ecs_defer_begin
Defer operations until end of frame. When this operation is invoked while iterating, operations inbetween the defer_begin and defer_end operations are executed at the end of the frame.
ecs_defer_end
End block of operations to defer. See defer_begin.
ecs_defer_resume
Resume deferring. See ecs_defer_suspend.
ecs_defer_suspend
Suspend deferring but do not flush queue. This operation can be used to do an undeferred operation while not flushing the operations in the queue.
ecs_delete
Delete an entity. This operation will delete an entity and all of its components. The entity id will be made available for recycling. If the entity passed to ecs_delete is not alive, the operation will have no side effects.
ecs_delete_empty_tables
Cleanup empty tables. This operation cleans up empty tables that meet certain conditions. Having large amounts of empty tables does not negatively impact performance of the ECS, but can take up considerable amounts of memory, especially in applications with many components, and many components per entity.
ecs_delete_with
Delete all entities with the specified id. This will delete all entities (tables) that have the specified id. The id may be a wildcard and/or a pair.
ecs_deprecated_
Tracing
ecs_dim
Dimension the world for a specified number of entities. This operation will preallocate memory in the world for the specified number of entities. Specifying a number lower than the current number of entities in the world will have no effect.
ecs_doc_get_brief
Get brief description from entity.
ecs_doc_get_color
Get color from entity.
ecs_doc_get_detail
Get detailed description from entity.
ecs_doc_get_link
Get link to external documentation from entity.
ecs_doc_get_name
Get human readable name from entity. If entity does not have an explicit human readable name, this operation will return the entity name.
ecs_doc_set_brief
Add brief description to entity.
ecs_doc_set_color
Add color to entity. UIs can use color as hint to improve visualizing entities.
ecs_doc_set_detail
Add detailed description to entity.
ecs_doc_set_link
Add link to external documentation to entity.
ecs_doc_set_name
Add human-readable name to entity. Contrary to entity names, human readable names do not have to be unique and can contain special characters used in the query language like ‘*’.
ecs_emit
Send event. This sends an event to matching triggers & is the mechanism used by flecs itself to send OnAdd, OnRemove, etc events.
ecs_emplace_id
Emplace a component. Emplace is similar to get_mut except that the component constructor is not invoked for the returned pointer, allowing the component to be “constructed” directly in the storage.
ecs_enable
Enable or disable entity. This operation enables or disables an entity by adding or removing the EcsDisabled tag. A disabled entity will not be matched with any systems, unless the system explicitly specifies the EcsDisabled tag.
ecs_enable_id
Enable or disable component. Enabling or disabling a component does not add or remove a component from an entity, but prevents it from being matched with queries. This operation can be useful when a component must be temporarily disabled without destroying its value. It is also a more performant operation for when an application needs to add/remove components at high frequency, as enabling/disabling is cheaper than a regular add or remove.
ecs_enable_range_check
Enable/disable range limits. When an application is both a receiver of range-limited entities and a producer of range-limited entities, range checking needs to be temporarily disabled when inserting received entities. Range checking is disabled on a stage, so setting this value is thread safe.
ecs_ensure
Ensure id is alive. This operation ensures that the provided id is alive. This is useful in scenarios where an application has an existing id that has not been created with ecs_new (such as a global constant or an id from a remote application).
ecs_ensure_id
Same as ecs_ensure, but for (component) ids. An id can be an entity or pair, and can contain id flags. This operation ensures that the entity (or entities, for a pair) are alive.
ecs_entity_from_json
Parse JSON object with multiple component values into entity. The format is the same as the one outputted by ecs_entity_to_json, but at the moment only supports the “ids” and “values” member.
ecs_entity_init
Find or create an entity. This operation creates a new entity, or modifies an existing one. When a name is set in the ecs_entity_desc_t::name field and ecs_entity_desc_t::entity is not set, the operation will first attempt to find an existing entity by that name. If no entity with that name can be found, it will be created.
ecs_entity_str
Convert entity to string. Same as combining:
ecs_entity_to_json
Serialize entity into JSON string. This creates a JSON object with the entity’s (path) name, which components and tags the entity has, and the component values.
ecs_entity_to_json_buf
Serialize entity into JSON string buffer. Same as ecs_entity_to_json, but serializes to an ecs_strbuf_t instance.
ecs_enum_init
Create a new enum type
ecs_exists
Test whether an entity exists. Similar as ecs_is_alive, but ignores entity generation count.
ecs_field
ecs_field_column_index
Return index of matched table column. This function only returns column indices for fields that have been matched on the $this variable. Fields matched on other tables will return -1.
ecs_field_id
Return id matched for field.
ecs_field_is_readonly
Test whether the field is readonly. This operation returns whether the field is readonly. Readonly fields are annotated with [in], or are added as a const type in the C++ API.
ecs_field_is_self
Test whether the field is matched on self. This operation returns whether the field is matched on the currently iterated entity. This function will return false when the field is owned by another entity, such as a parent or a prefab.
ecs_field_is_set
Test whether field is set.
ecs_field_is_writeonly
Test whether the field is writeonly. This operation returns whether this is a writeonly field. Writeonly terms are annotated with [out].
ecs_field_size
Return field type size. Return type size of the field. Returns 0 if the field has no data.
ecs_field_src
Return field source. The field source is the entity on which the field was matched.
ecs_field_w_size
Obtain data for a query field. This operation retrieves a pointer to an array of data that belongs to the term in the query. The index refers to the location of the term in the query, and starts counting from one.
ecs_filter_chain_iter
Return a chained filter iterator. A chained iterator applies a filter to the results of the input iterator. The resulting iterator must be iterated with ecs_filter_next.
ecs_filter_copy
Copy resources of one filter to another.
ecs_filter_finalize
Finalize filter. When manually assigning an array of terms to the filter struct (so not when using ecs_filter_init), this operation should be used to ensure that all terms are assigned properly and all (derived) fields have been set.
ecs_filter_find_this_var
Find index for $this variable. This operation looks up the index of the $this variable. This index can be used in operations like ecs_iter_set_var and ecs_iter_get_var.
ecs_filter_fini
Deinitialize filter. Free resources associated with filter.
ecs_filter_init
Initialize filter A filter is a lightweight object that can be used to query for entities in a world. Filters, as opposed to queries, do not cache results. They are therefore slower to iterate, but are faster to create.
ecs_filter_iter
Return a filter iterator. A filter iterator lets an application iterate over entities that match the specified filter.
ecs_filter_move
Move resources of one filter to another.
ecs_filter_next
Iterate tables matched by filter. This operation progresses the filter iterator to the next table. The iterator must have been initialized with ecs_filter_iter. This operation must be invoked at least once before interpreting the contents of the iterator.
ecs_filter_next_instanced
Same as ecs_filter_next, but always instanced. See instanced property of ecs_filter_desc_t.
ecs_filter_pivot_term
Get pivot term for filter. The pivot term is the term that matches the smallest set of tables, and is a good default starting point for a search.
ecs_filter_str
Convert filter to string expression. Convert filter terms to a string expression. The resulting expression can be parsed to create the same filter.
ecs_fini
Delete a world. This operation deletes the world, and everything it contains.
ecs_flatten
Recursively flatten relationship for target entity (experimental). This operation combines entities in the subtree of the specified pair from different parents in the same table. This can reduce memory fragmentation and reduces the number of tables in the storage, which improves RAM utilization and various other operations, such as entity cleanup.
ecs_frame_begin
Begin frame. When an application does not use ecs_progress to control the main loop, it can still use Flecs features such as FPS limiting and time measurements. This operation needs to be invoked whenever a new frame is about to get processed.
ecs_frame_end
End frame. This operation must be called at the end of the frame, and always after ecs_frame_begin.
ecs_get_alert
Return alert instance for specified alert. This operation returns the alert instance for the specified alert. If the alert is not active for the entity, the operation will return 0.
ecs_get_alert_count
Return number of active alerts for entity. When a valid alert entity is specified for the alert parameter, the operation will return whether the specified alert is active for the entity. When no alert is specified, the operation will return the total number of active alerts for the entity.
ecs_get_alive
Get alive identifier. In some cases an application may need to work with identifiers from which the generation has been stripped. A typical scenario in which this happens is when iterating relationships in an entity type.
ecs_get_binding_ctx
Get the world binding context. This operation retrieves a previously set world binding context.
ecs_get_ctx
Get the world context. This operation retrieves a previously set world context.
ecs_get_depth
Return depth for entity in tree for the specified relationship. Depth is determined by counting the number of targets encountered while traversing up the relationship tree for rel. Only acyclic relationships are supported.
ecs_get_entity
Get entity from poly.
ecs_get_hooks_id
Get hooks for component.
ecs_get_id
Get an immutable pointer to a component. This operation obtains a const pointer to the requested component. The operation accepts the component entity id.
ecs_get_interval
Get current interval value for the specified timer. This operation returns the value set by ecs_set_interval. If the entity is not a timer, the operation will return 0.
ecs_get_lookup_path
Get current lookup path. Returns value set by ecs_set_lookup_path.
ecs_get_max_id
Get the largest issued entity id (not counting generation).
ecs_get_mut_id
Get a mutable pointer to a component. This operation returns a mutable pointer to a component. If the component did not yet exist, it will be added.
ecs_get_mut_modified_id
Combines get_mut + modifed in single operation. This operation is a more efficient alternative to calling ecs_get_mut_id and ecs_modified_id separately. This operation is only valid when the world is in deferred mode, which ensures that the Modified event is not emitted before the modification takes place.
ecs_get_name
Get the name of an entity. This will return the name stored in (EcsIdentifier, EcsName).
ecs_get_parent
Get parent (target of ChildOf relationship) for entity. This operation is the same as calling: ecs_get_target(world, entity, EcsChildOf, 0);
ecs_get_path_w_sep
Get a path identifier for an entity. This operation creates a path that contains the names of the entities from the specified parent to the provided entity, separated by the provided separator. If no parent is provided the path will be relative to the root. If a prefix is provided, the path will be prefixed by the prefix.
ecs_get_path_w_sep_buf
Write path identifier to buffer. Same as ecs_get_path_w_sep, but writes result to an ecs_strbuf_t.
ecs_get_pipeline
Get the current pipeline. This operation gets the current pipeline.
ecs_get_scope
Get the current scope. Get the scope set by ecs_set_scope. If no scope is set, this operation will return 0.
ecs_get_stage
Get stage-specific world pointer. Flecs threads can safely invoke the API as long as they have a private context to write to, also referred to as the stage. This function returns a pointer to a stage, disguised as a world pointer.
ecs_get_stage_count
Get number of configured stages. Return number of stages set by ecs_set_stage_count.
ecs_get_stage_id
Get current stage id. The stage id can be used by an application to learn about which stage it is using, which typically corresponds with the worker thread id.
ecs_get_symbol
Get the symbol of an entity. This will return the symbol stored in (EcsIdentifier, EcsSymbol).
ecs_get_table
Get the table of an entity.
ecs_get_target
Get the target of a relationship. This will return a target (second element of a pair) of the entity for the specified relationship. The index allows for iterating through the targets, if a single entity has multiple targets for the same relationship.
ecs_get_target_for_id
Get the target of a relationship for a given id. This operation returns the first entity that has the provided id by following the specified relationship. If the entity itself has the id then entity will be returned. If the id cannot be found on the entity or by following the relationship, the operation will return 0.
ecs_get_timeout
Get current timeout value for the specified timer. This operation returns the value set by ecs_set_timeout. If no timer is active for this entity, the operation returns 0.
ecs_get_type
Get the type of an entity.
ecs_get_type_info
Get the type for an id. This function returnsthe type information for an id. The specified id can be any valid id. For the rules on how type information is determined based on id, see ecs_get_typeid.
ecs_get_typeid
Get the type for an id. This operation returns the component id for an id, if the id is associated with a type. For a regular component with a non-zero size (an entity with the EcsComponent component) the operation will return the entity itself.
ecs_get_with
Get current with id. Get the id set with ecs_set_with.
ecs_get_world
Get world from poly.
ecs_get_world_info
Get world info.
ecs_has_id
Test if an entity has an id. This operation returns true if the entity has or inherits the specified id.
ecs_http_get_header
Find header in request.
ecs_http_get_param
Find query parameter in request.
ecs_http_server_ctx
Get context provided in ecs_http_server_desc_t
ecs_http_server_dequeue
Process server requests. This operation invokes the reply callback for each received request. No new requests will be enqueued while processing requests.
ecs_http_server_fini
Destroy server. This operation will stop the server if it was still running.
ecs_http_server_http_request
Emulate a request. The request string must be a valid HTTP request. A minimal example: GET /entity/flecs/core/World?label=true HTTP/1.1
ecs_http_server_init
Create server. Use ecs_http_server_start to start receiving requests.
ecs_http_server_request
Convenience wrapper around ecs_http_server_request.
ecs_http_server_start
Start server. After this operation the server will be able to accept requests.
ecs_http_server_stop
Stop server. After this operation no new requests can be received.
ecs_id_flag_str
Convert id flag to string. This operation converts a id flag to a string.
ecs_id_get_flags
Get flags associated with id. This operation returns the internal flags (see api_flags.h) that are associated with the provided id.
ecs_id_in_use
Returns whether specified id is in use. This operation returns whether an id is in use in the world. An id is in use if it has been added to one or more tables.
ecs_id_is_pair
Utility to check if id is a pair.
ecs_id_is_tag
Returns whether specified id a tag. This operation returns whether the specified type is a tag (a component without data/size).
ecs_id_is_union
Return whether represents a union. This operation returns whether the specified type represents a union. Only pair ids can be unions.
ecs_id_is_valid
Utility to check if id is valid. A valid id is an id that can be added to an entity. Invalid ids are:
ecs_id_is_wildcard
Utility to check if id is a wildcard.
ecs_id_match
Utility to match an id with a pattern. This operation returns true if the provided pattern matches the provided id. The pattern may contain a wildcard (or wildcards, when a pair).
ecs_id_str
Convert id to string. This operation interprets the structure of an id and converts it to a string.
ecs_id_str_buf
Write id string to buffer. Same as ecs_id_str but writes result to ecs_strbuf_t.
ecs_identifier_is_0
ecs_import
Import a module. This operation will load a modules and store the public module handles in the handles_out out parameter. The module name will be used to verify if the module was already loaded, in which case it won’t be reimported. The name will be translated from PascalCase to an entity path (pascal.case) before the lookup occurs.
ecs_import_c
Same as ecs_import, but with name to scope conversion. PascalCase names are automatically converted to scoped names.
ecs_import_from_library
Import a module from a library. Similar to ecs_import, except that this operation will attempt to load the module from a dynamic library.
ecs_init
Create a new world. This operation automatically imports modules from addons Flecs has been built with, except when the module specifies otherwise.
ecs_init_w_args
Create a new world with arguments. Same as ecs_init, but allows passing in command line arguments. Command line arguments are used to:
ecs_interpolate_string
Evaluate interpolated expressions in string. This operation evaluates expressions in a string, and replaces them with their evaluated result. Supported expression formats are:
ecs_is_alive
Test whether an entity is alive. Entities are alive after they are created, and become not alive when they are deleted. Operations that return alive ids are (amongst others) ecs_new_id, ecs_new_low_id and ecs_entity_init. Ids can be made alive with the ecs_ensure function.
ecs_is_deferred
Test if deferring is enabled for current stage.
ecs_is_enabled_id
Test if component is enabled. Test whether a component is currently enabled or disabled. This operation will return true when the entity has the component and if it has not been disabled by ecs_enable_component.
ecs_is_fini
Returns whether the world is being deleted. This operation can be used in callbacks like type hooks or observers to detect if they are invoked while the world is being deleted.
ecs_is_valid
Test whether an entity is valid. Entities that are valid can be used with API functions. Using invalid entities with API operations will cause the function to panic.
ecs_iter_count
Count number of matched entities in query. This operation returns the number of matched entities. If a query contains no matched entities but still yields results (e.g. it has no terms with This sources) the operation will return 0.
ecs_iter_fini
Cleanup iterator resources. This operation cleans up any resources associated with the iterator.
ecs_iter_first
Get first matching entity from iterator. After this operation the application should treat the iterator as if it has been iterated until completion.
ecs_iter_get_var
Get value of iterator variable as entity. A variable can be interpreted as entity if it is set to an entity, or if it is set to a table range with count 1.
ecs_iter_get_var_as_range
Get value of iterator variable as table range. A value can be interpreted as table range if it is set as table range, or if it is set to an entity with a non-empty type (the entity must have at least one component, tag or relationship in its type).
ecs_iter_get_var_as_table
Get value of iterator variable as table. A variable can be interpreted as table if it is set as table range with both offset and count set to 0, or if offset is 0 and count matches the number of elements in the table.
ecs_iter_is_true
Test if iterator is true. This operation will return true if the iterator returns at least one result. This is especially useful in combination with fact-checking rules (see the rules addon).
ecs_iter_next
Progress any iterator. This operation is useful in combination with iterators for which it is not known what created them. Example use cases are functions that should accept any kind of iterator (such as serializers) or iterators created from poly objects.
ecs_iter_poly
Create iterator from poly object. The provided poly object must have the iterable mixin. If an object is provided that does not have the mixin, the function will assert.
ecs_iter_set_var
Set value for iterator variable. This constrains the iterator to return only results for which the variable equals the specified value. The default value for all variables is EcsWildcard, which means the variable can assume any value.
ecs_iter_set_var_as_range
Same as ecs_iter_set_var, but for a range of entities This constrains the variable to a range of entities in a table.
ecs_iter_set_var_as_table
Same as ecs_iter_set_var, but for a table. This constrains the variable to all entities in a table.
ecs_iter_str
Convert iterator to string. Prints the contents of an iterator to a string. Useful for debugging and/or testing the output of an iterator.
ecs_iter_to_json
Serialize iterator into JSON string. This operation will iterate the contents of the iterator and serialize them to JSON. The function acccepts iterators from any source.
ecs_iter_to_json_buf
Serialize iterator into JSON string buffer. Same as ecs_iter_to_json, but serializes to an ecs_strbuf_t instance.
ecs_iter_to_vars
Convert iterator to vars This operation converts an iterator to a variable array. This allows for using iterator results in expressions. The operation only converts a single result at a time, and does not progress the iterator.
ecs_iter_var_is_constrained
Returns whether variable is constrained. This operation returns true for variables set by one of the ecs_iter_set_var* operations.
ecs_log_
ecs_log_enable_colors
Enable/disable tracing with colors. By default colors are enabled.
ecs_log_enable_timedelta
Enable/disable logging time since last log. By default deltatime is disabled. Note that enabling timestamps introduces overhead as the logging code will need to obtain the current time.
ecs_log_enable_timestamp
Enable/disable logging timestamp. By default timestamps are disabled. Note that enabling timestamps introduces overhead as the logging code will need to obtain the current time.
ecs_log_get_level
Get current log level.
ecs_log_last_error
Get last logged error code. Calling this operation resets the error code.
ecs_log_pop_
Decrease log stack. This operation decreases the indent_ value of the OS API and can be useful to make nested behavior more visible.
ecs_log_push_
Increase log stack. This operation increases the indent_ value of the OS API and can be useful to make nested behavior more visible.
ecs_log_set_level
Enable or disable log. This will enable builtin log. For log to work, it will have to be compiled in which requires defining one of the following macros:
ecs_logv_
ecs_lookup
Lookup an entity by name. Returns an entity that matches the specified name. Only looks for entities in the current scope (root if no scope is provided).
ecs_lookup_child
Lookup a child entity by name. Returns an entity that matches the specified name. Only looks for entities in the provided parent. If no parent is provided, look in the current scope ( root if no scope is provided).
ecs_lookup_path_w_sep
Lookup an entity from a path. Lookup an entity from a provided path, relative to the provided parent. The operation will use the provided separator to tokenize the path expression. If the provided path contains the prefix, the search will start from the root.
ecs_lookup_symbol
Lookup an entity by its symbol name. This looks up an entity by symbol stored in (EcsIdentifier, EcsSymbol). The operation does not take into account hierarchies.
ecs_make_pair
Make a pair id. This function is equivalent to using the ecs_pair macro, and is added for convenience to make it easier for non C/C++ bindings to work with pairs.
ecs_map_clear
Remove all elements from map.
ecs_map_copy
Copy map.
ecs_map_ensure
Get or insert element for key.
ecs_map_ensure_alloc
Get or insert pointer element for key, allocate if the pointer is NULL
ecs_map_fini
Deinitialize map.
ecs_map_get
Get element for key, returns NULL if they key doesn’t exist.
ecs_map_get_deref_
Get element as pointer (auto-dereferences _ptr)
ecs_map_init
Initialize new map.
ecs_map_init_if
Initialize new map if uninitialized, leave as is otherwise
ecs_map_init_w_params
Initialize new map.
ecs_map_init_w_params_if
ecs_map_insert
Insert element for key.
ecs_map_insert_alloc
Insert pointer element for key, populate with new allocation.
ecs_map_iter
Return iterator to map contents.
ecs_map_next
Obtain next element in map from iterator.
ecs_map_params_fini
ecs_map_params_init
Function/macro postfixes meaning: _ptr: access ecs_map_val_t as void* _ref: access ecs_map_val_t* as T** _deref: dereferences a _ref _alloc: if _ptr is NULL, alloc _free: if _ptr is not NULL, free
ecs_map_remove
Remove key from map.
ecs_map_remove_free
Remove pointer element, free if not NULL
ecs_measure_frame_time
Measure frame time. Frame time measurements measure the total time passed in a single frame, and how much of that time was spent on systems and on merging.
ecs_measure_system_time
Measure system time. System time measurements measure the time spent in each system.
ecs_merge
Merge world or stage. When automatic merging is disabled, an application can call this operation on either an individual stage, or on the world which will merge all stages. This operation may only be called when staging is not enabled (either after progress() or after readonly_end()).
ecs_meta_cursor
ecs_meta_dotmember
Move cursor to member, supports dot-separated nested members
ecs_meta_elem
Move cursor to a element
ecs_meta_from_desc
Populate meta information from type descriptor.
ecs_meta_get_bool
Get field value as boolean.
ecs_meta_get_char
Get field value as char.
ecs_meta_get_entity
Get field value as entity. This operation does not perform conversions.
ecs_meta_get_float
Get field value as float.
ecs_meta_get_int
Get field value as signed integer.
ecs_meta_get_member
Get member name of current member
ecs_meta_get_member_id
Get member entity of current member
ecs_meta_get_ptr
Get pointer to current field
ecs_meta_get_string
Get field value as string. This operation does not perform conversions. If the field is not a string, this operation will fail.
ecs_meta_get_type
Get type of current element.
ecs_meta_get_uint
Get field value as unsigned integer.
ecs_meta_get_unit
Get unit of current element.
ecs_meta_is_collection
Is the current scope a collection?
ecs_meta_member
Move cursor to member
ecs_meta_next
Move cursor to next field
ecs_meta_pop
Pop a struct or collection scope (must follow a push)
ecs_meta_ptr_to_float
Convert pointer of primitive kind to float.
ecs_meta_push
Push a scope (required/only valid for structs & collections)
ecs_meta_set_bool
Set field with boolean value
ecs_meta_set_char
Set field with char value
ecs_meta_set_entity
Set field with entity value
ecs_meta_set_float
Set field with float value
ecs_meta_set_int
Set field with int value
ecs_meta_set_null
Set field with null value
ecs_meta_set_string
Set field with string value
ecs_meta_set_string_literal
Set field with string literal value (has enclosing “”)
ecs_meta_set_uint
Set field with uint value
ecs_meta_set_value
Set field with dynamic value
ecs_metric_copy
Copy measurement
ecs_metric_init
Create a new metric. Metrics are entities that store values measured from a range of different properties in the ECS storage. Metrics provide a single unified interface to discovering and reading these values, which can be useful for monitoring utilities, or for debugging.
ecs_metric_reduce
Reduce all measurements from a window into a single measurement.
ecs_metric_reduce_last
Reduce last measurement into previous measurement
ecs_mini
Create a new world with just the core module. Same as ecs_init, but doesn’t import modules from addons. This operation is faster than ecs_init and results in less memory utilization.
ecs_modified_id
Signal that a component has been modified. This operation is usually used after modifying a component value obtained by ecs_get_mut_id. The operation will mark the component as dirty, and invoke OnSet observers and hooks.
ecs_module_init
Register a new module.
ecs_module_path_from_c
ecs_new_from_path_w_sep
Find or create entity from path. This operation will find or create an entity from a path, and will create any intermediate entities if required. If the entity already exists, no entities will be created.
ecs_new_id
Create new entity id. This operation returns an unused entity id. This operation is guaranteed to return an empty entity as it does not use values set by ecs_set_scope or ecs_set_with.
ecs_new_low_id
Create new low id. This operation returns a new low id. Entity ids start after the FLECS_HI_COMPONENT_ID constant. This reserves a range of low ids for things like components, and allows parts of the code to optimize operations.
ecs_new_w_id
Create new entity with (component) id. This operation creates a new entity with an optional (component) id. When 0 is passed to the id paramter, no component is added to the new entity.
ecs_new_w_table
Create new entity in table. This operation creates a new entity in the specified table.
ecs_observer_default_run_action
Default run action for observer. This function can be called from a custom observer run action (see ecs_observer_desc_t::run for more details). This function ensures that the observer’s filter is applied to the iterator’s table, filters out duplicate events and implements EcsMonitor logic.
ecs_observer_get_binding_ctx
Get observer binding ctx. Return the value set in ecs_observer_desc_t::binding_ctx.
ecs_observer_get_ctx
Get observer ctx. Return the value set in ecs_observer_desc_t::ctx.
ecs_observer_init
Create observer. Observers are like triggers, but can subscribe for multiple terms. An observer only triggers when the source of the event meets all terms.
ecs_opaque_init
Create a new opaque type. Opaque types are types of which the layout doesn’t match what can be modelled with the primitives of the meta framework, but which have a structure that can be described with meta primitives. Typical examples are STL types such as std::string or std::vector, types with a nontrivial layout, and types that only expose getter/setter methods.
ecs_os_dbg
Logging
ecs_os_err
ecs_os_fatal
ecs_os_fini
ecs_os_get_api
ecs_os_has_dl
Are dynamic library functions available?
ecs_os_has_heap
Are heap functions available?
ecs_os_has_logging
Are logging functions available?
ecs_os_has_modules
Are module path functions available?
ecs_os_has_task_support
Are task functions available?
ecs_os_has_threading
Are threading functions available?
ecs_os_has_time
Are time functions available?
ecs_os_init
ecs_os_memdup
ecs_os_set_api
ecs_os_set_api_defaults
ecs_os_strerror
ecs_os_strset
ecs_os_trace
ecs_os_warn
ecs_override_id
Add override for (component) id. Adding an override to an entity ensures that when the entity is instantiated (by adding an IsA relationship to it) the component with the override is copied to a component that is private to the instance. By default components reachable through an IsA relationship are shared.
ecs_owns_id
Test if an entity owns an id. This operation returns true if the entity has the specified id. The operation behaves the same as ecs_has_id, except that it will return false for components that are inherited through an IsA relationship.
ecs_page_iter
Create a paged iterator. Paged iterators limit the results to those starting from ‘offset’, and will return at most ‘limit’ results.
ecs_page_next
Progress a paged iterator. Progresses an iterator created by ecs_page_iter.
ecs_parse_digit
Parse digit. This function will parse until the first non-digit character is found. The provided expression must contain at least one digit character.
ecs_parse_expr
Parse expression into value. This operation parses a flecs expression into the provided pointer. The memory pointed to must be large enough to contain a value of the used type.
ecs_parse_expr_token
Parse expression token. Expression tokens can contain more characters (such as ‘|’) than tokens parsed by the query (term) parser.
ecs_parse_identifier
Utility function to parse an identifier
ecs_parse_term
Parse term in expression. This operation parses a single term in an expression and returns a pointer to the next term expression.
ecs_parse_token
Parse a single token. This function can be used as simple tokenizer by other parsers.
ecs_parse_ws
Skip whitespace characters. This function skips whitespace characters. Does not skip newlines.
ecs_parse_ws_eol
Skip whitespace and newline characters. This function skips whitespace characters.
ecs_parser_error_
ecs_parser_errorv_
ecs_pipeline_init
Create a custom pipeline.
ecs_pipeline_stats_copy_last
Copy last measurement to destination. This operation copies the last measurement into the destination. It does not modify the cursor.
ecs_pipeline_stats_fini
Free pipeline stats.
ecs_pipeline_stats_get
Get pipeline statistics. Obtain statistics for the provided pipeline.
ecs_pipeline_stats_reduce
Reduce source measurement window into single destination measurement
ecs_pipeline_stats_reduce_last
Reduce last measurement into previous measurement, restore old value.
ecs_pipeline_stats_repeat_last
Repeat last measurement.
ecs_plecs_from_file
Parse plecs file. This parses a plecs file and instantiates the entities in the world. This operation is equivalent to loading the file contents and passing it to ecs_plecs_from_str.
ecs_plecs_from_str
Parse plecs string. This parses a plecs string and instantiates the entities in the world.
ecs_poly_is_
Test if pointer is of specified type. Usage: ecs_poly_is(ptr, ecs_world_t)
ecs_primitive_init
Create a new primitive type
ecs_primitive_to_expr_buf
Serialize primitive value into string buffer. Serializes a primitive value to an ecs_strbuf_t instance. This operation can be reused by other serializers to avoid having to write boilerplate code that serializes primitive values to a string.
ecs_print_
Logging functions (do nothing when logging is enabled)
ecs_printv_
ecs_progress
Progress a world. This operation progresses the world by running all systems that are both enabled and periodic on their matching entities.
ecs_ptr_from_json
Parse JSON string into value. This operation parses a JSON expression into the provided pointer. The memory pointed to must be large enough to contain a value of the used type.
ecs_ptr_to_expr
Serialize value into expression string. This operation serializes a value of the provided type to a string. The memory pointed to must be large enough to contain a value of the used type.
ecs_ptr_to_expr_buf
Serialize value into expression buffer. Same as ecs_ptr_to_expr, but serializes to an ecs_strbuf_t instance.
ecs_ptr_to_json
Serialize value into JSON string. Same as ecs_array_to_json, with count = 0.
ecs_ptr_to_json_buf
Serialize value into JSON string buffer. Same as ecs_ptr_to_json, but serializes to an ecs_strbuf_t instance.
ecs_ptr_to_str
Similar as ecs_ptr_to_expr, but serializes values to string. Whereas the output of ecs_ptr_to_expr is a valid expression, the output of ecs_ptr_to_str is a string representation of the value. In most cases the output of the two operations is the same, but there are some differences:
ecs_ptr_to_str_buf
Serialize value into string buffer. Same as ecs_ptr_to_str, but serializes to an ecs_strbuf_t instance.
ecs_quantity_init
Create a new quantity
ecs_query_changed
Returns whether the query data changed since the last iteration. The operation will return true after:
ecs_query_empty_table_count
Returns number of empty tables query matched with.
ecs_query_entity_count
Returns number of entities query matched with. This operation iterates all non-empty tables in the query cache to find the total number of entities.
ecs_query_fini
Destroy a query. This operation destroys a query and its resources. If the query is used as the parent of subqueries, those subqueries will be orphaned and must be deinitialized as well.
ecs_query_get_binding_ctx
Get query binding ctx. Return the value set in ecs_query_desc_t::binding_ctx.
ecs_query_get_ctx
Get query ctx. Return the value set in ecs_query_desc_t::ctx.
ecs_query_get_filter
Get filter from a query. This operation obtains a pointer to the internally constructed filter of the query and can be used to introspect the query terms.
ecs_query_get_group_ctx
Get context of query group. This operation returns the context of a query group as returned by the on_group_create callback.
ecs_query_get_group_info
Get information about query group. This operation returns information about a query group, including the group context returned by the on_group_create callback.
ecs_query_init
Create a query. This operation creates a query. Queries are used to iterate over entities that match a filter and are the fastest way to find and iterate over entities and their components.
ecs_query_iter
Return a query iterator. A query iterator lets an application iterate over entities that match the specified query. If a sorting function is specified, the query will check whether a resort is required upon creating the iterator.
ecs_query_next
Progress the query iterator. This operation progresses the query iterator to the next table. The iterator must have been initialized with ecs_query_iter. This operation must be invoked at least once before interpreting the contents of the iterator.
ecs_query_next_instanced
Same as ecs_query_next, but always instanced. See “instanced” property of ecs_filter_desc_t.
ecs_query_next_table
Fast alternative to ecs_query_next that only returns matched tables. This operation only populates the ecs_iter_t::table field. To access the matched components, call ecs_query_populate.
ecs_query_orphaned
Returns whether query is orphaned. When the parent query of a subquery is deleted, it is left in an orphaned state. The only valid operation on an orphaned query is deleting it. Only subqueries can be orphaned.
ecs_query_populate
Populate iterator fields. This operation can be combined with ecs_query_next_table to populate the iterator fields for the current table.
ecs_query_set_group
Set group to iterate for query iterator. This operation limits the results returned by the query to only the selected group id. The query must have a group_by function, and the iterator must be a query iterator.
ecs_query_skip
Skip a table while iterating. This operation lets the query iterator know that a table was skipped while iterating. A skipped table will not reset its changed state, and the query will not update the dirty flags of the table for its out columns.
ecs_query_stats_copy_last
Copy last measurement from source to destination.
ecs_query_stats_get
Get query statistics. Obtain statistics for the provided query.
ecs_query_stats_reduce
Reduce source measurement window into single destination measurement.
ecs_query_stats_reduce_last
Reduce last measurement into previous measurement, restore old value.
ecs_query_stats_repeat_last
Repeat last measurement.
ecs_query_str
Convert query to string.
ecs_query_table_count
Returns number of tables query matched with.
ecs_quit
Signal exit This operation signals that the application should quit. It will cause ecs_progress to return false.
ecs_randomize_timers
Enable randomizing initial time value of timers. Intializes timers with a random time value, which can improve scheduling as systems/timers for the same interval don’t all happen on the same tick.
ecs_read_begin
Begin read access to entity. This operation provides safe read access to the components of an entity. Multiple simultaneous reads are allowed per entity.
ecs_read_end
End read access to entity. This operation ends read access, and must be called after ecs_read_begin.
ecs_readonly_begin
Begin readonly mode. Readonly mode guarantees that no mutations will occur on the world, which makes the world safe to access from multiple threads. While the world is in readonly mode, operations are deferred.
ecs_readonly_end
End readonly mode. This operation ends readonly mode, and must be called after ecs_readonly_begin. Operations that were deferred while the world was in readonly mode will be flushed.
ecs_record_find
Find record for entity.
ecs_record_get_column
Get component pointer from column/record.
ecs_record_get_entity
Get entity corresponding with record. This operation only works for entities that are not empty.
ecs_record_get_id
Get component from entity record. This operation returns a pointer to a component for the entity associated with the provided record. For safe access to the component, obtain the record with ecs_read_begin or ecs_write_begin.
ecs_record_get_mut_id
Same as ecs_record_get_id, but returns a mutable pointer. For safe access to the component, obtain the record with ecs_write_begin.
ecs_record_has_id
Test if entity for record has component.
ecs_ref_get_id
Get component from ref. Get component pointer from ref. The ref must be created with ecs_ref_init.
ecs_ref_init_id
Create a component ref. A ref is a handle to an entity + component which caches a small amount of data to reduce overhead of repeatedly accessing the component. Use ecs_ref_get to get the component data.
ecs_ref_update
Update ref. Ensures contents of ref are up to date. Same as ecs_ref_get_id, but does not return pointer to component id.
ecs_remove_all
Remove all instances of the specified (component) id. This will remove the specified id from all entities (tables). The id may be a wildcard and/or a pair.
ecs_remove_id
Remove a (component) id from an entity. This operation removes a single (component) id to an entity. If the entity does not have the id, this operation will have no side effects.
ecs_reset_clock
Reset world clock. Reset the clock that keeps track of the total time passed in the simulation.
ecs_reset_timer
Reset time value of timer to 0. This operation resets the timer value to 0.
ecs_rest_server_fini
Cleanup REST HTTP server. The server must have been created with ecs_rest_server_init.
ecs_rest_server_init
Create HTTP server for REST API. This allows for the creation of a REST server that can be managed by the application without using Flecs systems.
ecs_rule_find_var
Find variable index. This operation looks up the index of a variable in the rule. This index can be used in operations like ecs_iter_set_var and ecs_iter_get_var.
ecs_rule_fini
Delete a rule.
ecs_rule_get_filter
Obtain filter from rule. This operation returns the filter with which the rule was created.
ecs_rule_init
Create a rule. A rule accepts the same descriptor as a filter, but has the additional ability to use query variables.
ecs_rule_iter
Iterate a rule. Note that rule iterators may allocate memory, and that unless the iterator is iterated until completion, it may still hold resources. When stopping iteration before ecs_rule_next has returned false, use ecs_iter_fini to cleanup any remaining resources.
ecs_rule_next
Progress rule iterator.
ecs_rule_next_instanced
Progress instanced iterator. Should not be called unless you know what you’re doing :-)
ecs_rule_parse_vars
Populate variables from key-value string. Convenience function to set rule variables from a key-value string separated by comma’s. The string must have the followig format: var_a: value, var_b: value
ecs_rule_str
Convert rule to a string. This will convert the rule program to a string which can aid in debugging the behavior of a rule.
ecs_rule_str_w_profile
Convert rule to string with profile. To use this you must set the EcsIterProfile flag on an iterator before starting uteration: it.flags |= EcsIterProfile
ecs_rule_var_count
Return number of variables in rule.
ecs_rule_var_is_entity
Test if variable is an entity. Internally the rule engine has entity variables and table variables. When iterating through rule variables (by using ecs_rule_variable_count) only the values for entity variables are accessible. This operation enables an appliction to check if a variable is an entity variable.
ecs_rule_var_name
Get variable name. This operation returns the variable name for an index.
ecs_run
Run a specific system manually. This operation runs a single system manually. It is an efficient way to invoke logic on a set of entities, as manual systems are only matched to tables at creation time or after creation time, when a new table is created.
ecs_run_aperiodic
Force aperiodic actions. The world may delay certain operations until they are necessary for the application to function correctly. This may cause observable side effects such as delayed triggering of events, which can be inconvenient when for example running a test suite.
ecs_run_pipeline
Run pipeline. This will run all systems in the provided pipeline. This operation may be invoked from multiple threads, and only when staging is disabled, as the pipeline manages staging and, if necessary, synchronization between threads.
ecs_run_post_frame
Register action to be executed once after frame. Post frame actions are typically used for calling operations that cannot be invoked during iteration, such as changing the number of threads.
ecs_run_w_filter
Run system with offset/limit and type filter. This operation is the same as ecs_run, but filters the entities that will be iterated by the system.
ecs_run_worker
Same as ecs_run, but subdivides entities across number of provided stages.
ecs_script_clear
Clear all entities associated with script.
ecs_script_init
Load managed script. A managed script tracks which entities it creates, and keeps those entities synchronized when the contents of the script are updated. When the script is updated, entities that are no longer in the new version will be deleted.
ecs_script_update
Update script with new code.
ecs_search
Search for component id in table type. This operation returns the index of first occurrance of the id in the table type. The id may be a wildcard.
ecs_search_offset
Search for component id in table type starting from an offset. This operation is the same as ecs_search, but starts searching from an offset in the table type.
ecs_search_relation
Search for component/relationship id in table type starting from an offset. This operation is the same as ecs_search_offset, but has the additional capability of traversing relationships to find a component. For example, if an application wants to find a component for either the provided table or a prefab (using the IsA relationship) of that table, it could use the operation like this:
ecs_set_alias
Set alias for entity. An entity can be looked up using its alias from the root scope without providing the fully qualified name if its parent. An entity can only have a single alias.
ecs_set_automerge
Enable/disable automerging for world or stage. When automerging is enabled, staged data will automatically be merged with the world when staging ends. This happens at the end of progress(), at a sync point or when readonly_end() is called.
ecs_set_binding_ctx
Set a world binding context. Same as ecs_set_ctx but for binding context. A binding context is intended specifically for language bindings to store binding specific data.
ecs_set_ctx
Set a world context. This operation allows an application to register custom data with a world that can be accessed anywhere where the application has the world.
ecs_set_entity_generation
Override the generation of an entity. The generation count of an entity is increased each time an entity is deleted and is used to test whether an entity id is alive.
ecs_set_entity_range
Set a range for issueing new entity ids. This function constrains the entity identifiers returned by ecs_new to the specified range. This operation can be used to ensure that multiple processes can run in the same simulation without requiring a central service that coordinates issueing identifiers.
ecs_set_hooks_id
Register hooks for component. Hooks allow for the execution of user code when components are constructed, copied, moved, destructed, added, removed or set. Hooks can be assigned as as long as a component has not yet been used (added to an entity).
ecs_set_id
Set the value of a component. This operation allows an application to set the value of a component. The operation is equivalent to calling ecs_get_mut_id followed by ecs_modified_id. The operation will not modify the value of the passed in component. If the component has a copy hook registered, it will be used to copy in the component.
ecs_set_interval
Set timer interval. This operation will continously invoke systems associated with the timer after the interval period expires. If the entity contains an existing timer, the interval value will be reset.
ecs_set_lookup_path
Set search path for lookup operations. This operation accepts an array of entity ids that will be used as search scopes by lookup operations. The operation returns the current search path. It is good practice to restore the old search path.
ecs_set_name
Set the name of an entity. This will set or overwrite the name of an entity. If no entity is provided, a new entity will be created.
ecs_set_name_prefix
Set a name prefix for newly created entities. This is a utility that lets C modules use prefixed names for C types and C functions, while using names for the entity names that do not have the prefix. The name prefix is currently only used by ECS_COMPONENT.
ecs_set_os_api_impl
ecs_set_pipeline
Set a custom pipeline. This operation sets the pipeline to run when ecs_progress is invoked.
ecs_set_rate
Set rate filter. This operation initializes a rate filter. Rate filters sample tick sources and tick at a configurable multiple. A rate filter is a tick source itself, which means that rate filters can be chained.
ecs_set_scope
Set the current scope. This operation sets the scope of the current stage to the provided entity. As a result new entities will be created in this scope, and lookups will be relative to the provided scope.
ecs_set_stage_count
Configure world to have N stages. This initializes N stages, which allows applications to defer operations to multiple isolated defer queues. This is typically used for applications with multiple threads, where each thread gets its own queue, and commands are merged when threads are synchronized.
ecs_set_symbol
Set the symbol of an entity. This will set or overwrite the symbol of an entity. If no entity is provided, a new entity will be created.
ecs_set_target_fps
Set target frames per second (FPS) for application. Setting the target FPS ensures that ecs_progress is not invoked faster than the specified FPS. When enabled, ecs_progress tracks the time passed since the last invocation, and sleeps the remaining time of the frame (if any).
ecs_set_task_threads
Set number of worker task threads. ecs_set_task_threads is similar to ecs_set_threads, except threads are treated as short-lived tasks and will be created and joined around each update of the world. Creation and joining of these tasks will use the os_api_t tasks APIs rather than the the standard thread API functions, although they may be the same if desired. This function is useful for multithreading world updates using an external asynchronous job system rather than long running threads by providing the APIs to create tasks for your job system and then wait on their conclusion. The operation may be called multiple times to reconfigure the number of task threads used, but never while running a system / pipeline. Calling ecs_set_task_threads will also end the use of threads setup with ecs_set_threads and vice-versa
ecs_set_threads
Set number of worker threads. Setting this value to a value higher than 1 will start as many threads and will cause systems to evenly distribute matched entities across threads. The operation may be called multiple times to reconfigure the number of threads used, but never while running a system / pipeline. Calling ecs_set_threads will also end the use of task threads setup with ecs_set_task_threads and vice-versa
ecs_set_tick_source
Assign tick source to system. Systems can be their own tick source, which can be any of the tick sources (one shot timers, interval times and rate filters). However, in some cases it is must be guaranteed that different systems tick on the exact same frame.
ecs_set_time_scale
Set time scale. Increase or decrease simulation speed by the provided multiplier.
ecs_set_timeout
Set timer timeout. This operation executes any systems associated with the timer after the specified timeout value. If the entity contains an existing timer, the timeout value will be reset. The timer can be started and stopped with ecs_start_timer and ecs_stop_timer.
ecs_set_with
Set current with id. New entities are automatically created with the specified id.
ecs_should_log
Should current level be logged. This operation returns true when the specified log level should be logged with the current log level.
ecs_should_quit
Return whether a quit has been signaled.
ecs_sleepf
Sleep with floating point time
ecs_snapshot_free
Free snapshot resources. This frees resources associated with a snapshot without restoring it.
ecs_snapshot_iter
Obtain iterator to snapshot data.
ecs_snapshot_next
Progress snapshot iterator.
ecs_snapshot_restore
Restore a snapshot. This operation restores the world to the state it was in when the specified snapshot was taken. A snapshot can only be used once for restoring, as its data replaces the data that is currently in the world. This operation also resets the last issued entity handle, so any calls to ecs_new may return entity ids that have been issued before restoring the snapshot.
ecs_snapshot_take
Create a snapshot. This operation makes a copy of the current state of the world.
ecs_snapshot_take_w_iter
Create a filtered snapshot. This operation is the same as ecs_snapshot_take, but accepts an iterator so an application can control what is stored by the snapshot.
ecs_sparse_add
ecs_sparse_count
ecs_sparse_get
ecs_sparse_get_dense
ecs_sparse_init
Publicly exposed APIs The flecs_ functions aren’t exposed directly as this can cause some optimizers to not consider them for link time optimization.
ecs_sparse_last_id
ecs_stage_is_async
Test whether provided stage is asynchronous.
ecs_stage_is_readonly
Test whether the current world is readonly. This function allows the code to test whether the currently used world is readonly or whether it allows for writing.
ecs_start_timer
Start timer. This operation resets the timer and starts it with the specified timeout.
ecs_stop_timer
Stop timer This operation stops a timer from triggering.
ecs_strbuf_append
Append format string to a buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendbool
Append boolean to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendch
Append character to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendflt
Append float to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendint
Append int to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendstr
Append string to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendstr_zerocpy
Append string to buffer, transfer ownership to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendstr_zerocpy_const
Append string to buffer, do not free/modify string. Returns false when max is reached, true when there is still space
ecs_strbuf_appendstr_zerocpyn
Append string to buffer, transfer ownership to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendstr_zerocpyn_const
Append string to buffer, transfer ownership to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_appendstrn
Append n characters to buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_get
Return result string
ecs_strbuf_get_small
Return small string from first element (appends \0)
ecs_strbuf_list_append
Append formatted string as a new element in list
ecs_strbuf_list_appendch
Append character to as new element in list.
ecs_strbuf_list_appendstr
Append string as a new element in list
ecs_strbuf_list_appendstrn
Append string as a new element in list
ecs_strbuf_list_next
Insert a new element in list
ecs_strbuf_list_pop
Pop a new list
ecs_strbuf_list_push
Push a list
ecs_strbuf_mergebuff
Append source buffer to destination buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_reset
Reset buffer without returning a string
ecs_strbuf_vappend
Append format string with argument list to a buffer. Returns false when max is reached, true when there is still space
ecs_strbuf_written
ecs_strerror
Get description for error code
ecs_stresc
Write an escaped string. Write an input string to an output string, escape characters where necessary. To determine the size of the output string, call the operation with a NULL argument for ‘out’, and use the returned size to allocate a string that is large enough.
ecs_strip_generation
Remove generation from entity id.
ecs_struct_init
Create a new struct type
ecs_system_get_binding_ctx
Get system binding context. The binding context is a context typically used to attach any language binding specific data that is needed when invoking a callback that is implemented in another language.
ecs_system_get_ctx
Get system context. This operation returns the context pointer set for the system. If the provided entity is not a system, the function will return NULL.
ecs_system_get_query
Get the query object for a system. Systems use queries under the hood. This enables an application to get access to the underlying query object of a system. This can be useful when, for example, an application needs to enable sorting for a system.
ecs_system_init
Create a system
ecs_system_stats_copy_last
Copy last measurement from source to destination.
ecs_system_stats_get
Get system statistics. Obtain statistics for the provided system.
ecs_system_stats_reduce
Reduce source measurement window into single destination measurement
ecs_system_stats_reduce_last
Reduce last measurement into previous measurement, restore old value.
ecs_system_stats_repeat_last
Repeat last measurement.
ecs_table_add_id
Get table that has all components of current table plus the specified id. If the provided table already has the provided id, the operation will return the provided table.
ecs_table_column_count
Return number of columns in table. Similar to ecs_table_get_type(table)->count, except that the column count only counts the number of components in a table.
ecs_table_column_to_type_index
Convert column index to type index. Same as ecs_table_type_to_column_index, but converts from an index in the column array to an index in the table type.
ecs_table_count
Returns the number of records in the table. This operation returns the number of records that have been populated through the regular (entity) API as well as the number of records that have been inserted using the direct access API.
ecs_table_find
Find table from id array. This operation finds or creates a table with the specified array of (component) ids. The ids in the array must be sorted, and it may not contain duplicate elements.
ecs_table_get_column
Get column from table by column index. This operation returns the component array for the provided index.
ecs_table_get_column_index
Get column index for id. This operation returns the column index for an id in the table’s type. If the id is not a component, the function will return -1.
ecs_table_get_column_size
Get column size from table. This operation returns the component size for the provided index.
ecs_table_get_depth
Return depth for table in tree for relationship rel. Depth is determined by counting the number of targets encountered while traversing up the relationship tree for rel. Only acyclic relationships are supported.
ecs_table_get_id
Get column from table by component id. This operation returns the component array for the provided component id.
ecs_table_get_type
Get type for table. The table type is a vector that contains all component, tag and pair ids.
ecs_table_get_type_index
Get type index for id. This operation returns the index for an id in the table’s type.
ecs_table_has_flags
Test table for flags. Test if table has all of the provided flags. See include/flecs/private/api_flags.h for a list of table flags that can be used with this function.
ecs_table_has_id
Test if table has id. Same as ecs_table_get_type_index(world, table, id) != -1.
ecs_table_lock
Lock or unlock table. When a table is locked, modifications to it will throw an assert. When the table is locked recursively, it will take an equal amount of unlock operations to actually unlock the table.
ecs_table_remove_id
Get table that has all components of current table minus the specified id. If the provided table doesn’t have the provided id, the operation will return the provided table.
ecs_table_str
Convert table to string. Same as ecs_type_str(world, ecs_table_get_type(table)). The result of this operation must be freed with ecs_os_free.
ecs_table_swap_rows
Swaps two elements inside the table. This is useful for implementing custom table sorting algorithms. @param world The world @param table The table to swap elements in @param row_1 Table element to swap with row_2 @param row_2 Table element to swap with row_1
ecs_table_type_to_column_index
Convert type index to column index. Tables have an array of columns for each component in the table. This array does not include elements for tags, which means that the index for a component in the table type is not necessarily the same as the index in the column array. This operation converts from an index in the table type to an index in the column array.
ecs_table_unlock
Unlock a table. Must be called after calling ecs_table_lock.
ecs_term_chain_iter
Return a chained term iterator. A chained iterator applies a filter to the results of the input iterator. The resulting iterator must be iterated with ecs_term_next.
ecs_term_copy
Copy resources of a term to another term. This operation copies one term to another term. If the source term contains allocated resources (such as identifiers), they will be duplicated so that no memory is shared between the terms.
ecs_term_finalize
Finalize term. Ensure that all fields of a term are consistent and filled out. This operation should be invoked before using and after assigning members to, or parsing a term. When a term contains unresolved identifiers, this operation will resolve and assign the identifiers. If the term contains any identifiers that cannot be resolved, the operation will fail.
ecs_term_fini
Free resources of term. This operation frees all resources (such as identifiers) of a term. The term itself is not freed.
ecs_term_id_is_set
Test whether term id is set.
ecs_term_is_initialized
Test whether a term is set. This operation can be used to test whether a term has been initialized with values or whether it is empty.
ecs_term_iter
Iterator for a single (component) id. A term iterator returns all entities (tables) that match a single (component) id. The search for the matching set of entities (tables) is performed in constant time.
ecs_term_match_0
Is term matched on 0 source. This operation checks whether a term is matched on a 0 source. A 0 source is a term that isn’t matched against anything, and can be used just to pass (component) ids to a query iterator.
ecs_term_match_this
Is term matched on $this variable. This operation checks whether a term is matched on the $this variable, which is the default source for queries.
ecs_term_move
Move resources of a term to another term. Same as copy, but moves resources from src, if src->move is set to true. If src->move is not set to true, this operation will do a copy.
ecs_term_next
Progress a term iterator. This operation progresses the term iterator to the next table. The iterator must have been initialized with ecs_term_iter. This operation must be invoked at least once before interpreting the contents of the iterator.
ecs_term_str
Convert term to string expression. Convert term to a string expression. The resulting expression is equivalent to the same term, with the exception of And & Or operators.
ecs_time_measure
Measure time since provided timestamp
ecs_time_sub
Calculate difference between two timestamps
ecs_time_to_double
Convert time value to a double
ecs_type_info_to_json
Serialize type info to JSON. This serializes type information to JSON, and can be used to store/transmit the structure of a (component) value.
ecs_type_info_to_json_buf
Serialize type info into JSON string buffer. Same as ecs_type_info_to_json, but serializes to an ecs_strbuf_t instance.
ecs_type_str
Convert type to string. The result of this operation must be freed with ecs_os_free.
ecs_unit_init
Create a new unit
ecs_unit_prefix_init
Create a new unit prefix
ecs_using_task_threads
Returns true if task thread use have been requested.
ecs_value_copy
Copy value.
ecs_value_copy_w_type_info
Copy value.
ecs_value_fini
Destruct a value
ecs_value_fini_w_type_info
Destruct a value
ecs_value_free
Destruct a value, free storage
ecs_value_init
Construct a value in existing storage
ecs_value_init_w_type_info
Construct a value in existing storage
ecs_value_move
Move value.
ecs_value_move_ctor
Move construct value.
ecs_value_move_ctor_w_type_info
Move construct value.
ecs_value_move_w_type_info
Move value.
ecs_value_new
Construct a value in new storage
ecs_value_new_w_type_info
Construct a value in new storage
ecs_vars_declare
Declare variable in current scope
ecs_vars_declare_w_value
Declare variable in current scope from value. This operation takes ownership of the value. The value pointer must be allocated with ecs_value_new.
ecs_vars_fini
Cleanup variable storage
ecs_vars_init
Init variable storage
ecs_vars_lookup
Lookup variable in scope and parent scopes
ecs_vars_pop
Pop variable scope
ecs_vars_push
Push variable scope
ecs_vasprintf
Create allocated string from format
ecs_vec_append
ecs_vec_clear
ecs_vec_copy
ecs_vec_count
ecs_vec_fini
ecs_vec_first
ecs_vec_get
ecs_vec_grow
ecs_vec_init
ecs_vec_init_if
ecs_vec_last
ecs_vec_reclaim
ecs_vec_remove
ecs_vec_remove_last
ecs_vec_reset
ecs_vec_set_count
ecs_vec_set_min_count
ecs_vec_set_min_count_zeromem
ecs_vec_set_min_size
ecs_vec_set_size
ecs_vec_size
ecs_vector_init
Create a new vector type
ecs_worker_iter
Create a worker iterator. Worker iterators can be used to equally divide the number of matched entities across N resources (usually threads). Each resource will process the total number of matched entities divided by ‘count’.
ecs_worker_next
Progress a worker iterator. Progresses an iterator created by ecs_worker_iter.
ecs_world_from_json
Parse JSON object with multiple entities into the world. The format is the same as the one outputted by ecs_world_to_json.
ecs_world_stats_copy_last
Copy last measurement from source to destination.
ecs_world_stats_get
Get world statistics.
ecs_world_stats_log
ecs_world_stats_reduce
Reduce source measurement window into single destination measurement.
ecs_world_stats_reduce_last
Reduce last measurement into previous measurement, restore old value.
ecs_world_stats_repeat_last
Repeat last measurement.
ecs_world_to_json
Serialize world into JSON string. This operation iterates the contents of the world to JSON. The operation is equivalent to the following code:
ecs_world_to_json_buf
Serialize world into JSON string buffer. Same as ecs_world_to_json, but serializes to an ecs_strbuf_t instance.
ecs_write_begin
Begin exclusive write access to entity. This operation provides safe exclusive access to the components of an entity without the overhead of deferring operations.
ecs_write_end
End exclusive write access to entity. This operation ends exclusive access, and must be called after ecs_write_begin.
flecs_allocator_fini
flecs_allocator_get
flecs_allocator_init
flecs_balloc
flecs_ballocator_fini
flecs_ballocator_free
flecs_ballocator_init
flecs_ballocator_new
flecs_bcalloc
flecs_bdup
flecs_bfree
flecs_brealloc
flecs_dump_backtrace
flecs_dup
flecs_hashmap_copy
flecs_hashmap_ensure_
flecs_hashmap_fini
flecs_hashmap_get_
flecs_hashmap_get_bucket
flecs_hashmap_init_
flecs_hashmap_iter
flecs_hashmap_next_
flecs_hashmap_remove_
flecs_hashmap_remove_w_hash_
flecs_hashmap_set_
flecs_hm_bucket_remove
flecs_sparse_add
Add element to sparse set, this generates or recycles an id
flecs_sparse_clear
Remove all elements from sparse set
flecs_sparse_count
Get the number of alive elements in the sparse set.
flecs_sparse_ensure
Get or create element by (sparse) id.
flecs_sparse_ensure_fast
Fast version of ensure, no liveliness checking
flecs_sparse_fini
flecs_sparse_get
Get element by (sparse) id. The returned pointer is stable for the duration of the sparse set, as it is stored in the sparse array.
flecs_sparse_get_any
Like get_sparse, but don’t care whether element is alive or not.
flecs_sparse_get_dense
Get value from sparse set by dense id. This function is useful in combination with flecs_sparse_count for iterating all values in the set.
flecs_sparse_ids
Get pointer to ids (alive and not alive). Use with count() or size().
flecs_sparse_init
Initialize sparse set
flecs_sparse_is_alive
Test if id is alive, which requires the generation count to match.
flecs_sparse_last_id
Get last issued id.
flecs_sparse_new_id
Generate or recycle a new id.
flecs_sparse_remove
Remove an element
flecs_sparse_set_generation
Override the generation count for a specific id
flecs_sparse_try
Same as flecs_sparse_get, but doesn’t assert if id is not alive.
flecs_strdup
flecs_strfree
flecs_table_observed_count
flecs_to_rust_str
flecs_to_rust_string
flecs_to_snake_case
Convert identifier to snake case
register_component

Type Aliases§

EcsIterable
Component for iterable entities
EntityId
__builtin_va_list
ecs_app_frame_action_t
Callback type for frame action.
ecs_app_init_action_t
Callback type for init action.
ecs_app_run_action_t
Callback type for run action.
ecs_bool_t
Primitive type definitions. These typedefs allow the builtin primitives to be used as regular components: ecs_set(world, e, ecs_i32_t, {10});
ecs_byte_t
ecs_char_t
ecs_compare_action_t
Callback used for sorting values
ecs_copy_t
Copy is invoked when a component is copied into another component.
ecs_ctx_free_t
Function to cleanup context data
ecs_entity_t
An entity identifier. Entity ids consist out of a number unique to the entity in the lower 32 bits, and a counter used to track entity liveliness in the upper 32 bits. When an id is recycled, its generation count is increased. This causes recycled ids to be very large (>4 billion), which is normal.
ecs_f32_t
ecs_f64_t
ecs_fini_action_t
Action callback on world exit
ecs_flags8_t
Utility types to indicate usage as bitmask
ecs_flags16_t
ecs_flags32_t
ecs_flags64_t
ecs_group_by_action_t
Callback used for grouping tables in a query
ecs_group_create_action_t
Callback invoked when a query creates a new group.
ecs_group_delete_action_t
Callback invoked when a query deletes an existing group.
ecs_hash_value_action_t
Callback used for hashing values
ecs_http_method_t
Supported request methods
ecs_http_reply_action_t
Request callback. Invoked for each valid request. The function should populate the reply and return true. When the function returns false, the server will reply with a 404 (Not found) code.
ecs_i8_t
ecs_i16_t
ecs_i32_t
ecs_i64_t
ecs_id_t
Ids are the things that can be added to an entity. An id can be an entity or pair, and can have optional id flags.
ecs_inout_kind_t
Specify read/write access for term
ecs_iptr_t
ecs_iter_action_t
Function prototype for iterables. A system may invoke a callback multiple times, typically once for each matched table.
ecs_iter_fini_action_t
Function prototype for freeing an iterator. Free iterator resources.
ecs_iter_init_action_t
Function prototype for creating an iterator from a poly. Used to create iterators from poly objects with the iterable mixin. When a filter is provided, an array of two iterators must be passed to the function. This allows the mixin implementation to create a chained iterator when necessary, which requires two iterator objects.
ecs_iter_kind_t
ecs_iter_next_action_t
Function prototype for iterating an iterator. Stored inside initialized iterators. This allows an application to * iterate an iterator without needing to know what created it.
ecs_map_data_t
ecs_map_key_t
ecs_map_val_t
ecs_meta_serialize_t
Callback invoked serializing an opaque type.
ecs_meta_type_op_kind_t
Serializer utilities
ecs_module_action_t
Initialization action for modules
ecs_move_t
Move is invoked when a component is moved to another component.
ecs_oper_kind_t
Specify operator for term
ecs_order_by_action_t
Callback used for comparing components
ecs_os_api_abort_t
Application termination
ecs_os_api_ainc_t
Atomic increment / decrement
ecs_os_api_calloc_t
ecs_os_api_cond_broadcast_t
ecs_os_api_cond_free_t
ecs_os_api_cond_new_t
Condition variable
ecs_os_api_cond_signal_t
ecs_os_api_cond_wait_t
ecs_os_api_dlclose_t
ecs_os_api_dlopen_t
Dynamic libraries
ecs_os_api_dlproc_t
ecs_os_api_enable_high_timer_resolution_t
ecs_os_api_fini_t
OS API deinit
ecs_os_api_free_t
ecs_os_api_get_time_t
ecs_os_api_init_t
OS API init
ecs_os_api_lainc_t
ecs_os_api_log_t
Logging
ecs_os_api_malloc_t
Memory management
ecs_os_api_module_to_path_t
ecs_os_api_mutex_free_t
ecs_os_api_mutex_lock_t
ecs_os_api_mutex_new_t
Mutex
ecs_os_api_mutex_unlock_t
ecs_os_api_now_t
ecs_os_api_realloc_t
ecs_os_api_sleep_t
ecs_os_api_strdup_t
ecs_os_api_task_join_t
ecs_os_api_task_new_t
Tasks
ecs_os_api_thread_join_t
ecs_os_api_thread_new_t
ecs_os_api_thread_self_t
ecs_os_cond_t
ecs_os_dl_t
ecs_os_mutex_t
ecs_os_proc_t
Generic function pointer type
ecs_os_sock_t
ecs_os_thread_callback_t
Threads
ecs_os_thread_id_t
64 bit thread id
ecs_os_thread_t
Use handle types that at least can store pointers
ecs_poly_dtor_t
Destructor function for poly objects
ecs_poly_t
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_primitive_kind_t
Primitive type kinds supported by meta addon
ecs_run_action_t
Function prototype for runnables (systems, observers). The run callback overrides the default behavior for iterating through the results of a runnable object.
ecs_size_t
Keep unsigned integers out of the codebase as they do more harm than good
ecs_sort_table_action_t
Callback used for sorting the entire table of components
ecs_string_t
ecs_type_kind_t
Type kinds supported by meta addon
ecs_u8_t
ecs_u16_t
ecs_u32_t
ecs_u64_t
ecs_uptr_t
ecs_xtor_t
Constructor/destructor callback
va_list

Unions§

ecs_iter_private_t__bindgen_ty_1
ecs_metric_t
Make all metrics the same size, so we can iterate over fields