Mirror reflection library 0.5.13
Namespaces | Defines

mirror/meta_function.hpp File Reference

Registering/Reflection of free functions. More...

#include <mirror/mirror_fwd.hpp>
#include <mirror/meta_object_tags.hpp>
#include <mirror/meta_namespace.hpp>
#include <mirror/auxiliary/default_spec_tags.hpp>
#include <mirror/auxiliary/free_functions.hpp>
#include <mirror/meta_prog/only_if.hpp>
#include <type_traits>
Include dependency graph for meta_function.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_FREE_OVLD_FUNC_COMMON_HLPR_CTS(NAME, SPELLED)
#define MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_BEGIN_CTS(NAME, SPELLED)
#define MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_END(NAME)
 Ends the registering of a set of overloaded functions from the global scope.
#define MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_BEGIN(NAME)
 Registers a set of overloaded functions from the global scope with Mirror.
#define MIRROR_REG_FREE_OVLD_FUNC_BEGIN_CTS(NAMESPACE, NAME, SPELLED)
#define MIRROR_REG_FREE_OVLD_FUNC_END(NAMESPACE, NAME)
 Ends the registering of a set of nested overloaded functions.
#define MIRROR_REG_FREE_FUNCTION_BEGIN(LINKAGE, RESULT_TYPE, ID)
 Starts the definition of one of function overloads.
#define MIRROR_REG_FREE_FUNCTION_END(ID)
 Ends the definition of one of function overloads.
#define MIRROR_REG_FREE_FUNCTION_PARAM_CTS(TYPE, NAME, SPELLED)
#define MIRROR_REG_FREE_FUNCTION_PARAM(TYPE, NAME)
#define MIRRORED_FREE_FUNCTIONS(NAMESPACE, NAME)   mirror::MetaOverloadedFunctions
 Reflects a set of functions named NAME defined in the NAMESPACE namespace.
#define MIRRORED_GLOBAL_SCOPE_FUNCTIONS(NAME)   mirror::MetaOverloadedFunctions
 Reflects a set of functions named NAME defined in the global scope.

Detailed Description

Registering/Reflection of free functions.

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_FREE_FUNCTION_PARAM (   TYPE,
  NAME 
)

This macro must be used between the MIRROR_REG_FREE_FUNCTION_BEGIN and the MIRROR_REG_FREE_FUNCTION_END macros. The parameters must be registered in the same order as they appear in the function.

Parameters:
TYPEthe type of the parameter.
NAMEthe name of the parameter.
#define MIRROR_REG_FREE_FUNCTION_PARAM_CTS (   TYPE,
  NAME,
  SPELLED 
)
Value:
param_idx_ ## NAME; \
        template <typename _That> \
        struct atr_typ_hlp_ ## NAME \
        { \
            typedef decltype(attr_type((TYPE*)nullptr, &_That::NAME))\
                type; \
        }; \
        static mirror::mp::identity<TYPE> \
        type(param_idx_ ## NAME); \
        static const char* name( param_idx_ ## NAME) \
        { \
            return #NAME; \
        } \
        static size_t name_length( param_idx_ ## NAME) \
        { \
            return sizeof(#NAME) - 1; \
        } \
        static typename mirror::cts::string< \
            MIRROR_PP_EXPAND_ARGS SPELLED \
        >::type ct_name(param_idx_ ## NAME); \
        typedef std::integral_constant<int, param_idx_ ## NAME ::value + 1>
#define MIRROR_REG_FREE_OVLD_FUNC_BEGIN_CTS (   NAMESPACE,
  NAME,
  SPELLED 
)
Value:
namespace _function { \
template <typename Namespace> struct _ ## NAME; \
template <> struct _ ## NAME< mirror::_namespace:: NAMESPACE ::_ >\
{  \
    typedef mirror::_namespace:: NAMESPACE ::_ scope; \
    MIRROR_REG_FREE_OVLD_FUNC_COMMON_HLPR_CTS( \
        NAME, \
        SPELLED \
    ) \
#define MIRROR_REG_FREE_OVLD_FUNC_COMMON_HLPR_CTS (   NAME,
  SPELLED 
)
Value:
MIRROR_IMPLEMENT_META_OBJECT_NAME_FUNCTIONS(#NAME) \
    typedef typename mirror::cts::string< \
        MIRROR_PP_EXPAND_ARGS SPELLED \
    >::type ct_name; \
    template <typename X> \
    struct by_name_typ \
    { \
        typedef X NAME; \
    }; \
    typedef std::integral_constant<int, 0>
#define MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_BEGIN_CTS (   NAME,
  SPELLED 
)
Value:
namespace _function { \
template <typename Namespace> struct _ ## NAME; \
template <> struct _ ## NAME< mirror::_namespace::_ >\
{  \
    typedef mirror::_namespace::_ scope; \
    MIRROR_REG_FREE_OVLD_FUNC_COMMON_HLPR_CTS( \
        NAME, \
        SPELLED \
    )

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.