Mirror reflection library - Lagoon run-time layer 0.5.13

lagoon::meta_class Struct Reference

#include <lagoon/interfaces.hpp>

Inheritance diagram for lagoon::meta_class:
Collaboration diagram for lagoon::meta_class:

List of all members.

Public Member Functions

virtual shared
< elaborated_type_specifier > 
elaborated_type (void)=0
 returns the elaborated type specifier
virtual range< meta_inheritancebase_classes (void)=0
 This member function returns the base clases of this class.
virtual range< meta_classclass_layout (void)=0
 This member function returns the layout of this class.
virtual range
< meta_member_variable
member_variables (void)=0
 This function returns the member variables of this class.
virtual range
< meta_member_variable
all_member_variables (void)=0
 This function returns all member variables of this class.
virtual range
< meta_overloaded_functions
member_functions (void)=0
 Returns the (overloaded) member functions of this class.
virtual range
< meta_conversion_operator
conversions (void)=0
 This function returns the conversion operators of this class.
virtual range< meta_constructorconstructors (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_objectself (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_typeadd_const (void)=0
 Returns a meta_type with added const qualifier.
virtual shared< meta_typeadd_cv (void)=0
 Returns a meta_type with added const and volatile qualifiers.
virtual shared< meta_typeadd_volatile (void)=0
 Returns a meta_type with added volatile qualifier.
virtual shared< meta_typeremove_const (void)=0
 Returns a meta_type without the const qualifier.
virtual shared< meta_typeremove_cv (void)=0
 Returns a meta_type without the const and volatile qualifiers.
virtual shared< meta_typeremove_pointer (void)=0
 Returns a meta_type with one level of pointer indirection removed.
virtual shared< meta_typeremove_reference (void)=0
 Returns a meta_type with one level of reference indirection removed.
virtual shared< meta_typeremove_volatile (void)=0
 Returns a meta_type without the volatile qualifier.
virtual shared< meta_typeremove_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)

Private Member Functions

virtual range
< meta_named_scoped_object
members (void)=0
 This member function returns the members of the scope.
template<typename Interface >
shared< Interface > find_member (const std::string &name)
 Convenience member function for finding a member by base_name.

Detailed Description

This interface provides meta-data about a class

See also:
mirror::MetaClass
Examples:

lagoon/example/class_layout_01.cpp, and lagoon/example/members_02.cpp.


Member Function Documentation

virtual shared<meta_type> lagoon::meta_type::add_const ( void  ) [pure virtual, inherited]

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.

virtual shared<meta_type> lagoon::meta_type::add_cv ( void  ) [pure virtual, inherited]

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.

virtual shared<meta_type> lagoon::meta_type::add_volatile ( void  ) [pure virtual, inherited]

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 range<meta_member_variable> lagoon::meta_class::all_member_variables ( void  ) [pure virtual]

This function returns all member variables of this class.

Available only if the LAGOON_MC_WITH_ALL_MEMBER_VARIABLES preprocessor symbol is set to a nonzero integer value.

See also:
member_variables
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.

See also:
new_
new_copy
make_factory
make_shared
make_unique
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.

See also:
base_name
full_name
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.

See also:
new_
new_copy
make_shared
make_unique
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.

See also:
new_
new_copy
make_factory
make_unique
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.

See also:
new_
new_copy
make_factory
make_shared
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.

See also:
mirror::is_default_constructible
new_copy
delete_
make_factory
virtual raw_ptr lagoon::meta_type::new_copy ( raw_ptr  source) [pure virtual, inherited]

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.

Parameters:
sourcea 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.
See also:
mirror::is_copy_constructible
new_copy
delete_
make_factory
virtual shared<meta_type> lagoon::meta_type::remove_const ( void  ) [pure virtual, inherited]

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.

virtual shared<meta_type> lagoon::meta_type::remove_cv ( void  ) [pure virtual, inherited]

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.

virtual shared<meta_type> lagoon::meta_type::remove_extent ( void  ) [pure virtual, inherited]

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.

virtual shared<meta_type> lagoon::meta_type::remove_pointer ( void  ) [pure virtual, inherited]

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.

virtual shared<meta_type> lagoon::meta_type::remove_reference ( void  ) [pure virtual, inherited]

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.

virtual shared<meta_type> lagoon::meta_type::remove_volatile ( void  ) [pure virtual, inherited]

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.


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

Copyright © 2006-2011 Matus Chochlik, University of Zilina, Zilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Fri Dec 16 2011 by Doxygen (version 1.7.3).
Important note: Although the 'boostified' version of Mirror uses the Boost C++ libraries Coding Guidelines and is implemented inside of the boost namespace, it IS NOT an officially reviewed and accepted Boost library. Mirror is being developed with the intention to be submitted for review for inclusion to the Boost C++ libraries.