Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
API defines

Defines for customizing compile time features. More...

Collaboration diagram for API defines:

Macros

#define FLECS_VERSION_MAJOR   3
 
#define FLECS_VERSION_MINOR   2
 
#define FLECS_VERSION_PATCH   12
 
#define FLECS_VERSION
 
#define ecs_float_t   float
 Customizable precision for floating point operations.
 
#define ecs_ftime_t   ecs_float_t
 Customizable precision for scalar time values.
 
#define FLECS_NO_DEPRECATED_WARNINGS
 disables deprecated warnings
 
#define FLECS_DEBUG
 Used for input parameter checking and cheap sanity checks.
 
#define FLECS_CPP
 C++ API.
 
#define FLECS_MODULE
 Module support.
 
#define FLECS_PARSER
 String parser for queries.
 
#define FLECS_PLECS
 ECS data definition format.
 
#define FLECS_RULES
 Constraint solver for advanced queries.
 
#define FLECS_SNAPSHOT
 Snapshot & restore ECS data.
 
#define FLECS_STATS
 Access runtime statistics.
 
#define FLECS_MONITOR
 Track runtime statistics periodically.
 
#define FLECS_METRICS
 Expose component data as statistics.
 
#define FLECS_ALERTS
 Monitor conditions for errors.
 
#define FLECS_SYSTEM
 System support.
 
#define FLECS_PIPELINE
 Pipeline support.
 
#define FLECS_TIMER
 Timer support.
 
#define FLECS_META
 Reflection support.
 
#define FLECS_META_C
 Utilities for populating reflection data.
 
#define FLECS_UNITS
 Builtin standard units.
 
#define FLECS_EXPR
 Parsing strings to/from component values.
 
#define FLECS_JSON
 Parsing JSON to/from component values.
 
#define FLECS_DOC
 Document entities & components.
 
#define FLECS_LOG
 When enabled ECS provides more detailed logs.
 
#define FLECS_APP
 Application addon.
 
#define FLECS_OS_API_IMPL
 Default implementation for OS API.
 
#define FLECS_HTTP
 Tiny HTTP server for connecting to remote UI.
 
#define FLECS_REST
 REST API for querying application data.
 
#define FLECS_HI_COMPONENT_ID   (256)
 This constant can be used to balance between performance and memory utilization.
 
#define FLECS_HI_ID_RECORD_ID   (1024)
 This constant can be used to balance between performance and memory utilization.
 
#define FLECS_SPARSE_PAGE_BITS   (12)
 This constant is used to determine the number of bits of an id that is used to determine the page index when used with a sparse set.
 
#define FLECS_ENTITY_PAGE_BITS   (12)
 Same as FLECS_SPARSE_PAGE_BITS, but for the entity index.
 
#define FLECS_ID_DESC_MAX   (32)
 Maximum number of ids to add ecs_entity_desc_t / ecs_bulk_desc_t.
 
#define FLECS_TERM_DESC_MAX   (16)
 Maximum number of terms in ecs_filter_desc_t.
 
#define FLECS_EVENT_DESC_MAX   (8)
 Maximum number of events in ecs_observer_desc_t.
 
#define FLECS_VARIABLE_COUNT_MAX   (64)
 Maximum number of query variables per query.
 
#define FLECS_QUERY_SCOPE_NESTING_MAX   (8)
 Maximum nesting depth of query scopes.
 

Detailed Description

Defines for customizing compile time features.

Macro Definition Documentation

◆ ecs_float_t

#define ecs_float_t   float

Customizable precision for floating point operations.

Definition at line 50 of file flecs.h.

◆ ecs_ftime_t

#define ecs_ftime_t   ecs_float_t

Customizable precision for scalar time values.

Change to double precision for processes that can run for a long time (e.g. longer than a day).

Definition at line 57 of file flecs.h.

◆ FLECS_ALERTS

#define FLECS_ALERTS

Monitor conditions for errors.

Definition at line 183 of file flecs.h.

◆ FLECS_APP

#define FLECS_APP

Application addon.

Definition at line 194 of file flecs.h.

◆ FLECS_CPP

#define FLECS_CPP

C++ API.

Definition at line 174 of file flecs.h.

◆ FLECS_DEBUG

#define FLECS_DEBUG

Used for input parameter checking and cheap sanity checks.

There are lots of asserts in every part of the code, so this will slow down applications.

Definition at line 93 of file flecs.h.

◆ FLECS_DOC

#define FLECS_DOC

Document entities & components.

Definition at line 192 of file flecs.h.

◆ FLECS_ENTITY_PAGE_BITS

#define FLECS_ENTITY_PAGE_BITS   (12)

Same as FLECS_SPARSE_PAGE_BITS, but for the entity index.

Definition at line 249 of file flecs.h.

◆ FLECS_EVENT_DESC_MAX

#define FLECS_EVENT_DESC_MAX   (8)

Maximum number of events in ecs_observer_desc_t.

Definition at line 270 of file flecs.h.

◆ FLECS_EXPR

#define FLECS_EXPR

Parsing strings to/from component values.

Definition at line 190 of file flecs.h.

◆ FLECS_HI_COMPONENT_ID

#define FLECS_HI_COMPONENT_ID   (256)

This constant can be used to balance between performance and memory utilization.

The constant is used in two ways:

  • Entity ids 0..FLECS_HI_COMPONENT_ID are reserved for component ids.
  • Used as lookup array size in table edges.

Increasing this value increases the size of the lookup array, which allows fast table traversal, which improves performance of ECS add/remove operations. Component ids that fall outside of this range use a regular map lookup, which is slower but more memory efficient.

Definition at line 224 of file flecs.h.

◆ FLECS_HI_ID_RECORD_ID

#define FLECS_HI_ID_RECORD_ID   (1024)

This constant can be used to balance between performance and memory utilization.

The constant is used to determine the size of the id record lookup array. Id values that fall outside of this range use a regular map lookup, which is slower but more memory efficient.

Definition at line 234 of file flecs.h.

◆ FLECS_HTTP

#define FLECS_HTTP

Tiny HTTP server for connecting to remote UI.

Definition at line 196 of file flecs.h.

◆ FLECS_ID_DESC_MAX

#define FLECS_ID_DESC_MAX   (32)

Maximum number of ids to add ecs_entity_desc_t / ecs_bulk_desc_t.

Definition at line 261 of file flecs.h.

◆ FLECS_JSON

#define FLECS_JSON

Parsing JSON to/from component values.

Definition at line 191 of file flecs.h.

◆ FLECS_LOG

#define FLECS_LOG

When enabled ECS provides more detailed logs.

Definition at line 193 of file flecs.h.

◆ FLECS_META

#define FLECS_META

Reflection support.

Definition at line 187 of file flecs.h.

◆ FLECS_META_C

#define FLECS_META_C

Utilities for populating reflection data.

Definition at line 188 of file flecs.h.

◆ FLECS_METRICS

#define FLECS_METRICS

Expose component data as statistics.

Definition at line 182 of file flecs.h.

◆ FLECS_MODULE

#define FLECS_MODULE

Module support.

Definition at line 175 of file flecs.h.

◆ FLECS_MONITOR

#define FLECS_MONITOR

Track runtime statistics periodically.

Definition at line 181 of file flecs.h.

◆ FLECS_NO_DEPRECATED_WARNINGS

#define FLECS_NO_DEPRECATED_WARNINGS

disables deprecated warnings

Definition at line 68 of file flecs.h.

◆ FLECS_OS_API_IMPL

#define FLECS_OS_API_IMPL

Default implementation for OS API.

Definition at line 195 of file flecs.h.

◆ FLECS_PARSER

#define FLECS_PARSER

String parser for queries.

Definition at line 176 of file flecs.h.

◆ FLECS_PIPELINE

#define FLECS_PIPELINE

Pipeline support.

Definition at line 185 of file flecs.h.

◆ FLECS_PLECS

#define FLECS_PLECS

ECS data definition format.

Definition at line 177 of file flecs.h.

◆ FLECS_QUERY_SCOPE_NESTING_MAX

#define FLECS_QUERY_SCOPE_NESTING_MAX   (8)

Maximum nesting depth of query scopes.

Definition at line 278 of file flecs.h.

◆ FLECS_REST

#define FLECS_REST

REST API for querying application data.

Definition at line 197 of file flecs.h.

◆ FLECS_RULES

#define FLECS_RULES

Constraint solver for advanced queries.

Definition at line 178 of file flecs.h.

◆ FLECS_SNAPSHOT

#define FLECS_SNAPSHOT

Snapshot & restore ECS data.

Definition at line 179 of file flecs.h.

◆ FLECS_SPARSE_PAGE_BITS

#define FLECS_SPARSE_PAGE_BITS   (12)

This constant is used to determine the number of bits of an id that is used to determine the page index when used with a sparse set.

The number of bits determines the page size, which is (1 << bits). Lower values decrease memory utilization, at the cost of more allocations.

Definition at line 243 of file flecs.h.

◆ FLECS_STATS

#define FLECS_STATS

Access runtime statistics.

Definition at line 180 of file flecs.h.

◆ FLECS_SYSTEM

#define FLECS_SYSTEM

System support.

Definition at line 184 of file flecs.h.

◆ FLECS_TERM_DESC_MAX

#define FLECS_TERM_DESC_MAX   (16)

Maximum number of terms in ecs_filter_desc_t.

Definition at line 266 of file flecs.h.

◆ FLECS_TIMER

#define FLECS_TIMER

Timer support.

Definition at line 186 of file flecs.h.

◆ FLECS_UNITS

#define FLECS_UNITS

Builtin standard units.

Definition at line 189 of file flecs.h.

◆ FLECS_VARIABLE_COUNT_MAX

#define FLECS_VARIABLE_COUNT_MAX   (64)

Maximum number of query variables per query.

Definition at line 274 of file flecs.h.

◆ FLECS_VERSION

#define FLECS_VERSION
Value:
FLECS_VERSION_IMPL(\
FLECS_VERSION_MAJOR, FLECS_VERSION_MINOR, FLECS_VERSION_PATCH)

Definition at line 37 of file flecs.h.

◆ FLECS_VERSION_MAJOR

#define FLECS_VERSION_MAJOR   3

Definition at line 34 of file flecs.h.

◆ FLECS_VERSION_MINOR

#define FLECS_VERSION_MINOR   2

Definition at line 35 of file flecs.h.

◆ FLECS_VERSION_PATCH

#define FLECS_VERSION_PATCH   12

Definition at line 36 of file flecs.h.