meta  1.4.9
Classes | Functions | Variables
meta Namespace Reference

meta default namespace. More...

Classes

class  any
 Meta any object. More...
 
struct  as_alias_t
 Empty class type used to request the as alias policy. More...
 
struct  as_is_t
 Empty class type used to request the as-is policy. More...
 
struct  as_void_t
 Empty class type used to request the as void policy. More...
 
class  base
 Meta base object. More...
 
class  conv
 Meta conversion function object. More...
 
class  ctor
 Meta constructor object. More...
 
class  data
 Meta data object. More...
 
class  dtor
 Meta destructor object. More...
 
class  factory
 A meta factory to be used for reflection purposes. More...
 
class  func
 Meta function object. More...
 
class  handle
 Meta handle object. More...
 
class  prop
 Meta property object. More...
 
class  type
 Meta type object. More...
 

Functions

template<typename Type , typename... Property>
factory< Type > reflect (const std::size_t identifier, Property &&... property) noexcept
 Utility function to use for reflection. More...
 
template<typename Type >
factory< Type > reflect () noexcept
 Utility function to use for reflection. More...
 
template<typename Type >
bool unregister () noexcept
 Utility function to unregister a type. More...
 
template<typename Type >
type resolve () noexcept
 Returns the meta type associated with a given type. More...
 
type resolve (const std::size_t identifier) noexcept
 Returns the meta type associated with a given identifier. More...
 
template<typename Op >
std::enable_if_t< std::is_invocable_v< Op, type >, void > resolve (Op op) noexcept
 Iterates all the reflected types. More...
 
bool operator!= (const any &lhs, const any &rhs) noexcept
 Checks if two containers differ in their content. More...
 
bool operator!= (const prop &lhs, const prop &rhs) noexcept
 Checks if two meta objects refer to the same node. More...
 
bool operator!= (const base &lhs, const base &rhs) noexcept
 Checks if two meta objects refer to the same node. More...
 
bool operator!= (const conv &lhs, const conv &rhs) noexcept
 Checks if two meta objects refer to the same node. More...
 
bool operator!= (const ctor &lhs, const ctor &rhs) noexcept
 Checks if two meta objects refer to the same node. More...
 
bool operator!= (const dtor &lhs, const dtor &rhs) noexcept
 Checks if two meta objects refer to the same node. More...
 
bool operator!= (const data &lhs, const data &rhs) noexcept
 Checks if two meta objects refer to the same node. More...
 
bool operator!= (const func &lhs, const func &rhs) noexcept
 Checks if two meta objects refer to the same node. More...
 
bool operator!= (const type &lhs, const type &rhs) noexcept
 Checks if two meta objects refer to the same node. More...
 

Variables

constexpr as_alias_t as_alias
 Disambiguation tag.
 

Detailed Description

meta default namespace.

Function Documentation

◆ operator!=() [1/9]

bool meta::operator!= ( const any lhs,
const any rhs 
)
inlinenoexcept

Checks if two containers differ in their content.

Parameters
lhsA meta any object, either empty or not.
rhsA meta any object, either empty or not.
Returns
True if the two containers differ in their content, false otherwise.

Definition at line 745 of file meta.hpp.

◆ operator!=() [2/9]

bool meta::operator!= ( const prop lhs,
const prop rhs 
)
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
lhsA meta object, either valid or not.
rhsA meta object, either valid or not.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 815 of file meta.hpp.

◆ operator!=() [3/9]

bool meta::operator!= ( const base lhs,
const base rhs 
)
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
lhsA meta object, either valid or not.
rhsA meta object, either valid or not.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 890 of file meta.hpp.

◆ operator!=() [4/9]

bool meta::operator!= ( const conv lhs,
const conv rhs 
)
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
lhsA meta object, either valid or not.
rhsA meta object, either valid or not.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 965 of file meta.hpp.

◆ operator!=() [5/9]

bool meta::operator!= ( const ctor lhs,
const ctor rhs 
)
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
lhsA meta object, either valid or not.
rhsA meta object, either valid or not.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 1095 of file meta.hpp.

◆ operator!=() [6/9]

bool meta::operator!= ( const dtor lhs,
const dtor rhs 
)
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
lhsA meta object, either valid or not.
rhsA meta object, either valid or not.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 1169 of file meta.hpp.

◆ operator!=() [7/9]

bool meta::operator!= ( const data lhs,
const data rhs 
)
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
lhsA meta object, either valid or not.
rhsA meta object, either valid or not.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 1352 of file meta.hpp.

◆ operator!=() [8/9]

bool meta::operator!= ( const func lhs,
const func rhs 
)
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
lhsA meta object, either valid or not.
rhsA meta object, either valid or not.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 1513 of file meta.hpp.

◆ operator!=() [9/9]

bool meta::operator!= ( const type lhs,
const type rhs 
)
inlinenoexcept

Checks if two meta objects refer to the same node.

Parameters
lhsA meta object, either valid or not.
rhsA meta object, either valid or not.
Returns
True if the two meta objects refer to the same node, false otherwise.

Definition at line 1937 of file meta.hpp.

◆ reflect() [1/2]

template<typename Type , typename... Property>
factory<Type> meta::reflect ( const std::size_t  identifier,
Property &&...  property 
)
inlinenoexcept

Utility function to use for reflection.

This is the point from which everything starts.
By invoking this function with a type that is not yet reflected, a meta type is created to which it will be possible to attach data and functions through a dedicated factory.

Template Parameters
TypeType to reflect.
PropertyTypes of properties to assign to the reflected type.
Parameters
identifierUnique identifier.
propertyProperties to assign to the reflected type.
Returns
A meta factory for the given type.

Definition at line 851 of file factory.hpp.

◆ reflect() [2/2]

template<typename Type >
factory<Type> meta::reflect ( )
inlinenoexcept

Utility function to use for reflection.

This is the point from which everything starts.
By invoking this function with a type that is not yet reflected, a meta type is created to which it will be possible to attach data and functions through a dedicated factory.

Template Parameters
TypeType to reflect.
Returns
A meta factory for the given type.

Definition at line 868 of file factory.hpp.

◆ resolve() [1/3]

template<typename Type >
type meta::resolve ( )
inlinenoexcept

Returns the meta type associated with a given type.

Template Parameters
TypeType to use to search for a meta type.
Returns
The meta type associated with the given type, if any.

Definition at line 897 of file factory.hpp.

◆ resolve() [2/3]

type meta::resolve ( const std::size_t  identifier)
inlinenoexcept

Returns the meta type associated with a given identifier.

Parameters
identifierUnique identifier.
Returns
The meta type associated with the given identifier, if any.

Definition at line 907 of file factory.hpp.

◆ resolve() [3/3]

template<typename Op >
std::enable_if_t<std::is_invocable_v<Op, type>, void> meta::resolve ( Op  op)
inlinenoexcept

Iterates all the reflected types.

Template Parameters
OpType of the function object to invoke.
Parameters
opA valid function object.

Definition at line 923 of file factory.hpp.

◆ unregister()

template<typename Type >
bool meta::unregister ( )
inlinenoexcept

Utility function to unregister a type.

This function unregisters a type and all its data members, member functions and properties, as well as its constructors, destructors and conversion functions if any.
Base classes aren't unregistered but the link between the two types is removed.

Template Parameters
TypeType to unregister.
Returns
True if the type to unregister exists, false otherwise.

Definition at line 886 of file factory.hpp.