Struct ecs_filter_desc_t

Synopsis

#include <include/flecs.h>

typedef struct ecs_filter_desc_t

Description

Used with ecs_filter_init.

Mentioned in

Source

Lines 678-708 in include/flecs.h.

typedef struct ecs_filter_desc_t {
    int32_t _canary;

    /* Terms of the filter. If a filter has more terms than 
     * ECS_TERM_CACHE_SIZE use terms_buffer */
    ecs_term_t terms[ECS_TERM_DESC_CACHE_SIZE];

    /* For filters with lots of terms an outside array can be provided. */
    ecs_term_t *terms_buffer;
    int32_t terms_buffer_count;

    /* External storage to prevent allocation of the filter object */
    ecs_filter_t *storage;

    /* When true, terms returned by an iterator may either contain 1 or N 
     * elements, where terms with N elements are owned, and terms with 1 element 
     * are shared, for example from a parent or base entity. When false, the 
     * iterator will at most return 1 element when the result contains both 
     * owned and shared terms. */ 
    bool instanced;

    /* Flags for advanced usage */
    ecs_flags32_t flags;

    /* Filter expression. Should not be set at the same time as terms array */
    const char *expr;

    /* Optional name of filter, used for debugging. If a filter is created for
     * a system, the provided name should match the system name. */
    const char *name;
} ecs_filter_desc_t;