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

Constructor & Destructor Documentation

◆ enum_type()

template<typename E >
flecs::_::enum_type< E >::enum_type ( )
inline

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

◆ get()

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

Definition at line 378 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 391 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 427 of file enum.hpp.

◆ constants_size

template<typename E >
constexpr 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) >()

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

Definition at line 414 of file enum.hpp.

◆ max

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

Definition at line 413 of file enum.hpp.

◆ min

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

Definition at line 412 of file enum.hpp.


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