Function resolve
Summary
#include <src/entt/meta/resolve.hpp>
(1) template <typename Type>
meta_type resolve()
(2) meta_type resolve(const id_type id)
(3) meta_type resolve(const type_info &info)
Function overload
Synopsis
#include <src/entt/meta/resolve.hpp>
template <typename Type>
meta_type resolve()
Description
Returns the meta type associated with a given type.
Returns a range to use to visit all meta types.
- Template Parameters
Type
- Type to use to search for a meta type.- Returns
- The meta type associated with the given type, if any.
- Returns
- An iterable range to use to visit all meta types.
Mentioned in
- Runtime Reflection System / Enjoy the runtime
- Runtime Reflection System / Template information
- Runtime Reflection System / Automatic conversions
- Runtime Reflection System / Implicitly generated default constructor
- Runtime Reflection System / Named constants and enums
- Runtime Reflection System / Properties and meta objects
Source
Lines 18-21 in src/entt/meta/resolve.hpp.
template<typename Type>
[[nodiscard]] meta_type resolve() ENTT_NOEXCEPT {
return internal::meta_node<std::remove_cv_t<std::remove_reference_t<Type>>>::resolve();
}
Synopsis
#include <src/entt/meta/resolve.hpp>
meta_type resolve(const id_type id)
Description
Returns the meta type associated with a given identifier, if any.
- Parameters
id
- Unique identifier.- Returns
- The meta type associated with the given identifier, if any.
Mentioned in
- Runtime Reflection System / Enjoy the runtime
- Runtime Reflection System / Template information
- Runtime Reflection System / Automatic conversions
- Runtime Reflection System / Implicitly generated default constructor
- Runtime Reflection System / Named constants and enums
- Runtime Reflection System / Properties and meta objects
Source
Lines 36-44 in src/entt/meta/resolve.hpp.
[[nodiscard]] inline meta_type resolve(const id_type id) ENTT_NOEXCEPT {
for(auto &&curr: resolve()) {
if(curr.id() == id) {
return curr;
}
}
return {};
}
Synopsis
#include <src/entt/meta/resolve.hpp>
meta_type resolve(const type_info &info)
Description
Returns the meta type associated with a given type info object.
- Parameters
info
- The type info object of the requested type.- Returns
- The meta type associated with the given type info object, if any.
Mentioned in
- Runtime Reflection System / Enjoy the runtime
- Runtime Reflection System / Template information
- Runtime Reflection System / Automatic conversions
- Runtime Reflection System / Implicitly generated default constructor
- Runtime Reflection System / Named constants and enums
- Runtime Reflection System / Properties and meta objects
Source
Lines 51-59 in src/entt/meta/resolve.hpp.
[[nodiscard]] inline meta_type resolve(const type_info &info) ENTT_NOEXCEPT {
for(auto &&curr: resolve()) {
if(curr.info() == info) {
return curr;
}
}
return {};
}