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

Meta base object. More...

#include <meta.hpp>

Public Member Functions

 base () noexcept
 Default constructor.
 
meta::type parent () const noexcept
 Returns the meta type to which a meta base belongs. More...
 
meta::type type () const noexcept
 Returns the meta type of a given meta base. More...
 
void * cast (void *instance) const noexcept
 Casts an instance from a parent type to a base type. More...
 
 operator bool () const noexcept
 Returns true if a meta object is valid, false otherwise. More...
 
bool operator== (const base &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 base object.

A meta base is an opaque container for a base class to be used to walk through hierarchies.

Definition at line 826 of file meta.hpp.

Member Function Documentation

◆ cast()

void* meta::base::cast ( void *  instance) const
inlinenoexcept

Casts an instance from a parent type to a base type.

Parameters
instanceThe instance to cast.
Returns
An opaque pointer to the base type.

Definition at line 857 of file meta.hpp.

◆ operator bool()

meta::base::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 865 of file meta.hpp.

◆ operator==()

bool meta::base::operator== ( const base 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 875 of file meta.hpp.

◆ parent()

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

Returns the meta type to which a meta base belongs.

Returns
The meta type to which the meta base belongs.

Definition at line 1960 of file meta.hpp.

◆ type()

meta::type meta::base::type ( ) const
inlinenoexcept

Returns the meta type of a given meta base.

Returns
The meta type of the meta base.

Definition at line 1965 of file meta.hpp.


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