EnTT 4.0.0
Loading...
Searching...
No Matches
entt::meta_func Struct Reference

Opaque wrapper for member functions. More...

#include <meta.hpp>

Inheritance diagram for entt::meta_func:
Collaboration diagram for entt::meta_func:

Public Member Functions

stl::string_view name () const noexcept
 Returns the name assigned to a member function, if any.
size_type arity () const noexcept
 Returns the number of arguments accepted by a member function.
bool is_const () const noexcept
 Indicates whether a member function is constant or not.
bool is_static () const noexcept
 Indicates whether a member function is static or not.
meta_type ret () const noexcept
 Returns the return type of a member function.
meta_type arg (size_type index) const noexcept
 Returns the type of the i-th argument of a member function.
template<typename Instance = meta_handle>
meta_any invoke (Instance &&instance, auto &&...args) const
 Invokes the underlying function, if possible.
template<typename Type>
Type traits () const noexcept
 Returns all meta traits for a given meta object.
meta_custom custom () const noexcept
 Returns user defined data for a given meta object.
meta_func next () const
 Returns the next overload of a given function, if any.
 meta_object () noexcept=default
 Default constructor.
 meta_object (const meta_ctx &area, const node_type &curr) noexcept
 Context aware constructor for meta objects.
Public Member Functions inherited from entt::meta_object< internal::meta_func_node >
 meta_object () noexcept=default
 Default constructor.
 operator bool () const noexcept
 Returns true if an object is valid, false otherwise.
bool operator== (const meta_object &other) const noexcept
 Checks if two objects refer to the same type.

Additional Inherited Members

Public Types inherited from entt::meta_object< internal::meta_func_node >
using node_type
 Underlying meta node type.
using size_type
 Unsigned integer type.

Detailed Description

Opaque wrapper for member functions.

Definition at line 936 of file meta.hpp.

Member Function Documentation

◆ arg()

meta_type entt::meta_func::arg ( size_type index) const
inlinenodiscardnoexcept

Returns the type of the i-th argument of a member function.

Parameters
indexIndex of the argument of which to return the type.
Returns
The type of the i-th argument of a member function.

Definition at line 1564 of file meta.hpp.

◆ arity()

size_type entt::meta_func::arity ( ) const
inlinenodiscardnoexcept

Returns the number of arguments accepted by a member function.

Returns
The number of arguments accepted by the member function.

Definition at line 951 of file meta.hpp.

◆ custom()

meta_custom entt::meta_func::custom ( ) const
inlinenodiscardnoexcept

Returns user defined data for a given meta object.

Returns
User defined arbitrary data.

Definition at line 1004 of file meta.hpp.

◆ invoke()

template<typename Instance = meta_handle>
meta_any entt::meta_func::invoke ( Instance && instance,
auto &&... args ) const
inline

Invokes the underlying function, if possible.

Template Parameters
InstanceType of instance to operate on.
Parameters
instanceAn instance that fits the underlying type.
argsParameters to use to invoke the function.
Returns
A wrapper containing the returned value, if any.

Definition at line 993 of file meta.hpp.

◆ is_const()

bool entt::meta_func::is_const ( ) const
inlinenodiscardnoexcept

Indicates whether a member function is constant or not.

Returns
True if the member function is constant, false otherwise.

Definition at line 959 of file meta.hpp.

◆ is_static()

bool entt::meta_func::is_static ( ) const
inlinenodiscardnoexcept

Indicates whether a member function is static or not.

Returns
True if the member function is static, false otherwise.

Definition at line 967 of file meta.hpp.

◆ meta_object()

entt::meta_object< Type >::meta_object ( const meta_ctx & area,
const node_type & curr )
inlinenoexcept

Context aware constructor for meta objects.

Parameters
areaThe context from which to search for meta types.
currThe underlying node with which to construct the instance.

Definition at line 808 of file meta.hpp.

◆ name()

stl::string_view entt::meta_func::name ( ) const
inlinenodiscardnoexcept

Returns the name assigned to a member function, if any.

Returns
The name assigned to the member function, if any.

Definition at line 943 of file meta.hpp.

◆ next()

meta_func entt::meta_func::next ( ) const
inlinenodiscard

Returns the next overload of a given function, if any.

Returns
The next overload of the given function, if any.

Definition at line 1012 of file meta.hpp.

◆ ret()

meta_type entt::meta_func::ret ( ) const
inlinenodiscardnoexcept

Returns the return type of a member function.

Returns
The return type of the member function.

Definition at line 1560 of file meta.hpp.

◆ traits()

template<typename Type>
Type entt::meta_func::traits ( ) const
inlinenodiscardnoexcept

Returns all meta traits for a given meta object.

Template Parameters
TypeThe type to convert the meta traits to.
Returns
The registered meta traits, if any.

Definition at line 999 of file meta.hpp.


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