Function ecs_term_finalize

Synopsis

#include <include/flecs.h>

FLECS_API int ecs_term_finalize(const ecs_world_t *world, const char *name, ecs_term_t *term)

Description

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.

An application generally does not need to invoke this operation as the APIs that use terms (such as filters, queries and triggers) will finalize terms when they are created.

The name and expr parameters are optional, and only used for giving more descriptive error messages.

Parameters

world - The world.

name - The name of the entity that uses the term (such as a system).

expr - The string expression of which the term is a part.

term - The term to finalize.

Returns
Zero if success, nonzero if an error occurred.

Source

Line 2395 in include/flecs.h.