Flecs: flecs::alert_builder_i< Base, Components > Struct Template Reference
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.0 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
flecs::alert_builder_i< Base, Components > Struct Template Referenceabstract
C++ API » Addons » Alerts

Alert builder interface. More...

`#include <builder_i.hpp>`

Inheritance diagram for flecs::alert_builder_i< Base, Components >:
[legend]

## Public Member Functions
| alert_builder_i (ecs_alert_desc_t *desc, int32_t term_index=0)
Base & | message (const char *message)
| Alert message.
Base & | brief (const char *brief)
| Set brief description for alert.
Base & | doc_name (const char *doc_name)
| Set doc name for alert.
Base & | severity (flecs::entity_t kind)
| Set severity of alert (default is Error)
Base & | retain_period (ecs_ftime_t period)
template<typename Severity>
Base & | severity ()
| Set severity of alert (default is Error)
Base & | severity_filter (flecs::entity_t kind, flecs::id_t with, const char *var=nullptr)
| Add severity filter.
template<typename Severity>
Base & | severity_filter (flecs::id_t with, const char *var=nullptr)
| Add severity filter.
template<typename Severity, typename T, if_not_t< is_enum< T >::value > = 0>
Base & | severity_filter (const char *var=nullptr)
| Add severity filter.
template<typename Severity, typename T, if_t< is_enum< T >::value > = 0>
Base & | severity_filter (T with, const char *var=nullptr)
| Add severity filter.
Base & | member (flecs::entity_t m)
| Set member to create an alert for out of range values.
Base & | id (flecs::id_t id)
| Set (component) id for member (optional).
template<typename T>
Base & | member (const char *m, const char *v=nullptr)
| Set member to create an alert for out of range values.
Base & | var (const char *v)
| Set source variable for member (optional, defaults to $this)
Public Member Functions inherited from flecs::query_builder_i< Base, Components ... >
| query_builder_i (ecs_query_desc_t *desc, int32_t term_index=0)
Base & | query_flags (ecs_flags32_t flags)
Base & | cache_kind (query_cache_kind_t kind)
Base & | cached ()
Base & | expr (const char *expr)
Base & | with ()
Base & | with (id_t id)
Base & | with (const char *name)
Base & | with (const char *first, const char *second)
Base & | with (entity_t r, entity_t o)
Base & | with (entity_t r, const char *o)
Base & | with (const char *r, entity_t o)
Base & | with (id_t o)
Base & | with (const char *second)
Base & | with ()
Base & | with (E value)
Base & | with (flecs::term &term)
Base & | with (flecs::term &&term)
Base & | without (Args &&... args)
Base & | without (Args &&... args)
Base & | without ()
Base & | write ()
Base & | write (Args &&... args)
Base & | write (Args &&... args)
Base & | write ()
Base & | read ()
Base & | read (Args &&... args)
Base & | read (Args &&... args)
Base & | read ()
Base & | scope_open ()
Base & | scope_close ()
Base & | term ()
| Sets the current term to next one in term list.
Base & | term_at ()
| Sets the current term to the one with the provided type.
Base & | term_at (int32_t term_index)
| Sets the current term to the one at the provided index.
Base & | term_at (int32_t term_index)
| Sets the current term to the one at the provided index and asserts that the type matches.
Base & | order_by (int(*compare)(flecs::entity_t, const T *, flecs::entity_t, const T *))
| Sort the output of a query.
Base & | order_by (flecs::entity_t component, int(*compare)(flecs::entity_t, const void *, flecs::entity_t, const void *))
| Sort the output of a query.
Base & | group_by (uint64_t(*group_by_action)(flecs::world_t *, flecs::table_t *table, flecs::id_t id, void *ctx))
| Group and sort matched tables.
Base & | group_by (flecs::entity_t component, uint64_t(*group_by_action)(flecs::world_t *, flecs::table_t *table, flecs::id_t id, void *ctx))
| Group and sort matched tables.
Base & | group_by ()
| Group and sort matched tables.
Base & | group_by (flecs::entity_t component)
| Group and sort matched tables.
Base & | group_by_ctx (void *ctx, ecs_ctx_free_t ctx_free=nullptr)
| Specify context to be passed to group_by function.
Base & | on_group_create (ecs_group_create_action_t action)
| Specify on_group_create action.
Base & | on_group_delete (ecs_group_delete_action_t action)
| Specify on_group_delete action.
| query_builder_i (ecs_query_desc_t *desc, int32_t term_index=0)
Base & | query_flags (ecs_flags32_t flags)
Base & | cache_kind (query_cache_kind_t kind)
Base & | cached ()
Base & | expr (const char *expr)
Base & | with ()
Base & | with (id_t id)
Base & | with (const char *name)
Base & | with (const char *first, const char *second)
Base & | with (entity_t r, entity_t o)
Base & | with (entity_t r, const char *o)
Base & | with (const char *r, entity_t o)
Base & | with (id_t o)
Base & | with (const char *second)
Base & | with ()
Base & | with (E value)
Base & | with (flecs::term &term)
Base & | with (flecs::term &&term)
Base & | without (Args &&... args)
Base & | without (Args &&... args)
Base & | without ()
Base & | write ()
Base & | write (Args &&... args)
Base & | write (Args &&... args)
Base & | write ()
Base & | read ()
Base & | read (Args &&... args)
Base & | read (Args &&... args)
Base & | read ()
Base & | scope_open ()
Base & | scope_close ()
Base & | term ()
| Sets the current term to next one in term list.
Base & | term_at ()
| Sets the current term to the one with the provided type.
Base & | term_at (int32_t term_index)
| Sets the current term to the one at the provided index.
Base & | term_at (int32_t term_index)
| Sets the current term to the one at the provided index and asserts that the type matches.
Base & | order_by (int(*compare)(flecs::entity_t, const T *, flecs::entity_t, const T *))
| Sort the output of a query.
Base & | order_by (flecs::entity_t component, int(*compare)(flecs::entity_t, const void *, flecs::entity_t, const void *))
| Sort the output of a query.
Base & | group_by (uint64_t(*group_by_action)(flecs::world_t *, flecs::table_t *table, flecs::id_t id, void *ctx))
| Group and sort matched tables.
Base & | group_by (flecs::entity_t component, uint64_t(*group_by_action)(flecs::world_t *, flecs::table_t *table, flecs::id_t id, void *ctx))
| Group and sort matched tables.
Base & | group_by ()
| Group and sort matched tables.
Base & | group_by (flecs::entity_t component)
| Group and sort matched tables.
Base & | group_by_ctx (void *ctx, ecs_ctx_free_t ctx_free=nullptr)
| Specify context to be passed to group_by function.
Base & | on_group_create (ecs_group_create_action_t action)
| Specify on_group_create action.
Base & | on_group_delete (ecs_group_delete_action_t action)
| Specify on_group_delete action.
Public Member Functions inherited from flecs::term_builder_i< Base >
| term_builder_i (ecs_term_t *term_ptr)
Base & | term (id_t id)
Base & | src ()
Base & | first ()
Base & | second ()
Base & | src (flecs::entity_t id)
template<typename T>
Base & | src ()
Base & | src (const char *name)
Base & | first (flecs::entity_t id)
template<typename T>
Base & | first ()
Base & | first (const char *name)
Base & | second (flecs::entity_t id)
template<typename T>
Base & | second ()
Base & | second (const char *name)
Base & | up (flecs::entity_t trav=0)
template<typename Trav>
Base & | up ()
Base & | cascade (flecs::entity_t trav=0)
template<typename Trav>
Base & | cascade ()
Base & | desc ()
Base & | parent ()
Base & | trav (flecs::entity_t trav, flecs::flags32_t flags=0)
Base & | id_flags (id_t flags)
| Set id flags for term.
Base & | inout (flecs::inout_kind_t inout)
| Set read/write access of term.
Base & | inout_stage (flecs::inout_kind_t inout)
| Set read/write access for stage.
Base & | write ()
| Short for inout_stage(flecs::Out).
Base & | read ()
| Short for inout_stage(flecs::In).
Base & | read_write ()
| Short for inout_stage(flecs::InOut).
Base & | in ()
| Short for inout(flecs::In)
Base & | out ()
| Short for inout(flecs::Out)
Base & | inout ()
| Short for inout(flecs::InOut)
Base & | inout_none ()
| Short for inout(flecs::In)
Base & | oper (flecs::oper_kind_t oper)
| Set operator of term.
Base & | and_ ()
Base & | or_ ()
Base & | not_ ()
Base & | optional ()
Base & | and_from ()
Base & | or_from ()
Base & | not_from ()
Base & | singleton ()
| Match singleton.
Base & | filter ()
Public Member Functions inherited from flecs::term_ref_builder_i< Base >
Base & | self ()
Base & | id (flecs::entity_t id)
Base & | entity (flecs::entity_t entity)
Base & | name (const char *name)
Base & | var (const char *var_name)
Base & | flags (flecs::flags32_t flags)

## Protected Member Functions
virtual flecs::world_t * | world_v ()=0
Protected Member Functions inherited from flecs::term_builder_i< Base >
void | set_term (ecs_term_t *term)
Protected Member Functions inherited from flecs::term_ref_builder_i< Base >
void | assert_term_ref ()

## Additional Inherited Members
Public Attributes inherited from flecs::term_builder_i< Base >
ecs_term_t * | term_
Public Attributes inherited from flecs::term_ref_builder_i< Base >
ecs_term_ref_t * | term_ref_
Protected Attributes inherited from flecs::query_builder_i< Base, Components ... >
int32_t | term_index_
int32_t | expr_count_
int32_t | term_index_
int32_t | expr_count_

## Detailed Description

template<typename Base, typename ... Components>
struct flecs::alert_builder_i< Base, Components >

Alert builder interface.

Definition at line 17 of file builder_i.hpp.

## Constructor & Destructor Documentation

## ◆ alert_builder_i() [1/2]

template<typename Base, typename ... Components>

flecs::alert_builder_i< Base, Components >::alert_builder_i | ( |  | ) |
| inline

Definition at line 22 of file builder_i.hpp.

## ◆ alert_builder_i() [2/2]

template<typename Base, typename ... Components>

flecs::alert_builder_i< Base, Components >::alert_builder_i | ( | ecs_alert_desc_t * | desc,
|  | int32_t | term_index = 0 )
| inline

Definition at line 26 of file builder_i.hpp.

## Member Function Documentation

## ◆ brief()

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::brief | ( | const char * | brief | ) |
| inline

Set brief description for alert.

See also
  ecs_alert_desc_t::brief

Definition at line 43 of file builder_i.hpp.

## ◆ doc_name()

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::doc_name | ( | const char * | doc_name | ) |
| inline

Set doc name for alert.

See also
  ecs_alert_desc_t::doc_name

Definition at line 52 of file builder_i.hpp.

## ◆ id()

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::id | ( | flecs::id_t | id | ) |
| inline

Set (component) id for member (optional).

If .member() is set and id is not set, the id will default to the member parent.

Definition at line 128 of file builder_i.hpp.

## ◆ member() [1/2]

template<typename Base, typename ... Components>
template<typename T>

Base & flecs::alert_builder_i< Base, Components >::member | ( | const char * | m,
|  | const char * | v = nullptr )
| inline

Set member to create an alert for out of range values.

Definition at line 135 of file builder_i.hpp.

## ◆ member() [2/2]

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::member | ( | flecs::entity_t | m | ) |
| inline

Set member to create an alert for out of range values.

Definition at line 121 of file builder_i.hpp.

## ◆ message()

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::message | ( | const char * | message | ) |
| inline

Alert message.

See also
  ecs_alert_desc_t::message

Definition at line 34 of file builder_i.hpp.

## ◆ retain_period()

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::retain_period | ( | ecs_ftime_t | period | ) |
| inline

Definition at line 70 of file builder_i.hpp.

## ◆ severity() [1/2]

template<typename Base, typename ... Components>
template<typename Severity>

Base & flecs::alert_builder_i< Base, Components >::severity | ( |  | ) |
| inline

Set severity of alert (default is Error)

See also
  ecs_alert_desc_t::severity

Definition at line 80 of file builder_i.hpp.

## ◆ severity() [2/2]

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::severity | ( | flecs::entity_t | kind | ) |
| inline

Set severity of alert (default is Error)

See also
  ecs_alert_desc_t::severity

Definition at line 61 of file builder_i.hpp.

## ◆ severity_filter() [1/4]

template<typename Base, typename ... Components>
template<typename Severity, typename T, if_not_t< is_enum< T >::value > = 0>

Base & flecs::alert_builder_i< Base, Components >::severity_filter | ( | const char * | var = nullptr | ) |
| inline

Add severity filter.

Definition at line 106 of file builder_i.hpp.

## ◆ severity_filter() [2/4]

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::severity_filter | ( | flecs::entity_t | kind,
|  | flecs::id_t | with,
|  | const char * | var = nullptr )
| inline

Add severity filter.

Definition at line 85 of file builder_i.hpp.

## ◆ severity_filter() [3/4]

template<typename Base, typename ... Components>
template<typename Severity>

Base & flecs::alert_builder_i< Base, Components >::severity_filter | ( | flecs::id_t | with,
|  | const char * | var = nullptr )
| inline

Add severity filter.

Definition at line 100 of file builder_i.hpp.

## ◆ severity_filter() [4/4]

template<typename Base, typename ... Components>
template<typename Severity, typename T, if_t< is_enum< T >::value > = 0>

Base & flecs::alert_builder_i< Base, Components >::severity_filter | ( | T | with,
|  | const char * | var = nullptr )
| inline

Add severity filter.

Definition at line 113 of file builder_i.hpp.

## ◆ var()

template<typename Base, typename ... Components>

Base & flecs::alert_builder_i< Base, Components >::var | ( | const char * | v | ) |
| inline

Set source variable for member (optional, defaults to $this)

Definition at line 145 of file builder_i.hpp.

## ◆ world_v()

template<typename Base, typename ... Components>

virtual flecs::world_t * flecs::alert_builder_i< Base, Components >::world_v | ( |  | ) |
| protectedpure virtual

Implements flecs::query_builder_i< Base, Components ... >.

The documentation for this struct was generated from the following file:

- include/flecs/addons/cpp/mixins/alerts/builder_i.hpp