Mirror reflection library 0.5.13
Namespaces | Defines

mirror/meta_type_template.hpp File Reference

Implementation of type registering and reflection. More...

#include <mirror/meta_namespace.hpp>
#include <mirror/preprocessor.hpp>
Include dependency graph for meta_type_template.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.

Detailed Description

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 Documentation

#define MIRROR_REG_CLASS_TEMPLATE_BEGIN_CTS (   TEMPLATE_PARAMS,
  ELABORATED_TYPE,
  NAMESPACE,
  CLASS,
  SPELLED,
  PARAM_LIST 
)
Value:
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 
)
Value:
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 
)
Value:
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 > \
)

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.