meta  1.4.9
Public Member Functions | Friends | List of all members
meta::dtor Class Reference

Meta destructor object. More...

#include <meta.hpp>

Public Member Functions

 dtor () noexcept
 Default constructor.
 
meta::type parent () const noexcept
 Returns the meta type to which a meta destructor belongs. More...
 
bool invoke (handle handle) const
 Destroys an instance of the underlying type. More...
 
 operator bool () const noexcept
 Returns true if a meta object is valid, false otherwise. More...
 
bool operator== (const dtor &other) const noexcept
 Checks if two meta objects refer to the same node. More...
 

Friends

template<typename >
class factory
 A meta factory is allowed to create meta objects.
 

Detailed Description

Meta destructor object.

A meta destructor is an opaque container for a function to be used to destroy instances of a given type.

Definition at line 1106 of file meta.hpp.

Member Function Documentation

◆ invoke()

bool meta::dtor::invoke ( handle  handle) const
inline

Destroys an instance of the underlying type.

It must be possible to cast the instance to the parent type of the meta destructor. Otherwise, invoking the meta destructor results in an undefined behavior.

Parameters
handleAn opaque pointer to an instance of the underlying type.
Returns
True in case of success, false otherwise.

Definition at line 1136 of file meta.hpp.

◆ operator bool()

meta::dtor::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 1144 of file meta.hpp.

◆ operator==()

bool meta::dtor::operator== ( const dtor other) const
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
otherThe meta object with which to compare.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 1154 of file meta.hpp.

◆ parent()

meta::type meta::dtor::parent ( ) const
inlinenoexcept

Returns the meta type to which a meta destructor belongs.

Returns
The meta type to which the meta destructor belongs.

Definition at line 1990 of file meta.hpp.


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