Implementation of type registering and reflection.
More...
#include <mirror/preprocessor.hpp>
#include <mirror/meta_namespace.hpp>
#include <mirror/auxiliary/template_type_name.hpp>
#include <mirror/auxiliary/meta_type.hpp>
#include <mirror/ct_string/basic_string.hpp>
#include <mirror/meta_prog/lambda.hpp>
Go to the source code of this file.
Classes |
struct | mirror::type_category< T > |
| Meta-function template returning the ElaboratedTypeTag for a type. More...
|
struct | mirror::reflected< Type > |
| Meta-function reflecting the type passed as template parameter. More...
|
struct | mirror::reflected_type< Type > |
| Template, instantiations of which conform to the MetaType concept. More...
|
struct | mirror::apply_modifier< MetaType, ModifierExpr > |
| Meta-function returning MetaType reflecting a modified original type. More...
|
Namespaces |
namespace | mirror |
| All Mirror's types, classes, functions, etc. are defined in this namespace.
|
Defines |
#define | MIRROR_REG_GLOBAL_SCOPE_TYPE_BASICS(KIND, NAME, SPELLED) |
#define | MIRROR_REG_GLOBAL_SCOPE_TYPE_CTS(NAME, SPELLED) |
#define | MIRROR_REG_GLOBAL_SCOPE_TYPE(NAME) |
| This macro registers a type defined in the global scope with Mirror.
|
#define | MIRROR_REG_TYPE_BASICS(KIND, NAMESPACE, NAME, SPELLED) |
#define | MIRROR_REG_TYPE_CTS(NAMESPACE, NAME, SPELLED) |
#define | MIRROR_REG_TYPE(NAMESPACE, NAME) |
| This macro registers a type nested in a named namespace with Mirror.
|
#define | MIRROR_REG_NESTED_TYPE_BASICS(KIND, PARENT_CLASS, NAME, SPELLED) |
#define | MIRRORED_TYPE(FULL_TYPE_NAME) mirror::MetaType |
| Reflects the type passed as the FULL_TYPE_NAME argument.
|
Functions |
template<typename T > |
type_category< T >::type | mirror::categorize_type (const T &) |
| Function returning the ElaboratedTypeTag for the type of its argument.
|
Detailed Description
Implementation of type registering and reflection.
Copyright 2008-2011 Matus Chochlik. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Define Documentation
#define MIRROR_REG_GLOBAL_SCOPE_TYPE_BASICS |
( |
|
KIND, |
|
|
|
NAME, |
|
|
|
SPELLED |
|
) |
| |
Value:namespace _type { \
template <> \
struct _< NAME > \
{ \
typedef meta_type_tag category; \
typedef mirror::spec_ ## KIND ## _tag kind; \
typedef mirror::_namespace::_ scope; \
MIRROR_IMPLEMENT_META_OBJECT_NAME_FUNCTIONS(#NAME) \
typedef typename mirror::cts::string< \
MIRROR_PP_EXPAND_ARGS SPELLED \
>::type ct_name; \
}; \
}
#define MIRROR_REG_GLOBAL_SCOPE_TYPE_CTS |
( |
|
NAME, |
|
|
|
SPELLED |
|
) |
| |
Value:MIRROR_REG_GLOBAL_SCOPE_TYPE_BASICS(type, NAME, SPELLED) \
MIRROR_ADD_TO_GLOBAL_LIST( \
mirror::_namespace::_, \
mirror::meta_type< NAME > \
)
#define MIRROR_REG_NESTED_TYPE_BASICS |
( |
|
KIND, |
|
|
|
PARENT_CLASS, |
|
|
|
NAME, |
|
|
|
SPELLED |
|
) |
| |
Value:namespace _type { \
template <> \
struct _< :: PARENT_CLASS :: NAME > \
{ \
typedef meta_type_tag category; \
typedef mirror::spec_ ## KIND ## _tag kind; \
typedef mirror::_class::_< :: PARENT_CLASS > scope; \
MIRROR_IMPLEMENT_META_OBJECT_NAME_FUNCTIONS(#NAME) \
typedef typename mirror::cts::string< \
MIRROR_PP_EXPAND_ARGS SPELLED \
>::type ct_name; \
}; \
}
#define MIRROR_REG_TYPE_BASICS |
( |
|
KIND, |
|
|
|
NAMESPACE, |
|
|
|
NAME, |
|
|
|
SPELLED |
|
) |
| |
Value:namespace _type { \
template <> \
struct _< :: NAMESPACE :: NAME > \
{ \
typedef meta_type_tag category; \
typedef mirror::spec_ ## KIND ## _tag kind; \
typedef mirror::_namespace:: NAMESPACE ::_ scope; \
MIRROR_IMPLEMENT_META_OBJECT_NAME_FUNCTIONS(#NAME) \
typedef typename mirror::cts::string< \
MIRROR_PP_EXPAND_ARGS SPELLED \
>::type ct_name; \
}; \
}
#define MIRROR_REG_TYPE_CTS |
( |
|
NAMESPACE, |
|
|
|
NAME, |
|
|
|
SPELLED |
|
) |
| |
Value:MIRROR_REG_TYPE_BASICS(type, NAMESPACE, NAME, SPELLED) \
MIRROR_ADD_TO_GLOBAL_LIST( \
mirror::_namespace :: NAMESPACE :: _, \
mirror::meta_type< :: NAMESPACE :: NAME > \
)