OpenLexocad
27.0
|
Opaque container for meta constructors. More...
#include <entt.hpp>
Public Types | |
using | size_type = typename internal::meta_ctor_node::size_type |
Unsigned integer type. More... | |
Public Member Functions | |
meta_ctor (const internal::meta_ctor_node *curr=nullptr) ENTT_NOEXCEPT | |
Constructs an instance from a given node. More... | |
meta_type | parent () const ENTT_NOEXCEPT |
Returns the meta type to which a meta object belongs. More... | |
size_type | size () const ENTT_NOEXCEPT |
Returns the number of arguments accepted by a meta constructor. More... | |
meta_type | arg (size_type index) const ENTT_NOEXCEPT |
Returns the meta type of the i-th argument of a meta constructor. More... | |
template<typename... Args> | |
meta_any | invoke (Args &&... args) const |
Creates an instance of the underlying type, if possible. More... | |
template<typename Op > | |
std::enable_if_t< std::is_invocable_v< Op, meta_prop >, void > | prop (Op op) const ENTT_NOEXCEPT |
Iterates all the properties assigned to a meta constructor. More... | |
meta_prop | prop (meta_any key) const ENTT_NOEXCEPT |
Returns the property associated with a given key. More... | |
operator bool () const ENTT_NOEXCEPT | |
Returns true if a meta object is valid, false otherwise. More... | |
bool | operator== (const meta_ctor &other) const ENTT_NOEXCEPT |
Checks if two meta objects refer to the same node. More... | |
Opaque container for meta constructors.
using entt::meta_ctor::size_type = typename internal::meta_ctor_node::size_type |
Unsigned integer type.
|
inline |
Constructs an instance from a given node.
curr | The underlying node with which to construct the instance. |
Returns the meta type of the i-th argument of a meta constructor.
index | The index of the argument of which to return the meta type. |
|
inline |
Creates an instance of the underlying type, if possible.
To create a valid instance, the types of the parameters must coincide exactly with those required by the underlying meta constructor. Otherwise, an empty and then invalid container is returned.
Args | Types of arguments to use to construct the instance. |
args | Parameters to use to construct the instance. |
|
inlineexplicit |
Returns true if a meta object is valid, false otherwise.
|
inline |
Checks if two meta objects refer to the same node.
other | The meta object with which to compare. |
|
inline |
Returns the meta type to which a meta object belongs.
|
inline |
Iterates all the properties assigned to a meta constructor.
Op | Type of the function object to invoke. |
op | A valid function object. |
Returns the property associated with a given key.
key | The key to use to search for a property. |
|
inline |
Returns the number of arguments accepted by a meta constructor.