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

Macros

#define EcsLastInternalComponentId   (ecs_id(EcsPoly))
 Value used to quickly check if component is builtin. More...
 
#define EcsFirstUserComponentId   (8)
 The first user-defined component starts from this id. More...
 
#define EcsFirstUserEntityId   (FLECS_HI_COMPONENT_ID + 128)
 The first user-defined entity starts from this id. More...
 

Variables

const ecs_entity_t FLECS__EEcsComponent
 
const ecs_entity_t FLECS__EEcsIdentifier
 
const ecs_entity_t FLECS__EEcsIterable
 
const ecs_entity_t FLECS__EEcsPoly
 
const ecs_entity_t EcsQuery
 
const ecs_entity_t EcsObserver
 
const ecs_entity_t EcsSystem
 
const ecs_entity_t FLECS__EEcsTickSource
 
const ecs_entity_t FLECS__EEcsPipelineQuery
 
const ecs_entity_t FLECS__EEcsTimer
 
const ecs_entity_t FLECS__EEcsRateFilter
 
const ecs_entity_t EcsFlecs
 Root scope for builtin flecs entities.
 
const ecs_entity_t EcsFlecsCore
 Core module scope.
 
const ecs_entity_t EcsWorld
 Entity associated with world (used for "attaching" components to world)
 
const ecs_entity_t EcsWildcard
 Wildcard entity ("*"). More...
 
const ecs_entity_t EcsAny
 Any entity ("_"). More...
 
const ecs_entity_t EcsThis
 This entity. More...
 
const ecs_entity_t EcsVariable
 Variable entity ("$"). More...
 
const ecs_entity_t EcsTransitive
 Marks a relationship as transitive. More...
 
const ecs_entity_t EcsReflexive
 Marks a relatoinship as reflexive. More...
 
const ecs_entity_t EcsFinal
 Ensures that entity/component cannot be used as target in IsA relationship. More...
 
const ecs_entity_t EcsDontInherit
 Ensures that component is never inherited from an IsA target. More...
 
const ecs_entity_t EcsAlwaysOverride
 Ensures a component is always overridden. More...
 
const ecs_entity_t EcsSymmetric
 Marks relationship as commutative. More...
 
const ecs_entity_t EcsExclusive
 Can be added to relationship to indicate that the relationship can only occur once on an entity. More...
 
const ecs_entity_t EcsAcyclic
 Marks a relationship as acyclic. More...
 
const ecs_entity_t EcsTraversable
 Marks a relationship as traversable. More...
 
const ecs_entity_t EcsWith
 Ensure that a component always is added together with another component. More...
 
const ecs_entity_t EcsOneOf
 Ensure that relationship target is child of specified entity. More...
 
const ecs_entity_t EcsTag
 Can be added to relationship to indicate that it should never hold data, even when it or the relationship target is a component.
 
const ecs_entity_t EcsUnion
 Tag to indicate that relationship is stored as union. More...
 
const ecs_entity_t EcsName
 Tag to indicate name identifier.
 
const ecs_entity_t EcsSymbol
 Tag to indicate symbol identifier.
 
const ecs_entity_t EcsAlias
 Tag to indicate alias identifier.
 
const ecs_entity_t EcsChildOf
 Used to express parent-child relationships.
 
const ecs_entity_t EcsIsA
 Used to express inheritance relationships.
 
const ecs_entity_t EcsDependsOn
 Used to express dependency relationships.
 
const ecs_entity_t EcsSlotOf
 Used to express a slot (used with prefab inheritance)
 
const ecs_entity_t EcsModule
 Tag added to module entities.
 
const ecs_entity_t EcsPrivate
 Tag to indicate an entity/component/system is private to a module.
 
const ecs_entity_t EcsPrefab
 Tag added to prefab entities. More...
 
const ecs_entity_t EcsDisabled
 When this tag is added to an entity it is skipped by all queries/filters.
 
const ecs_entity_t EcsOnAdd
 Event. More...
 
const ecs_entity_t EcsOnRemove
 Event. More...
 
const ecs_entity_t EcsOnSet
 Event. More...
 
const ecs_entity_t EcsUnSet
 Event. More...
 
const ecs_entity_t EcsMonitor
 Event. More...
 
const ecs_entity_t EcsOnDelete
 Event. More...
 
const ecs_entity_t EcsOnTableCreate
 Event. More...
 
const ecs_entity_t EcsOnTableDelete
 Event. More...
 
const ecs_entity_t EcsOnTableEmpty
 Event. More...
 
const ecs_entity_t EcsOnTableFill
 Event. More...
 
const ecs_entity_t EcsOnDeleteTarget
 Relationship used to define what should happen when a target entity (second element of a pair) is deleted. More...
 
const ecs_entity_t EcsRemove
 Remove cleanup policy. More...
 
const ecs_entity_t EcsDelete
 Delete cleanup policy. More...
 
const ecs_entity_t EcsPanic
 Panic cleanup policy. More...
 
const ecs_entity_t FLECS__EEcsTarget
 
const ecs_entity_t EcsFlatten
 
const ecs_entity_t EcsDefaultChildComponent
 Used like (EcsDefaultChildComponent, Component). More...
 
const ecs_entity_t EcsPredEq
 
const ecs_entity_t EcsPredMatch
 
const ecs_entity_t EcsPredLookup
 
const ecs_entity_t EcsEmpty
 Tag used to indicate query is empty.
 
const ecs_entity_t FLECS__EEcsPipeline
 
const ecs_entity_t EcsOnStart
 
const ecs_entity_t EcsPreFrame
 
const ecs_entity_t EcsOnLoad
 
const ecs_entity_t EcsPostLoad
 
const ecs_entity_t EcsPreUpdate
 
const ecs_entity_t EcsOnUpdate
 
const ecs_entity_t EcsOnValidate
 
const ecs_entity_t EcsPostUpdate
 
const ecs_entity_t EcsPreStore
 
const ecs_entity_t EcsOnStore
 
const ecs_entity_t EcsPostFrame
 
const ecs_entity_t EcsPhase
 

Detailed Description

Macro Definition Documentation

◆ EcsFirstUserComponentId

#define EcsFirstUserComponentId   (8)

The first user-defined component starts from this id.

Ids up to this number are reserved for builtin components

Definition at line 1393 of file flecs.h.

◆ EcsFirstUserEntityId

#define EcsFirstUserEntityId   (FLECS_HI_COMPONENT_ID + 128)

The first user-defined entity starts from this id.

Ids up to this number are reserved for builtin components

Definition at line 1397 of file flecs.h.

◆ EcsLastInternalComponentId

#define EcsLastInternalComponentId   (ecs_id(EcsPoly))

Value used to quickly check if component is builtin.

This is used to quickly filter out tables with builtin components (for example for ecs_delete)

Definition at line 1389 of file flecs.h.

Variable Documentation

◆ EcsAcyclic

const ecs_entity_t EcsAcyclic
extern

Marks a relationship as acyclic.

Acyclic relationships may not form cycles.

◆ EcsAlwaysOverride

const ecs_entity_t EcsAlwaysOverride
extern

Ensures a component is always overridden.

Behavior: As if the component is added together with OVERRIDE | T

◆ EcsAny

const ecs_entity_t EcsAny
extern

Any entity ("_").

Matches any id, returns only the first.

◆ EcsDefaultChildComponent

const ecs_entity_t EcsDefaultChildComponent
extern

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.

◆ EcsDelete

const ecs_entity_t EcsDelete
extern

Delete cleanup policy.

Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.

◆ EcsDontInherit

const ecs_entity_t EcsDontInherit
extern

Ensures that component is never inherited from an IsA target.

Behavior: if DontInherit(X) and X(B) and IsA(A, B) then X(A) is false.

◆ EcsExclusive

const ecs_entity_t EcsExclusive
extern

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.

Behavior: R(X, Y) + R(X, Z) = R(X, Z)

◆ EcsFinal

const ecs_entity_t EcsFinal
extern

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.

Behavior: if IsA(X, Y) and Final(Y) throw error

◆ EcsMonitor

const ecs_entity_t EcsMonitor
extern

Event.

Exactly-once observer for when an entity matches/unmatches a filter

◆ EcsOnAdd

const ecs_entity_t EcsOnAdd
extern

Event.

Triggers when an id (component, tag, pair) is added to an entity

◆ EcsOnDelete

const ecs_entity_t EcsOnDelete
extern

Event.

Triggers when an entity is deleted. Also used as relationship for defining cleanup behavior, see: https://github.com/SanderMertens/flecs/blob/master/docs/Relationships.md#cleanup-properties

◆ EcsOnDeleteTarget

const ecs_entity_t EcsOnDeleteTarget
extern

Relationship used to define what should happen when a target entity (second element of a pair) is deleted.

For details see: https://github.com/SanderMertens/flecs/blob/master/docs/Relationships.md#cleanup-properties

◆ EcsOneOf

const ecs_entity_t EcsOneOf
extern

Ensure that relationship target is child of specified entity.

Behavior: If OneOf(R, O) and R(X, Y), Y must be a child of O If OneOf(R) and R(X, Y), Y must be a child of R

◆ EcsOnRemove

const ecs_entity_t EcsOnRemove
extern

Event.

Triggers when an id (component, tag, pair) is removed from an entity

◆ EcsOnSet

const ecs_entity_t EcsOnSet
extern

Event.

Triggers when a component is set for an entity

◆ EcsOnTableCreate

const ecs_entity_t EcsOnTableCreate
extern

Event.

Triggers when a table is created.

◆ EcsOnTableDelete

const ecs_entity_t EcsOnTableDelete
extern

Event.

Triggers when a table is deleted.

◆ EcsOnTableEmpty

const ecs_entity_t EcsOnTableEmpty
extern

Event.

Triggers when a table becomes empty (doesn't emit on creation).

◆ EcsOnTableFill

const ecs_entity_t EcsOnTableFill
extern

Event.

Triggers when a table becomes non-empty.

◆ EcsPanic

const ecs_entity_t EcsPanic
extern

Panic cleanup policy.

Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.

◆ EcsPrefab

const ecs_entity_t EcsPrefab
extern

Tag added to prefab entities.

Any entity with this tag is automatically ignored by filters/queries, unless EcsPrefab is explicitly added.

◆ EcsReflexive

const ecs_entity_t EcsReflexive
extern

Marks a relatoinship as reflexive.

Behavior: R(X, X) == true

◆ EcsRemove

const ecs_entity_t EcsRemove
extern

Remove cleanup policy.

Must be used as target in pair with EcsOnDelete or EcsOnDeleteTarget.

◆ EcsSymmetric

const ecs_entity_t EcsSymmetric
extern

Marks relationship as commutative.

Behavior: if R(X, Y) then R(Y, X)

◆ EcsThis

const ecs_entity_t EcsThis
extern

This entity.

Default source for queries.

◆ EcsTransitive

const ecs_entity_t EcsTransitive
extern

Marks a relationship as transitive.

Behavior: if R(X, Y) and R(Y, Z) then R(X, Z)

◆ EcsTraversable

const ecs_entity_t EcsTraversable
extern

Marks a relationship as traversable.

Traversable relationships may be traversed with "up" queries. Traversable relatinoships are acyclic.

◆ EcsUnion

const ecs_entity_t EcsUnion
extern

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.

◆ EcsUnSet

const ecs_entity_t EcsUnSet
extern

Event.

Triggers when a component is unset for an entity

◆ EcsVariable

const ecs_entity_t EcsVariable
extern

Variable entity ("$").

Used in expressions to prefix variable names

◆ EcsWildcard

const ecs_entity_t EcsWildcard
extern

Wildcard entity ("*").

Matches any id, returns all matches.

◆ EcsWith

const ecs_entity_t EcsWith
extern

Ensure that a component always is added together with another component.

Behavior: If With(R, O) and R(X) then O(X) If With(R, O) and R(X, Y) then O(X, Y)