Clementine
Public Member Functions | List of all members
entt::meta_handle Struct Reference

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

#include <entt.hpp>

Public Member Functions

 meta_handle ()=default
 Default constructor.
 
template<typename Type , typename = std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Type>>, meta_handle>>>
 meta_handle (Type &value) ENTT_NOEXCEPT
 Creates a handle that points to an unmanaged object. More...
 
meta_any operator* () const
 Dereference operator for accessing the contained opaque object. More...
 
meta_anyoperator-> ()
 Access operator for accessing the contained opaque object. More...
 
const meta_anyoperator-> () const
 Access operator for accessing the contained opaque object. More...
 

Detailed Description

Opaque pointers to instances of any type.

A handle doesn't perform copies and isn't responsible for the contained object. It doesn't prolong the lifetime of the pointed instance.
Handles are used to generate meta references to actual objects when needed.

Constructor & Destructor Documentation

◆ meta_handle()

template<typename Type , typename = std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Type>>, meta_handle>>>
entt::meta_handle::meta_handle ( Type &  value)
inline

Creates a handle that points to an unmanaged object.

Template Parameters
TypeType of object to use to initialize the handle.
Parameters
valueAn instance of an object to use to initialize the handle.

Member Function Documentation

◆ operator*()

meta_any entt::meta_handle::operator* ( ) const
inline

Dereference operator for accessing the contained opaque object.

Returns
A meta any that shares a reference to an unmanaged object.

◆ operator->() [1/2]

meta_any* entt::meta_handle::operator-> ( )
inline

Access operator for accessing the contained opaque object.

Returns
A meta any that shares a reference to an unmanaged object.

◆ operator->() [2/2]

const meta_any* entt::meta_handle::operator-> ( ) const
inline

Access operator for accessing the contained opaque object.

Returns
A meta any that shares a reference to an unmanaged object.

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