Mirror reflection library 0.5.13
|
Implementation of type registering and reflection. More...
#include <mirror/meta_namespace.hpp>
#include <mirror/preprocessor.hpp>
Go to the source code of this file.
Namespaces | |
namespace | mirror |
All Mirror's types, classes, functions, etc. are defined in this namespace. | |
Defines | |
#define | MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE_CTS(ELABORATED_TYPE, NAME, SPELLED) |
#define | MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE(ELABORATED_TYPE, NAME) |
This macro registers a class template defined in the global scope. | |
#define | MIRROR_REG_GLOBAL_SCOPE_TYPE_TEMPLATE_CTS(NAME, SPELLED) MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE_CTS(type, NAME, SPELLED) |
#define | MIRROR_REG_GLOBAL_SCOPE_TYPE_TEMPLATE(NAME) |
This macro registers a type template defined in the global scope. | |
#define | MIRROR_REG_CLASS_TEMPLATE_CTS(ELABORATED_TYPE, NAMESPACE, NAME, SPELLED) |
#define | MIRROR_REG_CLASS_TEMPLATE(ELABORATED_TYPE, NAMESPACE, NAME) |
This macro registers a template class nested in a named namespace with Mirror. | |
#define | MIRROR_REG_TYPE_TEMPLATE_CTS(NAMESPACE, NAME, SPELLED) MIRROR_REG_CLASS_TEMPLATE_CTS(type, NAMESPACE, NAME, SPELLED) |
#define | MIRROR_REG_TYPE_TEMPLATE(NAMESPACE, NAME) |
This macro registers a template type nested in a named namespace with Mirror. | |
#define | MIRROR_REG_CLASS_TEMPLATE_BEGIN_CTS(TEMPLATE_PARAMS, ELABORATED_TYPE, NAMESPACE, CLASS, SPELLED, PARAM_LIST) |
#define | MIRROR_REG_CLASS_TEMPLATE_BEGIN(TEMPLATE_PARAMS, ELABORATED_TYPE, NAMESPACE, CLASS, PARAM_LIST) |
This macro begins the registering of a class template with Mirror. | |
#define | MIRRORED_TEMPLATE(FULL_TEMPLATE_NAME) mirror::MetaTypeTemplate |
Reflects the template passed as the FULL_TEMPLATE_NAME argument. |
Implementation of type registering and reflection.
Copyright 2008-2010 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 MIRROR_REG_CLASS_TEMPLATE_BEGIN_CTS | ( | TEMPLATE_PARAMS, | |
ELABORATED_TYPE, | |||
NAMESPACE, | |||
CLASS, | |||
SPELLED, | |||
PARAM_LIST | |||
) |
MIRROR_REG_CLASS_TEMPLATE_CTS(ELABORATED_TYPE, NAMESPACE, CLASS, SPELLED) \ namespace _class { \ template < MIRROR_PP_EXPAND_ARGS TEMPLATE_PARAMS > \ struct _< :: NAMESPACE :: CLASS < \ MIRROR_PP_EXPAND_ARGS PARAM_LIST \ > > \ : _defaults< :: NAMESPACE :: CLASS < \ MIRROR_PP_EXPAND_ARGS PARAM_LIST \ >, spec_ ## ELABORATED_TYPE ## _tag > \ { \ typedef spec_ ## ELABORATED_TYPE ## _tag kind; \ typedef :: NAMESPACE :: CLASS < \ MIRROR_PP_EXPAND_ARGS PARAM_LIST \ > _this;
#define MIRROR_REG_CLASS_TEMPLATE_CTS | ( | ELABORATED_TYPE, | |
NAMESPACE, | |||
NAME, | |||
SPELLED | |||
) |
namespace _template { \ template <> \ struct _< :: NAMESPACE :: NAME > \ { \ typedef meta_type_template_tag category; \ typedef spec_ ## ELABORATED_TYPE ## _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; \ }; \ } MIRROR_ADD_TO_GLOBAL_LIST( \ mirror::_namespace:: NAMESPACE ::_, \ mirror::meta_type_template< :: NAMESPACE :: NAME > \ )
#define MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE_CTS | ( | ELABORATED_TYPE, | |
NAME, | |||
SPELLED | |||
) |
namespace _template { \ template <> \ struct _< NAME > \ { \ typedef meta_type_template_tag category; \ typedef spec_ ## ELABORATED_TYPE ## _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; \ }; \ } MIRROR_ADD_TO_GLOBAL_LIST( \ mirror::_namespace::_, \ mirror::meta_type_template< NAME > \ )