EnTT: entt::meta_handle Struct Reference

EnTT 3.15.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
entt::meta_handle Struct Reference

Opaque pointers to instances of any type. More...

`#include <meta.hpp>`

## Public Member Functions
| meta_handle ()=default
| meta_handle (meta_ctx_arg_t, const meta_ctx &area)
| Context aware constructor.
| meta_handle (meta_any &value)
| Creates a handle that points to an unmanaged object.
| meta_handle (const meta_any &value)
| Creates a handle that points to an unmanaged object.
template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_handle>>>
| meta_handle (const meta_ctx &ctx, Type &value)
| Creates a handle that points to an unmanaged object.
template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_handle>>>
| meta_handle (Type &value)
| Creates a handle that points to an unmanaged object.
| meta_handle (const meta_ctx &area, const meta_handle &other)
| Context aware copy constructor.
| meta_handle (const meta_ctx &area, meta_handle &&other)
| Context aware move constructor.
| meta_handle (const meta_handle &)=delete
| Default copy constructor, deleted on purpose.
| meta_handle (meta_handle &&)=default
| Default move constructor.
| ~meta_handle ()=default
| Default destructor.
meta_handle & | operator= (const meta_handle &)=delete
| Default copy assignment operator, deleted on purpose.
meta_handle & | operator= (meta_handle &&)=default
| Default move assignment operator.
| operator bool () const noexcept
| Returns false if a handle is invalid, true otherwise.
bool | operator== (const meta_handle &other) const noexcept
| Checks if two wrappers differ in their content.
bool | operator!= (const meta_handle &other) const noexcept
| Checks if two wrappers differ in their content.
meta_any * | operator-> ()
| Access operator for accessing the contained opaque object.
const meta_any * | operator-> () const
| Access operator for accessing the contained opaque object.

## Detailed Description

Opaque pointers to instances of any type.

Definition at line 688 of file meta.hpp.

## Constructor & Destructor Documentation

## ◆ meta_handle() [1/8]

entt::meta_handle::meta_handle | ( |  | ) |
| default

Default constructor.

## ◆ meta_handle() [2/8]

entt::meta_handle::meta_handle | ( | meta_ctx_arg_t | ,
|  | const meta_ctx & | area )
| inline

Context aware constructor.

Parameters

  area | The context from which to search for meta types.

Definition at line 696 of file meta.hpp.

## ◆ meta_handle() [3/8]

entt::meta_handle::meta_handle | ( | meta_any & | value | ) |
| inline

Creates a handle that points to an unmanaged object.

Parameters

  value | An instance of an object to use to initialize the handle.

Definition at line 703 of file meta.hpp.

## ◆ meta_handle() [4/8]

entt::meta_handle::meta_handle | ( | const meta_any & | value | ) |
| inline

Creates a handle that points to an unmanaged object.

Parameters

  value | An instance of an object to use to initialize the handle.

Definition at line 710 of file meta.hpp.

## ◆ meta_handle() [5/8]

template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_handle>>>

entt::meta_handle::meta_handle | ( | const meta_ctx & | ctx,
|  | Type & | value )
| inline

Creates a handle that points to an unmanaged object.

Template Parameters

  Type | Type of object to use to initialize the handle.

Parameters

  ctx | The context from which to search for meta types.
  value | An instance of an object to use to initialize the handle.

Definition at line 720 of file meta.hpp.

## ◆ meta_handle() [6/8]

template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_handle>>>

entt::meta_handle::meta_handle | ( | Type & | value | ) |
| inline

Creates a handle that points to an unmanaged object.

Template Parameters

  Type | Type of object to use to initialize the handle.

Parameters

  value | An instance of an object to use to initialize the handle.

Definition at line 729 of file meta.hpp.

## ◆ meta_handle() [7/8]

entt::meta_handle::meta_handle | ( | const meta_ctx & | area,
|  | const meta_handle & | other )
| inline

Context aware copy constructor.

Parameters

  area | The context from which to search for meta types.
  other | The instance to copy from.

Definition at line 737 of file meta.hpp.

## ◆ meta_handle() [8/8]

entt::meta_handle::meta_handle | ( | const meta_ctx & | area,
|  | meta_handle && | other )
| inline

Context aware move constructor.

Parameters

  area | The context from which to search for meta types.
  other | The instance to move from.

Definition at line 745 of file meta.hpp.

## Member Function Documentation

## ◆ operator bool()

entt::meta_handle::operator bool | ( |  | ) | const
| inlineexplicitnodiscardnoexcept

Returns false if a handle is invalid, true otherwise.

Returns
  False if the handle is invalid, true otherwise.

Definition at line 773 of file meta.hpp.

## ◆ operator!=()

bool entt::meta_handle::operator!= | ( | const meta_handle & | other | ) | const
| inlinenodiscardnoexcept

Checks if two wrappers differ in their content.

Parameters

  other | Wrapper with which to compare.

Returns
  True if the two objects differ in their content, false otherwise.

Definition at line 783 of file meta.hpp.

## ◆ operator->() [1/2]

meta_any * entt::meta_handle::operator-> | ( |  | ) |
| inlinenodiscard

Access operator for accessing the contained opaque object.

Returns
  A wrapper that shares a reference to an unmanaged object.

Definition at line 791 of file meta.hpp.

## ◆ operator->() [2/2]

const meta_any * entt::meta_handle::operator-> | ( |  | ) | const
| inlinenodiscard

Access operator for accessing the contained opaque object.

Returns
  A wrapper that shares a reference to an unmanaged object.

Definition at line 796 of file meta.hpp.

## ◆ operator=() [1/2]

meta_handle & entt::meta_handle::operator= | ( | const meta_handle & |  | ) |
| delete

Default copy assignment operator, deleted on purpose.

Returns
  This meta handle.

## ◆ operator=() [2/2]

meta_handle & entt::meta_handle::operator= | ( | meta_handle && |  | ) |
| default

Default move assignment operator.

Returns
  This meta handle.

## ◆ operator==()

bool entt::meta_handle::operator== | ( | const meta_handle & | other | ) | const
| inlinenodiscardnoexcept

Checks if two wrappers differ in their content.

Parameters

  other | Wrapper with which to compare.

Returns
  False if the two objects differ in their content, true otherwise.

Definition at line 778 of file meta.hpp.

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

- src/entt/meta/meta.hpp