EnTT 3.13.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
entt::meta_func Struct Reference

Opaque wrapper for member functions. More...

#include <meta.hpp>

Public Types

using size_type = typename internal::meta_func_node::size_type
 Unsigned integer type.
 

Public Member Functions

 meta_func () noexcept
 Default constructor.
 
 meta_func (const meta_ctx &area, const internal::meta_func_node &curr) noexcept
 Context aware constructor for meta objects.
 
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 (const size_type index) const noexcept
 Returns the type of the i-th argument of a member function.
 
meta_any invoke (meta_handle instance, meta_any *const args, const size_type sz) const
 Invokes the underlying function, if possible.
 
template<typename... Args>
meta_any invoke (meta_handle instance, Args &&...args) const
 Invokes the underlying function, if possible.
 
meta_range< meta_prop, typename decltype(internal::meta_func_node::prop)::const_iterator > prop () const noexcept
 Returns a range to visit registered meta properties.
 
meta_prop prop (const id_type key) const
 Lookup utility for meta properties.
 
meta_func next () const
 Returns the next overload of a given function, if any.
 
 operator bool () const noexcept
 Returns true if an object is valid, false otherwise.
 
bool operator== (const meta_func &other) const noexcept
 Checks if two objects refer to the same type.
 

Detailed Description

Opaque wrapper for member functions.

Definition at line 957 of file meta.hpp.

Member Typedef Documentation

◆ size_type

using entt::meta_func::size_type = typename internal::meta_func_node::size_type

Unsigned integer type.

Definition at line 959 of file meta.hpp.

Constructor & Destructor Documentation

◆ meta_func() [1/2]

entt::meta_func::meta_func ( )
inlinenoexcept

Default constructor.

Definition at line 962 of file meta.hpp.

◆ meta_func() [2/2]

entt::meta_func::meta_func ( const meta_ctx area,
const internal::meta_func_node &  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 971 of file meta.hpp.

Member Function Documentation

◆ arg()

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

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 1625 of file meta.hpp.

◆ arity()

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

Returns the number of arguments accepted by a member function.

Returns
The number of arguments accepted by the member function.

Definition at line 979 of file meta.hpp.

◆ invoke() [1/2]

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

Invokes the underlying function, if possible.

Template Parameters
ArgsTypes of arguments to use to invoke the function.
Parameters
instanceAn opaque instance of the underlying type.
argsParameters to use to invoke the function.
Returns
A wrapper containing the returned value, if any.

Definition at line 1035 of file meta.hpp.

◆ invoke() [2/2]

meta_any entt::meta_func::invoke ( meta_handle  instance,
meta_any *const  args,
const size_type  sz 
) const
inline

Invokes the underlying function, if possible.

Warning
The context of the arguments is never changed.
Parameters
instanceAn opaque instance of the underlying type.
argsParameters to use to invoke the function.
szNumber of parameters to use to invoke the function.
Returns
A wrapper containing the returned value, if any.

Definition at line 1023 of file meta.hpp.

◆ is_const()

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

Indicates whether a member function is constant or not.

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

Definition at line 987 of file meta.hpp.

◆ is_static()

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

Indicates whether a member function is static or not.

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

Definition at line 995 of file meta.hpp.

◆ next()

meta_func entt::meta_func::next ( ) const
inline

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

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

Definition at line 1059 of file meta.hpp.

◆ operator bool()

entt::meta_func::operator bool ( ) const
inlineexplicitnoexcept

Returns true if an object is valid, false otherwise.

Returns
True if the object is valid, false otherwise.

Definition at line 1067 of file meta.hpp.

◆ operator==()

bool entt::meta_func::operator== ( const meta_func other) const
inlinenoexcept

Checks if two objects refer to the same type.

Parameters
otherThe object with which to compare.
Returns
True if the objects refer to the same type, false otherwise.

Definition at line 1072 of file meta.hpp.

◆ prop() [1/2]

meta_range< meta_prop, typename decltype(internal::meta_func_node::prop)::const_iterator > entt::meta_func::prop ( ) const
inlinenoexcept

Returns a range to visit registered meta properties.

Returns
An iterable range to visit registered meta properties.

Definition at line 1041 of file meta.hpp.

◆ prop() [2/2]

meta_prop entt::meta_func::prop ( const id_type  key) const
inline

Lookup utility for meta properties.

Parameters
keyThe key to use to search for a property.
Returns
The registered meta property for the given key, if any.

Definition at line 1050 of file meta.hpp.

◆ ret()

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

Returns the return type of a member function.

Returns
The return type of the member function.

Definition at line 1621 of file meta.hpp.


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