Opaque wrapper for meta data.
More...
#include <meta.hpp>
|
|
using | node_type = internal::meta_data_node |
| | Node type.
|
| |
Opaque wrapper for meta data.
Definition at line 789 of file meta.hpp.
◆ meta_data()
| entt::meta_data::meta_data |
( |
const node_type * |
curr = nullptr | ) |
|
|
inlinenoexcept |
Constructs an instance from a given node.
- Parameters
-
| curr | The underlying node with which to construct the instance. |
Definition at line 794 of file meta.hpp.
◆ get()
Gets the value of a given variable.
It must be possible to cast the instance to the parent type of the meta data. Otherwise, invoking the getter results in an undefined behavior.
- Parameters
-
| instance | An opaque instance of the underlying type. |
- Returns
- A meta any containing the value of the underlying variable.
Definition at line 853 of file meta.hpp.
◆ id()
| id_type entt::meta_data::id |
( |
| ) |
const |
|
inlinenoexcept |
Returns the identifier assigned to a meta object.
- Returns
- The identifier assigned to the meta object.
Definition at line 799 of file meta.hpp.
◆ is_const()
| bool entt::meta_data::is_const |
( |
| ) |
const |
|
inlinenoexcept |
Indicates whether a meta data is constant or not.
- Returns
- True if the meta data is constant, false otherwise.
Definition at line 810 of file meta.hpp.
◆ is_static()
| bool entt::meta_data::is_static |
( |
| ) |
const |
|
inlinenoexcept |
Indicates whether a meta data is static or not.
- Returns
- True if the meta data is static, false otherwise.
Definition at line 818 of file meta.hpp.
◆ operator bool()
| entt::meta_data::operator bool |
( |
| ) |
const |
|
inlineexplicitnoexcept |
Returns true if a meta object is valid, false otherwise.
- Returns
- True if the meta object is valid, false otherwise.
Definition at line 876 of file meta.hpp.
◆ parent()
Returns the meta type to which a meta object belongs.
- Returns
- The meta type to which the meta object belongs.
Definition at line 1571 of file meta.hpp.
◆ prop() [1/2]
Returns a range to use to visit all meta properties.
- Returns
- An iterable range to use to visit all meta properties.
Definition at line 858 of file meta.hpp.
◆ 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.
Definition at line 867 of file meta.hpp.
◆ set()
template<typename Type >
| bool entt::meta_data::set |
( |
meta_handle |
instance, |
|
|
Type && |
value |
|
) |
| const |
|
inline |
Sets the value of a given variable.
It must be possible to cast the instance to the parent type of the meta data. Otherwise, invoking the setter results in an undefined behavior.
The type of the value must be such that a cast or conversion to the type of the variable is possible. Otherwise, invoking the setter does nothing.
- Template Parameters
-
| Type | Type of value to assign. |
- Parameters
-
| instance | An opaque instance of the underlying type. |
| value | Parameter to use to set the underlying variable. |
- Returns
- True in case of success, false otherwise.
Definition at line 840 of file meta.hpp.
◆ type()
Returns the meta type of the underlying object.
- Returns
- The meta type of the underlying object, if any.
Definition at line 1576 of file meta.hpp.
The documentation for this struct was generated from the following file: