Flecs v4.0
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
bool has_contiguous
contiguous_until
enum_constant< U > constants [constants_size? constants_size:1] = {}

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 382 of file enum.hpp.

◆ get()

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

Definition at line 377 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 390 of file enum.hpp.

Member Data Documentation

◆ constants

template<typename E>
enum_constant<U> flecs::_::enum_type< E >::constants[constants_size? constants_size:1] = {}

Definition at line 426 of file enum.hpp.

◆ constants_size

template<typename E>
unsigned int flecs::_::enum_type< E >::constants_size
staticconstexpr
Initial value:
=
template each_enum< static_cast<U>(enum_last<E>::value) >()
Provides utilities for enum reflection.
Definition enum.hpp:192

Definition at line 420 of file enum.hpp.

◆ contiguous_until

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

Definition at line 417 of file enum.hpp.

◆ has_contiguous

template<typename E>
bool flecs::_::enum_type< E >::has_contiguous

Definition at line 413 of file enum.hpp.

◆ max

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

Definition at line 412 of file enum.hpp.

◆ min

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

Definition at line 411 of file enum.hpp.


The documentation for this struct was generated from the following file:
  • include/flecs/addons/cpp/utils/enum.hpp