Function enum_type

Synopsis

#include <include/flecs/addons/cpp/utils/enum.hpp>

template <typename E>
static enum_data< E > enum_type(flecs::world_t *world)

Description

Convenience function for getting enum reflection data

Source

Lines 241-246 in include/flecs/addons/cpp/utils/enum.hpp. Line 24 in include/flecs/addons/cpp/utils/enum.hpp.

template <typename E>
enum_data<E> enum_type(flecs::world_t *world) {
    _::cpp_type<E>::id(world); // Ensure enum is registered
    auto& ref = _::enum_type<E>::get();
    return enum_data<E>(world, ref.data);
}