OpenLexocad
28.0
|
Opaque container for meta functions. More...
#include <entt.hpp>
Public Types | |
using | size_type = typename internal::meta_func_node::size_type |
Unsigned integer type. More... | |
Public Member Functions | |
meta_func (const internal::meta_func_node *curr=nullptr) ENTT_NOEXCEPT | |
Constructs an instance from a given node. More... | |
ENTT_ID_TYPE | identifier () const ENTT_NOEXCEPT |
Returns the identifier assigned to a given meta object. 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 function. More... | |
bool | is_const () const ENTT_NOEXCEPT |
Indicates whether a given meta function is constant or not. More... | |
bool | is_static () const ENTT_NOEXCEPT |
Indicates whether a given meta function is static or not. More... | |
meta_type | ret () const ENTT_NOEXCEPT |
Returns the meta type of the return type of a meta function. More... | |
meta_type | arg (size_type index) const ENTT_NOEXCEPT |
Returns the meta type of the i-th argument of a meta function. More... | |
template<typename... Args> | |
meta_any | invoke (meta_handle handle, Args &&... args) const |
Invokes the underlying function, 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 function. 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_func &other) const ENTT_NOEXCEPT |
Checks if two meta objects refer to the same node. More... | |
Opaque container for meta functions.
using entt::meta_func::size_type = typename internal::meta_func_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 function.
index | The index of the argument of which to return the meta type. |
|
inline |
Returns the identifier assigned to a given meta object.
|
inline |
Invokes the underlying function, if possible.
To invoke a meta function, the types of the parameters must coincide exactly with those required by the underlying function. Otherwise, an empty and then invalid container is returned.
It must be possible to cast the instance to the parent type of the meta function. Otherwise, invoking the underlying function results in an undefined behavior.
Args | Types of arguments to use to invoke the function. |
handle | An opaque pointer to an instance of the underlying type. |
args | Parameters to use to invoke the function. |
|
inline |
Indicates whether a given meta function is constant or not.
|
inline |
Indicates whether a given meta function is static or not.
A static meta function is such that it can be invoked using a null pointer as an 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.
Returns the property associated with a given key.
key | The key to use to search for a property. |
|
inline |
Iterates all the properties assigned to a meta function.
Op | Type of the function object to invoke. |
op | A valid function object. |
|
inline |
Returns the meta type of the return type of a meta function.
|
inline |
Returns the number of arguments accepted by a meta function.