Opaque wrapper for meta constructors.
More...
#include <entt.hpp>
|
using | node_type = internal::meta_ctor_node |
| Node type.
|
|
using | size_type = typename node_type::size_type |
| Unsigned integer type.
|
|
Opaque wrapper for meta constructors.
◆ meta_ctor()
entt::meta_ctor::meta_ctor |
( |
const node_type * |
curr = nullptr | ) |
|
|
inline |
Constructs an instance from a given node.
- Parameters
-
curr | The underlying node with which to construct the instance. |
◆ arg()
Returns the meta type of the i-th argument of a meta constructor.
- Parameters
-
index | The index of the argument of which to return the meta type. |
- Returns
- The meta type of the i-th argument of a meta constructor, if any.
◆ invoke() [1/2]
Creates an instance of the underlying type, if possible.
To create a valid instance, the parameters must be such that a cast or conversion to the required types is possible. Otherwise, an empty and thus invalid wrapper is returned.
- Parameters
-
args | Parameters to use to construct the instance. |
sz | Number of parameters to use to construct the instance. |
- Returns
- A meta any containing the new instance, if any.
◆ invoke() [2/2]
template<typename... Args>
meta_any entt::meta_ctor::invoke |
( |
[[maybe_unused] ] Args &&... |
args | ) |
const |
|
inline |
Creates an instance of the underlying type, if possible.
- See also
- invoke
- Template Parameters
-
Args | Types of arguments to use to construct the instance. |
- Parameters
-
args | Parameters to use to construct the instance. |
- Returns
- A meta any containing the new instance, if any.
◆ operator bool()
entt::meta_ctor::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Returns true if a meta object is valid, false otherwise.
- Returns
- True if the meta object is valid, false otherwise.
◆ parent()
Returns the meta type to which a meta object belongs.
- Returns
- The meta type to which the meta object belongs.
◆ prop() [1/2]
Returns a range to use to visit all meta properties.
- Returns
- An iterable range to use to visit all meta properties.
◆ prop() [2/2]
Returns the property associated with a given key.
- Parameters
-
key | The key to use to search for a property. |
- Returns
- The property associated with the given key, if any.
◆ size()
Returns the number of arguments accepted by a meta constructor.
- Returns
- The number of arguments accepted by the meta constructor.
The documentation for this struct was generated from the following file: