Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
Builtin component ids.
Collaboration diagram for Builtin component ids.:

Macros

#define EcsSingleton   EcsVariable
 Shortcut as EcsVariable is typically used as source for singleton terms.
 
#define EcsLastInternalComponentId   (ecs_id(EcsPoly))
 Value used to quickly check if component is builtin.
 
#define EcsFirstUserComponentId   (8)
 The first user-defined component starts from this id.
 
#define EcsFirstUserEntityId   (FLECS_HI_COMPONENT_ID + 128)
 The first user-defined entity starts from this id.
 

Variables

const ecs_entity_t FLECS_IDEcsComponentID_
 Component component id.
 
const ecs_entity_t FLECS_IDEcsIdentifierID_
 Identifier component id.
 
const ecs_entity_t FLECS_IDEcsPolyID_
 Poly component id.
 
const ecs_entity_t FLECS_IDEcsDefaultChildComponentID_
 DefaultChildComponent component id.
 
const ecs_entity_t EcsQuery
 Tag added to queries.
 
const ecs_entity_t EcsObserver
 Tag added to observers.
 
const ecs_entity_t EcsSystem
 Tag added to systems.
 
const ecs_entity_t FLECS_IDEcsTickSourceID_
 TickSource component id.
 
const ecs_entity_t FLECS_IDEcsPipelineQueryID_
 Pipeline module component ids.
 
const ecs_entity_t FLECS_IDEcsTimerID_
 Timer component id.
 
const ecs_entity_t FLECS_IDEcsRateFilterID_
 RateFilter component id.
 
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 ("*").
 
const ecs_entity_t EcsAny
 Any entity ("_").
 
const ecs_entity_t EcsThis
 This entity.
 
const ecs_entity_t EcsVariable
 Variable entity ("$").
 
const ecs_entity_t EcsTransitive
 Marks a relationship as transitive.
 
const ecs_entity_t EcsReflexive
 Marks a relationship as reflexive.
 
const ecs_entity_t EcsFinal
 Ensures that entity/component cannot be used as target in IsA relationship.
 
const ecs_entity_t EcsOnInstantiate
 Relationship that specifies component inheritance behavior.
 
const ecs_entity_t EcsOverride
 Override component on instantiate.
 
const ecs_entity_t EcsInherit
 Inherit component on instantiate.
 
const ecs_entity_t EcsDontInherit
 Never inherit component on instantiate.
 
const ecs_entity_t EcsSymmetric
 Marks relationship as commutative.
 
const ecs_entity_t EcsExclusive
 Can be added to relationship to indicate that the relationship can only occur once on an entity.
 
const ecs_entity_t EcsAcyclic
 Marks a relationship as acyclic.
 
const ecs_entity_t EcsTraversable
 Marks a relationship as traversable.
 
const ecs_entity_t EcsWith
 Ensure that a component always is added together with another component.
 
const ecs_entity_t EcsOneOf
 Ensure that relationship target is child of specified entity.
 
const ecs_entity_t EcsCanToggle
 Mark a component as toggleable with ecs_enable_id().
 
const ecs_entity_t EcsTrait
 Can be added to components to indicate it is a trait.
 
const ecs_entity_t EcsRelationship
 Ensure that an entity is always used in pair as relationship.
 
const ecs_entity_t EcsTarget
 Ensure that an entity is always used in pair as target.
 
const ecs_entity_t EcsPairIsTag
 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 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.
 
const ecs_entity_t EcsDisabled
 When this tag is added to an entity it is skipped by queries, unless EcsDisabled is explicitly queried for.
 
const ecs_entity_t EcsNotQueryable
 Trait added to entities that should never be returned by queries.
 
const ecs_entity_t EcsOnAdd
 Event that triggers when an id is added to an entity.
 
const ecs_entity_t EcsOnRemove
 Event that triggers when an id is removed from an entity.
 
const ecs_entity_t EcsOnSet
 Event that triggers when a component is set for an entity.
 
const ecs_entity_t EcsMonitor
 Event that triggers observer when an entity starts/stops matching a query.
 
const ecs_entity_t EcsOnTableCreate
 Event that triggers when a table is created.
 
const ecs_entity_t EcsOnTableDelete
 Event that triggers when a table is deleted.
 
const ecs_entity_t EcsOnTableEmpty
 Event that triggers when a table becomes empty (doesn't emit on creation).
 
const ecs_entity_t EcsOnTableFill
 Event that triggers when a table becomes non-empty.
 
const ecs_entity_t EcsOnDelete
 Relationship used for specifying cleanup behavior.
 
const ecs_entity_t EcsOnDeleteTarget
 Relationship used to define what should happen when a target entity (second element of a pair) is deleted.
 
const ecs_entity_t EcsRemove
 Remove cleanup policy.
 
const ecs_entity_t EcsDelete
 Delete cleanup policy.
 
const ecs_entity_t EcsPanic
 Panic cleanup policy.
 
const ecs_entity_t EcsSparse
 Mark component as sparse.
 
const ecs_entity_t EcsUnion
 Mark relationship as union.
 
const ecs_entity_t EcsPredEq
 Marker used to indicate $var == ... matching in queries.
 
const ecs_entity_t EcsPredMatch
 Marker used to indicate $var == "name" matching in queries.
 
const ecs_entity_t EcsPredLookup
 Marker used to indicate $var ~= "pattern" matching in queries.
 
const ecs_entity_t EcsScopeOpen
 Marker used to indicate the start of a scope ({) in queries.
 
const ecs_entity_t EcsScopeClose
 Marker used to indicate the end of a scope (}) in queries.
 
const ecs_entity_t EcsEmpty
 Tag used to indicate query is empty.
 
const ecs_entity_t FLECS_IDEcsPipelineID_
 Pipeline component id.
 
const ecs_entity_t EcsOnStart
 OnStart pipeline phase.
 
const ecs_entity_t EcsPreFrame
 PreFrame pipeline phase.
 
const ecs_entity_t EcsOnLoad
 OnLoad pipeline phase.
 
const ecs_entity_t EcsPostLoad
 PostLoad pipeline phase.
 
const ecs_entity_t EcsPreUpdate
 PreUpdate pipeline phase.
 
const ecs_entity_t EcsOnUpdate
 OnUpdate pipeline phase.
 
const ecs_entity_t EcsOnValidate
 OnValidate pipeline phase.
 
const ecs_entity_t EcsPostUpdate
 PostUpdate pipeline phase.
 
const ecs_entity_t EcsPreStore
 PreStore pipeline phase.
 
const ecs_entity_t EcsOnStore
 OnStore pipeline phase.
 
const ecs_entity_t EcsPostFrame
 PostFrame pipeline phase.
 
const ecs_entity_t EcsPhase
 Phase pipeline phase.
 

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 1828 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 entities

Definition at line 1832 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 1824 of file flecs.h.

◆ EcsSingleton

#define EcsSingleton   EcsVariable

Shortcut as EcsVariable is typically used as source for singleton terms.

Definition at line 1564 of file flecs.h.

Variable Documentation

◆ EcsAcyclic

const ecs_entity_t EcsAcyclic
extern

Marks a relationship as acyclic.

Acyclic relationships may not form cycles.

◆ EcsAny

const ecs_entity_t EcsAny
extern

Any entity ("_").

Matches any id, returns only the first.

◆ 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

Never inherit component on instantiate.

This will not copy or share the component from the base entity (IsA target). When the component is added to an instance, its value will never be copied from the base entity.

◆ EcsEmpty

const ecs_entity_t EcsEmpty
extern

Tag used to indicate query is empty.

This tag is removed automatically when a query becomes non-empty, and is not automatically re-added when it becomes empty.

◆ 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 queries as they will not attempt to substitute a final component with its subsets.

Behavior:

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

◆ EcsInherit

const ecs_entity_t EcsInherit
extern

Inherit component on instantiate.

This will inherit (share) the component from the base entity (IsA target). The component can be manually overridden by adding it to the instance.

◆ EcsNotQueryable

const ecs_entity_t EcsNotQueryable
extern

Trait added to entities that should never be returned by queries.

Reserved for internal entities that have special meaning to the query engine, such as EcsThis, EcsWildcard, EcsAny.

◆ 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

◆ EcsOverride

const ecs_entity_t EcsOverride
extern

Override component on instantiate.

This will copy the component from the base entity (IsA target) to the instance. The base component will never be inherited from the prefab.

◆ 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 queries, unless EcsPrefab is explicitly queried for.

◆ EcsReflexive

const ecs_entity_t EcsReflexive
extern

Marks a relationship as reflexive.

Behavior:

R(X, X) == true

◆ EcsRelationship

const ecs_entity_t EcsRelationship
extern

Ensure that an entity is always used in pair as relationship.

Behavior:

e.add(R) panics
e.add(X, R) panics, unless X has the "Trait" trait

◆ 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)

◆ EcsTarget

const ecs_entity_t EcsTarget
extern

Ensure that an entity is always used in pair as target.

Behavior:

e.add(T) panics
e.add(T, X) panics

◆ EcsThis

const ecs_entity_t EcsThis
extern

This entity.

Default source for queries.

◆ EcsTrait

const ecs_entity_t EcsTrait
extern

Can be added to components to indicate it is a trait.

Traits are components and/or tags that are added to other components to modify their behavior.

◆ 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 relationships are acyclic.

◆ 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)