Flecs: flecs::_::enum_type< E > Struct Template Reference
Description: A fast entity component system (ECS) for C & C++

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

Loading...
Searching...
No Matches
flecs::_::enum_type< E > Struct Template Reference

Class that scans an enum for constants, extracts names & creates entities. More...

`#include <enum.hpp>`

## Public Member Functions
flecs::entity_t | entity (E value) const
void | register_for_world (flecs::world_t *world, flecs::entity_t id)

## Static Public Member Functions
static enum_type< E > & | get ()

## Public Attributes
int | min
int | max
U | contiguous_until
enum_constant< U > | constants [128] = {}
bool | has_contiguous = true

## Static Public Attributes
static constexpr unsigned int | constants_size

## Detailed Description

template<typename E>
struct flecs::_::enum_type< E >

Class that scans an enum for constants, extracts names & creates entities.

Definition at line 288 of file enum.hpp.

## Constructor & Destructor Documentation

## ◆ enum_type()

template<typename E>

flecs::_::enum_type< E >::enum_type | ( |  | ) |
| inline

Definition at line 366 of file enum.hpp.

## Member Function Documentation

## ◆ entity()

template<typename E>

flecs::entity_t flecs::_::enum_type< E >::entity | ( | E | value | ) | const
| inline

Definition at line 384 of file enum.hpp.

## ◆ get()

template<typename E>

enum_type< E > & flecs::_::enum_type< E >::get | ( |  | ) |
| inlinestatic

Definition at line 379 of file enum.hpp.

## ◆ register_for_world()

template<typename E>

void flecs::_::enum_type< E >::register_for_world | ( | flecs::world_t * | world,
|  | flecs::entity_t | id )
| inline

Definition at line 392 of file enum.hpp.

## Member Data Documentation

## ◆ constants

template<typename E>

enum_constant<U> flecs::_::enum_type< E >::constants[128] = {}

Definition at line 433 of file enum.hpp.

## ◆ constants_size

template<typename E>

unsigned int flecs::_::enum_type< E >::constants_size
| staticconstexpr

Initial value:
=
enum_reflection<E, reflection_count>::
template each_enum< static_cast<U>(enum_last<E>::value) >()
flecs::_::enum_reflection
Provides utilities for enum reflection.
Definition enum.hpp:192

Definition at line 421 of file enum.hpp.

## ◆ contiguous_until

template<typename E>

U flecs::_::enum_type< E >::contiguous_until

Definition at line 418 of file enum.hpp.

## ◆ has_contiguous

template<typename E>

bool flecs::_::enum_type< E >::has_contiguous = true

Definition at line 434 of file enum.hpp.

## ◆ max

template<typename E>

int flecs::_::enum_type< E >::max

Definition at line 414 of file enum.hpp.

## ◆ min

template<typename E>

int flecs::_::enum_type< E >::min

Definition at line 413 of file enum.hpp.

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

- include/flecs/addons/cpp/utils/enum.hpp