Mirror reflection library - Lagoon run-time layer 0.5.13
|
#include <lagoon/interfaces.hpp>
Public Member Functions | |
virtual shared < meta_type_template > | type_template (void)=0 |
Returns a meta_type_template reflecting this type's template. | |
virtual range< meta_type > | template_parameters (void)=0 |
Returns a range of meta_type(s) reflecting template parameters. | |
virtual range< meta_constructor > | constructors (void)=0 |
Returns meta-constructors reflecting type's constructors. | |
virtual bool | is_default_constructible (void)=0 |
Returns true if the type is default constructible. | |
virtual bool | is_copy_constructible (void)=0 |
Returns true if the type is copy constructible. | |
virtual raw_ptr | new_ (void)=0 |
Allocates and constructs a new instance of the reflected type. | |
virtual raw_ptr | new_copy (raw_ptr source)=0 |
Allocates and copy-constructs a new instance of the reflected type. | |
virtual boost::any | default_ (void)=0 |
Creates a default instance of the type reflected by this meta type. | |
virtual void | delete_ (raw_ptr ptr)=0 |
Deletes an object constructed by new_, new_copy or by a factory. | |
virtual shared_raw_ptr | make_shared (raw_ptr source)=0 |
Make a shared raw pointer from an unmanaged raw pointer. | |
virtual unique_raw_ptr | make_unique (raw_ptr source)=0 |
Make a shared raw pointer from an unmanaged raw pointer. | |
virtual std::unique_ptr < polymorph_factory > | make_factory (polymorph_factory_builder &builder, raw_ptr build_data)=0 |
Make a polymorphic factory, built by the passed factory builder. | |
virtual std::string | full_name (void)=0 |
Returns the full name of the reflected construct. | |
virtual std::string | local_name (void)=0 |
Returns the local name of the reflected construct. | |
virtual std::string | base_name (void)=0 |
Returns the base name of the reflected construct. | |
virtual shared< meta_meta_object > | self (void) const =0 |
returns meta-data about this meta-object | |
Reflected type-trait functions | |
These functions allow to inspect individual type traits of the type reflected by this meta_type. | |
virtual std::size_t | size_of (void)=0 |
Returns the size of this type. | |
virtual std::size_t | alignment_of (void)=0 |
Returns the alignment of this type. | |
virtual bool | is_array (void)=0 |
Returns true if the reflected type is an array type. | |
virtual bool | is_const (void)=0 |
Returns true if the reflected type is const. | |
virtual bool | is_pointer (void)=0 |
Returns true if the reflected type is a pointer. | |
virtual bool | is_reference (void)=0 |
Returns true if the reflected type is a reference. | |
virtual bool | is_volatile (void)=0 |
Returns true if the reflected type is volatile. | |
virtual shared< meta_type > | add_const (void)=0 |
Returns a meta_type with added const qualifier. | |
virtual shared< meta_type > | add_cv (void)=0 |
Returns a meta_type with added const and volatile qualifiers. | |
virtual shared< meta_type > | add_volatile (void)=0 |
Returns a meta_type with added volatile qualifier. | |
virtual shared< meta_type > | remove_const (void)=0 |
Returns a meta_type without the const qualifier. | |
virtual shared< meta_type > | remove_cv (void)=0 |
Returns a meta_type without the const and volatile qualifiers. | |
virtual shared< meta_type > | remove_pointer (void)=0 |
Returns a meta_type with one level of pointer indirection removed. | |
virtual shared< meta_type > | remove_reference (void)=0 |
Returns a meta_type with one level of reference indirection removed. | |
virtual shared< meta_type > | remove_volatile (void)=0 |
Returns a meta_type without the volatile qualifier. | |
virtual shared< meta_type > | remove_extent (void)=0 |
Returns a meta_type with an array extent removed. | |
Static Protected Member Functions | |
static void * | _sel_ptr (void) |
template<typename... P> | |
static void * | _sel_ptr (void *p, P *...pp) |
This interface provides meta-data about a templated type
Returns a meta_type with added const qualifier.
Available only if either the LAGOON_MT_WITH_ADD_CONST or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
Returns a meta_type with added const and volatile qualifiers.
Available only if either the LAGOON_MT_WITH_ADD_CV or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
Returns a meta_type with added volatile qualifier.
Available only if either the LAGOON_MT_WITH_ADD_VOLATILE or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual std::size_t lagoon::meta_type::alignment_of | ( | void | ) | [pure virtual, inherited] |
Returns the alignment of this type.
Available only if either the LAGOON_MT_WITH_ALIGNMENT_OF or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual std::string lagoon::meta_named_object::base_name | ( | void | ) | [pure virtual, inherited] |
Returns the base name of the reflected construct.
This member function returns the base name i.e. the name without the nested name specifier of the construct reflected by this meta-object.
virtual boost::any lagoon::meta_type::default_ | ( | void | ) | [pure virtual, inherited] |
Creates a default instance of the type reflected by this meta type.
This member function returns a default-constructed instance of the type reflected by this meta-type if the base-level type has a default constructor. If the reflected type does not have a default constructor, this function returns an empty boost::any.
Available only if the LAGOON_MT_WITH_DEFAULT preprocessor symbol is set to a nonzero integer value.
virtual void lagoon::meta_type::delete_ | ( | raw_ptr | ptr | ) | [pure virtual, inherited] |
Deletes an object constructed by new_, new_copy or by a factory.
Available only if the LAGOON_MT_WITH_DELETE preprocessor symbol is set to a nonzero integer value.
virtual bool lagoon::meta_type::is_array | ( | void | ) | [pure virtual, inherited] |
Returns true if the reflected type is an array type.
Available only if either the LAGOON_MT_WITH_IS_ARRAY or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual bool lagoon::meta_type::is_const | ( | void | ) | [pure virtual, inherited] |
Returns true if the reflected type is const.
Available only if either the LAGOON_MT_WITH_IS_CONST or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual bool lagoon::meta_type::is_copy_constructible | ( | void | ) | [pure virtual, inherited] |
Returns true if the type is copy constructible.
Available only if either the LAGOON_MT_WITH_IS_COPY_CONSTRUCTIBLE or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual bool lagoon::meta_type::is_default_constructible | ( | void | ) | [pure virtual, inherited] |
Returns true if the type is default constructible.
Available only if either the LAGOON_MT_WITH_IS_DEFAULT_CONSTRUCTIBLE or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual bool lagoon::meta_type::is_pointer | ( | void | ) | [pure virtual, inherited] |
Returns true if the reflected type is a pointer.
Available only if either the LAGOON_MT_WITH_IS_POINTER or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual bool lagoon::meta_type::is_reference | ( | void | ) | [pure virtual, inherited] |
Returns true if the reflected type is a reference.
Available only if either the LAGOON_MT_WITH_IS_REFERENCE or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual bool lagoon::meta_type::is_volatile | ( | void | ) | [pure virtual, inherited] |
Returns true if the reflected type is volatile.
Available only if either the LAGOON_MT_WITH_IS_VOLATILE or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
virtual std::string lagoon::meta_named_scoped_object::local_name | ( | void | ) | [pure virtual, inherited] |
Returns the local name of the reflected construct.
Available only if the LAGOON_MNSO_WITH_LOCAL_NAME preprocessor symbol is set to a nonzero integer value.
virtual std::unique_ptr<polymorph_factory> lagoon::meta_type::make_factory | ( | polymorph_factory_builder & | builder, |
raw_ptr | build_data | ||
) | [pure virtual, inherited] |
Make a polymorphic factory, built by the passed factory builder.
Available only if the LAGOON_MT_WITH_MAKE_FACTORY preprocessor symbol is set to a nonzero integer value.
virtual shared_raw_ptr lagoon::meta_type::make_shared | ( | raw_ptr | source | ) | [pure virtual, inherited] |
Make a shared raw pointer from an unmanaged raw pointer.
Available only if the LAGOON_MT_WITH_MAKE_SHARED preprocessor symbol is set to a nonzero integer value.
virtual unique_raw_ptr lagoon::meta_type::make_unique | ( | raw_ptr | source | ) | [pure virtual, inherited] |
Make a shared raw pointer from an unmanaged raw pointer.
Available only if the LAGOON_MT_WITH_MAKE_UNIQUE preprocessor symbol is set to a nonzero integer value.
virtual raw_ptr lagoon::meta_type::new_ | ( | void | ) | [pure virtual, inherited] |
Allocates and constructs a new instance of the reflected type.
This member function returns a pointer to a newly allocated and default-constructed instance of the type reflected by this meta-type if the base-level type has a default constructor. If the reflected type does not have a default constructor, this function returns a null pointer.
Available only if the LAGOON_MT_WITH_NEW preprocessor symbol is set to a nonzero integer value.
Allocates and copy-constructs a new instance of the reflected type.
This member function returns a pointer to a newly allocated and copy-constructed instance of the type reflected by this meta-type if the base-level type has a copy constructor and a valid pointer to an instance to copy from is provided. If the reflected type does not have a default constructor, this function returns a null pointer.
Available only if the LAGOON_MT_WITH_NEW_COPY preprocessor symbol is set to a nonzero integer value.
source | a valid pointer to an instance to copy from. If a null pointer is provided or the type does not match the constructed type the result is undefined. Most probably this will cause the application to be aborted in debug builds. |
Returns a meta_type without the const qualifier.
Available only if either the LAGOON_MT_WITH_REMOVE_CONST or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
Returns a meta_type without the const and volatile qualifiers.
Available only if either the LAGOON_MT_WITH_REMOVE_CV or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
Returns a meta_type with an array extent removed.
Available only if either the LAGOON_MT_WITH_REMOVE_EXTENT or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
Returns a meta_type with one level of pointer indirection removed.
Available only if either the LAGOON_MT_WITH_REMOVE_POINTER or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
Returns a meta_type with one level of reference indirection removed.
Available only if either the LAGOON_MT_WITH_REMOVE_REFERENCE or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.
Returns a meta_type without the volatile qualifier.
Available only if either the LAGOON_MT_WITH_REMOVE_VOLATILE or the LAGOON_ALL_TYPE_TRAITS preprocessor symbol is set to a nonzero integer value.