@@ -389,8 +389,8 @@ extern "C" {
389
389
390
390
#define EcsFilterMatchThis (1u << 1u) /* Has terms that match This */
391
391
#define EcsFilterMatchOnlyThis (1u << 2u) /* Has only terms that match This */
392
- #define EcsFilterMatchPrefab (1u << 3u) /* Does filter match prefabs */
393
- #define EcsFilterMatchDisabled (1u << 4u) /* Does filter match disabled entities */
392
+ #define EcsQueryMatchPrefab (1u << 3u) /* Does filter match prefabs */
393
+ #define EcsQueryMatchDisabled (1u << 4u) /* Does filter match disabled entities */
394
394
#define EcsFilterMatchEmptyTables (1u << 5u) /* Does filter return empty tables */
395
395
#define EcsFilterMatchAnything (1u << 6u) /* False if filter has no/only Not terms */
396
396
#define EcsFilterNoData (1u << 7u) /* When true, data fields won't be populated */
@@ -2939,7 +2939,7 @@ typedef enum ecs_oper_kind_t {
2939
2939
#define EcsTermMatchPrefab (1u << 8)
2940
2940
2941
2941
/** Type that describes a single identifier in a term */
2942
- typedef struct ecs_term_id_t {
2942
+ typedef struct ecs_term_ref_t {
2943
2943
ecs_entity_t id; /**< Entity id. If left to 0 and flags does not
2944
2944
* specify whether id is an entity or a variable
2945
2945
* the id will be initialized to EcsThis.
@@ -2957,7 +2957,7 @@ typedef struct ecs_term_id_t {
2957
2957
* the Traversable property. Default is IsA. */
2958
2958
2959
2959
ecs_flags32_t flags; /**< Term flags */
2960
- } ecs_term_id_t ;
2960
+ } ecs_term_ref_t ;
2961
2961
2962
2962
/** Type that describes a term (single element in a query) */
2963
2963
struct ecs_term_t {
@@ -2966,9 +2966,9 @@ struct ecs_term_t {
2966
2966
* first/second members, which provide more
2967
2967
* flexibility. */
2968
2968
2969
- ecs_term_id_t src; /**< Source of term */
2970
- ecs_term_id_t first; /**< Component or first element of pair */
2971
- ecs_term_id_t second; /**< Second element of pair */
2969
+ ecs_term_ref_t src; /**< Source of term */
2970
+ ecs_term_ref_t first; /**< Component or first element of pair */
2971
+ ecs_term_ref_t second; /**< Second element of pair */
2972
2972
2973
2973
ecs_inout_kind_t inout; /**< Access to contents matched by term */
2974
2974
ecs_oper_kind_t oper; /**< Operator of term */
@@ -6771,7 +6771,7 @@ bool ecs_children_next(
6771
6771
*/
6772
6772
FLECS_API
6773
6773
bool ecs_term_id_is_set(
6774
- const ecs_term_id_t *id);
6774
+ const ecs_term_ref_t *id);
6775
6775
6776
6776
/** Test whether a term is set.
6777
6777
* This operation can be used to test whether a term has been initialized with
@@ -8777,7 +8777,7 @@ int ecs_value_move_ctor(
8777
8777
*
8778
8778
* Example:
8779
8779
* ecs_query(world, {
8780
- * .filter. terms = {{ ecs_id(Position) }}
8780
+ * .terms = {{ ecs_id(Position) }}
8781
8781
* });
8782
8782
*/
8783
8783
#define ecs_query(world, ...)\
@@ -8787,7 +8787,7 @@ int ecs_value_move_ctor(
8787
8787
*
8788
8788
* Example:
8789
8789
* ecs_observer(world, {
8790
- * .filter. terms = {{ ecs_id(Position) }},
8790
+ * .terms = {{ ecs_id(Position) }},
8791
8791
* .events = { EcsOnAdd },
8792
8792
* .callback = AddPosition
8793
8793
* });
@@ -11211,7 +11211,7 @@ ecs_entity_t ecs_system_init(
11211
11211
* .name = "MyEntity",
11212
11212
* .add = { ecs_dependson(EcsOnUpdate) }
11213
11213
* }),
11214
- * .query.filter. terms = {
11214
+ * .query.terms = {
11215
11215
* { ecs_id(Position) },
11216
11216
* { ecs_id(Velocity) }
11217
11217
* },
@@ -15100,7 +15100,7 @@ bool ecs_rule_next_instanced(
15100
15100
* @return The string
15101
15101
*/
15102
15102
FLECS_API
15103
- char* ecs_rule_str (
15103
+ char* ecs_query_plan (
15104
15104
const ecs_rule_t *rule);
15105
15105
15106
15106
/** Convert rule to string with profile.
@@ -15112,7 +15112,7 @@ char* ecs_rule_str(
15112
15112
* @return The string
15113
15113
*/
15114
15114
FLECS_API
15115
- char* ecs_rule_str_w_profile (
15115
+ char* ecs_query_plan_w_profile (
15116
15116
const ecs_rule_t *rule,
15117
15117
const ecs_iter_t *it);
15118
15118
@@ -15383,7 +15383,7 @@ char* ecs_parse_term(
15383
15383
const char *expr,
15384
15384
const char *ptr,
15385
15385
ecs_term_t *term_out,
15386
- ecs_term_id_t *extra_args);
15386
+ ecs_term_ref_t *extra_args);
15387
15387
15388
15388
#ifdef __cplusplus
15389
15389
}
@@ -27246,7 +27246,7 @@ struct term_id_builder_i {
27246
27246
return *this;
27247
27247
}
27248
27248
27249
- ecs_term_id_t *m_term_id;
27249
+ ecs_term_ref_t *m_term_id;
27250
27250
27251
27251
protected:
27252
27252
virtual flecs::world_t* world_v() = 0;
@@ -29022,8 +29022,8 @@ namespace _ {
29022
29022
{
29023
29023
ecs_observer_desc_t desc = {};
29024
29024
desc.events[0] = event;
29025
- desc.filter. terms[0].id = EcsAny;
29026
- desc.filter. terms[0].src.id = entity;
29025
+ desc.terms[0].id = EcsAny;
29026
+ desc.terms[0].src.id = entity;
29027
29027
desc.callback = callback;
29028
29028
desc.binding_ctx = binding_ctx;
29029
29029
desc.binding_ctx_free = binding_ctx_free;
@@ -29478,8 +29478,8 @@ struct system final : entity
29478
29478
m_world = world;
29479
29479
m_id = ecs_system_init(world, desc);
29480
29480
29481
- if (desc->query.filter. terms_buffer) {
29482
- ecs_os_free(desc->query.filter. terms_buffer);
29481
+ if (desc->query.terms_buffer) {
29482
+ ecs_os_free(desc->query.terms_buffer);
29483
29483
}
29484
29484
}
29485
29485
@@ -29669,8 +29669,8 @@ struct pipeline : entity {
29669
29669
ecs_abort(ECS_INVALID_PARAMETER, NULL);
29670
29670
}
29671
29671
29672
- if (desc->query.filter. terms_buffer) {
29673
- ecs_os_free(desc->query.filter. terms_buffer);
29672
+ if (desc->query.terms_buffer) {
29673
+ ecs_os_free(desc->query.terms_buffer);
29674
29674
}
29675
29675
}
29676
29676
};
@@ -30131,10 +30131,10 @@ struct rule_base {
30131
30131
30132
30132
/** Converts this rule to a string that can be used to aid debugging
30133
30133
* the behavior of the rule.
30134
- * @see ecs_rule_str
30134
+ * @see ecs_query_plan
30135
30135
*/
30136
30136
flecs::string rule_str() const {
30137
- char *result = ecs_rule_str (m_rule);
30137
+ char *result = ecs_query_plan (m_rule);
30138
30138
return flecs::string(result);
30139
30139
}
30140
30140
0 commit comments