Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::enum_data< E > Struct Template Reference

Convenience type with enum reflection data. More...

#include <enum.hpp>

Public Member Functions

 enum_data (flecs::world_t *world, _::enum_data_impl< E > &impl)
 
bool is_valid (underlying_type_t< E > value)
 Checks if a given integral value is a valid enum value.
 
bool is_valid (E value)
 Checks if a given enum value is valid.
 
int index_by_value (underlying_type_t< E > value) const
 Finds the index into the constants array for a value, if one exists.
 
int index_by_value (E value) const
 Finds the index into the constants array for an enum value, if one exists.
 
int first () const
 
int last () const
 
int next (int cur) const
 
flecs::entity entity () const
 
flecs::entity entity (underlying_type_t< E > value) const
 
flecs::entity entity (E value) const
 

Public Attributes

flecs::world_t * world_
 
_::enum_data_impl< E > & impl_
 

Detailed Description

template<typename E>
struct flecs::enum_data< E >

Convenience type with enum reflection data.

Enumeration type data wrapper with world pointer.

Definition at line 399 of file enum.hpp.

Constructor & Destructor Documentation

◆ enum_data()

template<typename E >
flecs::enum_data< E >::enum_data ( flecs::world_t * world,
_::enum_data_impl< E > & impl )
inline

Definition at line 400 of file enum.hpp.

Member Function Documentation

◆ entity() [1/3]

template<typename E >
flecs::entity flecs::enum_data< E >::entity ( ) const
inline

Definition at line 279 of file world.hpp.

◆ entity() [2/3]

template<typename E >
flecs::entity flecs::enum_data< E >::entity ( E value) const
inline

Definition at line 307 of file world.hpp.

◆ entity() [3/3]

template<typename E >
flecs::entity flecs::enum_data< E >::entity ( underlying_type_t< E > value) const
inline

Definition at line 284 of file world.hpp.

◆ first()

template<typename E >
int flecs::enum_data< E >::first ( ) const
inline

Definition at line 464 of file enum.hpp.

◆ index_by_value() [1/2]

template<typename E >
int flecs::enum_data< E >::index_by_value ( E value) const
inline

Finds the index into the constants array for an enum value, if one exists.

Parameters
valueThe enum value.
Returns
int The index of the enum value.

Definition at line 460 of file enum.hpp.

◆ index_by_value() [2/2]

template<typename E >
int flecs::enum_data< E >::index_by_value ( underlying_type_t< E > value) const
inline

Finds the index into the constants array for a value, if one exists.

Parameters
valueThe enum value.
Returns
int The index of the enum value.

Definition at line 436 of file enum.hpp.

◆ is_valid() [1/2]

template<typename E >
bool flecs::enum_data< E >::is_valid ( E value)
inline

Checks if a given enum value is valid.

Parameters
valueThe enum value.
Returns
true If the value is valid.
false If the value is not valid.

Definition at line 426 of file enum.hpp.

◆ is_valid() [2/2]

template<typename E >
bool flecs::enum_data< E >::is_valid ( underlying_type_t< E > value)
inline

Checks if a given integral value is a valid enum value.

Parameters
valueThe integral value.
Returns
true If the value is a valid enum value.
false If the value is not a valid enum value.

Definition at line 411 of file enum.hpp.

◆ last()

template<typename E >
int flecs::enum_data< E >::last ( ) const
inline

Definition at line 468 of file enum.hpp.

◆ next()

template<typename E >
int flecs::enum_data< E >::next ( int cur) const
inline

Definition at line 472 of file enum.hpp.

Member Data Documentation

◆ impl_

template<typename E >
_::enum_data_impl<E>& flecs::enum_data< E >::impl_

Definition at line 481 of file enum.hpp.

◆ world_

template<typename E >
flecs::world_t* flecs::enum_data< E >::world_

Definition at line 480 of file enum.hpp.


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