Opaque container for meta data.
More...
#include <entt.hpp>
Opaque container for meta data.
◆ meta_data()
entt::meta_data::meta_data |
( |
const internal::meta_data_node * |
curr = nullptr | ) |
|
|
inline |
Constructs an instance from a given node.
- Parameters
-
curr | The underlying node with which to construct the instance. |
◆ get() [1/2]
Gets the value of the variable enclosed by a given meta type.
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
-
handle | An opaque pointer to an instance of the underlying type. |
- Returns
- A meta any containing the value of the underlying variable.
◆ get() [2/2]
Gets the i-th element of an array enclosed by a given meta type.
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
-
handle | An opaque pointer to an instance of the underlying type. |
index | Position of the underlying element to get. |
- Returns
- A meta any containing the value of the underlying element.
◆ identifier()
Returns the identifier assigned to a given meta object.
- Returns
- The identifier assigned to the meta object.
◆ is_const()
bool entt::meta_data::is_const |
( |
| ) |
const |
|
inline |
Indicates whether a given meta data is constant or not.
- Returns
- True if the meta data is constant, false otherwise.
◆ is_static()
bool entt::meta_data::is_static |
( |
| ) |
const |
|
inline |
Indicates whether a given meta data is static or not.
A static meta data is such that it can be accessed using a null pointer as an instance.
- Returns
- True if the meta data is static, false otherwise.
◆ operator bool()
entt::meta_data::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Returns true if a meta object is valid, false otherwise.
- Returns
- True if the meta object is valid, false otherwise.
◆ operator==()
bool entt::meta_data::operator== |
( |
const meta_data & |
other | ) |
const |
|
inline |
Checks if two meta objects refer to the same node.
- Parameters
-
other | The meta object with which to compare. |
- Returns
- True if the two meta objects refer to the same node, 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 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.
◆ prop() [2/2]
template<typename Op >
std::enable_if_t<std::is_invocable_v<Op, meta_prop>, void> entt::meta_data::prop |
( |
Op |
op | ) |
const |
|
inline |
Iterates all the properties assigned to a meta data.
- Template Parameters
-
Op | Type of the function object to invoke. |
- Parameters
-
op | A valid function object. |
◆ set() [1/2]
template<typename Type >
bool entt::meta_data::set |
( |
meta_handle |
handle, |
|
|
std::size_t |
index, |
|
|
Type && |
value |
|
) |
| const |
|
inline |
Sets the i-th element of an array enclosed by a given meta type.
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 coincide exactly with that of the array type enclosed by the meta data. Otherwise, invoking the setter does nothing.
- Template Parameters
-
Type | Type of value to assign. |
- Parameters
-
handle | An opaque pointer to an instance of the underlying type. |
index | Position of the underlying element to set. |
value | Parameter to use to set the underlying element. |
- Returns
- True in case of success, false otherwise.
◆ set() [2/2]
template<typename Type >
bool entt::meta_data::set |
( |
meta_handle |
handle, |
|
|
Type && |
value |
|
) |
| const |
|
inline |
Sets the value of the variable enclosed by a given meta type.
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 coincide exactly with that of the variable enclosed by the meta data. Otherwise, invoking the setter does nothing.
- Template Parameters
-
Type | Type of value to assign. |
- Parameters
-
handle | An opaque pointer to an instance of the underlying type. |
value | Parameter to use to set the underlying variable. |
- Returns
- True in case of success, false otherwise.
◆ type()
Returns the meta type of the underlying object.
- Returns
- The meta type of the underlying object, if any.
The documentation for this struct was generated from the following file:
- D:/CadworkJobs/SoftwareProjekte/Lexocad/LexoGit/Lexocad/lexocad/Base/include/Base/entt.hpp