Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52744 - in sandbox/mirror: boost/mirror boost/mirror/detail libs/mirror/example/factories
From: chochlik_at_[hidden]
Date: 2009-05-02 15:21:44


Author: matus.chochlik
Date: 2009-05-02 15:21:43 EDT (Sat, 02 May 2009)
New Revision: 52744
URL: http://svn.boost.org/trac/boost/changeset/52744

Log:
[mirror 0.4.x]
- done some refactoring of meta_constructors
- updated the implementation of meta-member-functions

Added:
   sandbox/mirror/boost/mirror/detail/function_meta_data.hpp (contents, props changed)
Text files modified:
   sandbox/mirror/boost/mirror/meta_constructors.hpp | 257 +++------------------
   sandbox/mirror/boost/mirror/meta_mem_functions.hpp | 484 ++++++++++++++-------------------------
   sandbox/mirror/libs/mirror/example/factories/inserter.cpp | 8
   sandbox/mirror/libs/mirror/example/factories/person.hpp | 34 -
   4 files changed, 225 insertions(+), 558 deletions(-)

Added: sandbox/mirror/boost/mirror/detail/function_meta_data.hpp
==============================================================================
--- (empty file)
+++ sandbox/mirror/boost/mirror/detail/function_meta_data.hpp 2009-05-02 15:21:43 EDT (Sat, 02 May 2009)
@@ -0,0 +1,325 @@
+/**
+ * \file boost/mirror/detail/function_meta_data.hpp
+ *
+ * Base template used in meta-constructors, meta-member-functions
+ *
+ * Copyright 2009 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)
+ */
+
+#ifndef BOOST_MIRROR_META_DETAIL_FUNCTION_META_DATA_HPP
+#define BOOST_MIRROR_META_DETAIL_FUNCTION_META_DATA_HPP
+
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/push_back.hpp>
+
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/comparison/not_equal.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <boost/preprocessor/wstringize.hpp>
+#include <boost/preprocessor/logical/and.hpp>
+#include <boost/preprocessor/logical/not.hpp>
+#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/array/elem.hpp>
+
+#include <boost/char_type_switch/string.hpp>
+#include <boost/mirror/meta_data_fwd.hpp>
+
+
+namespace boost {
+namespace mirror {
+namespace detail {
+
+template <class BaseMetaData, class FunctionIndex>
+struct meta_function
+{
+ typedef typename BaseMetaData::template get_scope<FunctionIndex>::type
+ scope;
+ // returns the name of the member function
+ template <bool FullOrBase, class CharT>
+ inline static const ::std::basic_string<CharT>&
+ get_name(
+ mpl::bool_<FullOrBase> full_or_base,
+ const ::std::char_traits<CharT>& traits
+ )
+ {
+ return BaseMetaData::get_function_name(
+ full_or_base,
+ traits,
+ FunctionIndex()
+ );
+ }
+
+ // returns the base name of the member function
+ inline static const cts::bstring&
+ base_name(void)
+ {
+ return BaseMetaData::get_function_name(
+ mpl::false_(),
+ cts::bchar_traits(),
+ FunctionIndex()
+ );
+ }
+
+
+ // meta-data about the parameters of the function
+ struct params
+ {
+ private:
+ typedef typename mpl::at<
+ typename BaseMetaData::param_type_lists,
+ FunctionIndex
+ >::type type_list;
+ public:
+ // some meta-data about the i-th param
+ template <class ParamIndex>
+ struct param
+ {
+ private:
+ typedef typename mpl::at<
+ type_list,
+ ParamIndex
+ >::type param_type;
+ public:
+ typedef BOOST_MIRRORED_TYPE(param_type)
+ type;
+
+ template <class CharT>
+ inline static const ::std::basic_string<CharT>&
+ get_name(
+ mpl::false_ full_or_base,
+ const ::std::char_traits<CharT>& traits
+ )
+ {
+ return BaseMetaData::get_param_name(
+ full_or_base,
+ traits,
+ FunctionIndex(),
+ ParamIndex()
+ );
+ }
+
+ inline static const cts::bstring& base_name(void)
+ {
+ return BaseMetaData::get_param_name(
+ mpl::false_(),
+ cts::bchar_traits(),
+ FunctionIndex(),
+ ParamIndex()
+ );
+ }
+ };
+
+ // the count of parameters
+ typedef mpl::int_<
+ mpl::size< type_list>::value
+ > size;
+
+ // executes the given binary functor on all
+ // parameters of the i-th function
+ template <class Functor>
+ static void for_each(Functor f)
+ {
+ call_for_each(f, mpl::int_<0>());
+ }
+ private:
+ template <class Functor, class ParamIndex>
+ static inline void call_for_each(
+ Functor func,
+ ParamIndex pi
+ )
+ {
+ func((params*)0, pi);
+ call_for_each(
+ func,
+ typename mpl::next<ParamIndex>::type()
+ );
+ }
+
+ template <class Functor>
+ static inline void call_for_each(const Functor&, size)
+ {
+ }
+ };
+};
+
+/** Registers the parameter name of the j-th parameter
+ * of the i-th constructor
+ */
+#define BOOST_MIRROR_IMPLEMENT_META_FUNCTION_GET_PARAM_NAME( \
+ FUNCTION, \
+ PARAM, \
+ NAME, \
+ CHAR_T \
+) \
+inline static const ::std::basic_string< CHAR_T >& get_param_name( \
+ mpl::false_, \
+ const ::std::char_traits< CHAR_T >&, \
+ mpl::int_< FUNCTION >, \
+ mpl::int_< PARAM > \
+) \
+{ \
+ static ::std::basic_string< CHAR_T > result( \
+ BOOST_CTS_STRINGIZE_CHAR_T( CHAR_T, NAME ) \
+ ); \
+ return result; \
+}
+
+/** Helper macro which unpacks the parameters before
+ * calling the BOOST_MIRROR_IMPLEMENT_FUNCTION_GET_PARAM_NAME
+ * macro
+ */
+#define BOOST_MIRROR_IMPLEMENT_META_FUNCTION_GET_PARAM_NAME_HELPER(\
+ R, \
+ PARAMS, \
+ I, \
+ CHAR_T \
+) BOOST_MIRROR_IMPLEMENT_META_FUNCTION_GET_PARAM_NAME( \
+ BOOST_PP_ARRAY_ELEM(0, PARAMS), \
+ BOOST_PP_ARRAY_ELEM(1, PARAMS), \
+ BOOST_PP_ARRAY_ELEM(2, PARAMS), \
+ CHAR_T \
+)
+
+/** Registers the function parameter name for all character types
+ */
+#define BOOST_MIRROR_REG_META_FUNCTION_PARAM_NAME_HELPER( \
+ R, \
+ FUNCTION, \
+ PARAM, \
+ NAME\
+) BOOST_CTS_FOR_EACH_CHAR_T_2( \
+ BOOST_MIRROR_IMPLEMENT_META_FUNCTION_GET_PARAM_NAME_HELPER, \
+ (3, (FUNCTION, PARAM, NAME)) \
+)
+
+/** Helper macro which expands into the type of the j-th parameter
+ * preceeded by a comma if it is not the first parameter
+ */
+#define BOOST_MIRROR_REG_META_FUNCTION_EXTRACT_PARAM_TYPE( \
+ R, X, \
+ PARAM_INDEX, \
+ TYPE_AND_NAME \
+) BOOST_PP_COMMA_IF(PARAM_INDEX) BOOST_PP_SEQ_HEAD(TYPE_AND_NAME)
+
+
+
+/** Calls the BOOST_MIRROR_REG_META_FUNCTION_PARAM_NAME macro
+ * in repetitions.
+ */
+#define BOOST_MIRROR_REG_META_FUNCTION_PARAM_NAME_HELPER_2(\
+ R, \
+ FUNCTION_INDEX, \
+ PARAM_INDEX, \
+ TYPE_AND_NAME \
+) BOOST_MIRROR_REG_META_FUNCTION_PARAM_NAME_HELPER( \
+ R, \
+ FUNCTION_INDEX, \
+ PARAM_INDEX, \
+ BOOST_PP_SEQ_HEAD(BOOST_PP_SEQ_TAIL(TYPE_AND_NAME)) \
+)
+
+#define BOOST_MIRROR_REG_META_FUNCTION_PARAM_NAMES( \
+ FUNCTION_INDEX, \
+ PARAM_SEQ \
+) BOOST_PP_SEQ_FOR_EACH_I( \
+ BOOST_MIRROR_REG_META_FUNCTION_PARAM_NAME_HELPER_2, \
+ FUNCTION_INDEX, \
+ PARAM_SEQ \
+) \
+
+/** Adds the parameter typelist to the list storing
+ * storing the parameter types for the individual constructors
+ */
+#define BOOST_MIRROR_REG_META_FUNCTION_PUSH_BACK_PARAM_TYPES( \
+ FUNCTION_INDEX, \
+ TYPENAME_KW \
+) typedef TYPENAME_KW mpl::push_back< \
+ BOOST_PP_CAT(param_type_lists_, FUNCTION_INDEX), \
+ BOOST_PP_CAT(BOOST_PP_CAT(function_, FUNCTION_INDEX), _params)\
+ >::type
+
+/** Decides whether the PARAM_SEQ is a argument sequence for
+ * a function without parameters
+ */
+#define BOOST_MIRROR_IS_VOID_FN_ARG_LIST(PARAM_SEQ) \
+ BOOST_PP_AND( \
+ BOOST_PP_EQUAL(BOOST_PP_SEQ_SIZE(PARAM_SEQ),1), \
+ BOOST_PP_EQUAL( \
+ BOOST_PP_SEQ_SIZE( \
+ BOOST_PP_SEQ_HEAD(PARAM_SEQ) \
+ ),1 \
+ ) \
+ )
+
+/** Begins the registering of template class' members
+ */
+#define BOOST_MIRROR_REG_TEMPLATE_META_FUNCTIONS_BEGIN( \
+ TEMPLATE, \
+ TEMPL_ARG_COUNT, \
+ META_FUNCTIONS_BASE \
+)\
+template < BOOST_PP_ENUM_PARAMS(TEMPL_ARG_COUNT, typename T) > \
+struct META_FUNCTIONS_BASE< \
+ TEMPLATE < BOOST_PP_ENUM_PARAMS(TEMPL_ARG_COUNT, T) > \
+> \
+{ \
+ template <class FunctionIndex> \
+ struct get_scope \
+ { \
+ typedef TEMPLATE < BOOST_PP_ENUM_PARAMS(TEMPL_ARG_COUNT, T) >\
+ _templ; \
+ typedef BOOST_MIRRORED_CLASS(_templ) type; \
+ }; \
+ typedef mpl::vector0<>
+
+
+/** Begins the registering of class' constructors
+ */
+#define BOOST_MIRROR_REG_META_FUNCTIONS_BEGIN(CLASS, META_FUNCTIONS_BASE) \
+template <> \
+struct META_FUNCTIONS_BASE < CLASS > \
+{ \
+ template <class FunctionIndex> \
+ struct get_scope \
+ { \
+ typedef BOOST_MIRRORED_CLASS(CLASS) type; \
+ }; \
+ typedef mpl::vector0<>
+
+#define BOOST_MIRROR_REG_META_FUNCTION_DEFINE_PARAM_TYPELIST( \
+ FUNC_INDEX, \
+ PARAM_SEQ \
+) \
+typedef BOOST_PP_CAT(mpl::vector, BOOST_PP_SEQ_SIZE(PARAM_SEQ)) < \
+ BOOST_PP_SEQ_FOR_EACH_I( \
+ BOOST_MIRROR_REG_META_FUNCTION_EXTRACT_PARAM_TYPE, \
+ 0, \
+ PARAM_SEQ \
+ ) \
+> BOOST_PP_CAT(BOOST_PP_CAT(function_, FUNC_INDEX), _params) ;
+
+#define BOOST_MIRROR_REG_META_FUNCTION_DEFINE_EMPTY_PARAM_TYPELIST(FUNC_INDEX) \
+ typedef mpl::vector0< \
+ > BOOST_PP_CAT(BOOST_PP_CAT(function_, FUNC_INDEX), _params) ;
+
+
+} // namespace detail
+} // namespace mirror
+} // namespace boost
+
+#endif //include guard
+

Modified: sandbox/mirror/boost/mirror/meta_constructors.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/meta_constructors.hpp (original)
+++ sandbox/mirror/boost/mirror/meta_constructors.hpp 2009-05-02 15:21:43 EDT (Sat, 02 May 2009)
@@ -10,33 +10,7 @@
 #ifndef BOOST_MIRROR_META_CONSTRUCTORS_HPP
 #define BOOST_MIRROR_META_CONSTRUCTORS_HPP
 
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/size.hpp>
-#include <boost/mpl/accumulate.hpp>
-#include <boost/mpl/push_back.hpp>
-
-#include <boost/preprocessor/repetition/enum.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <boost/preprocessor/seq/seq.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/comparison/not_equal.hpp>
-#include <boost/preprocessor/comparison/equal.hpp>
-#include <boost/preprocessor/seq/for_each.hpp>
-#include <boost/preprocessor/seq/for_each_i.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
-#include <boost/preprocessor/stringize.hpp>
-#include <boost/preprocessor/wstringize.hpp>
-#include <boost/preprocessor/logical/and.hpp>
-#include <boost/preprocessor/logical/not.hpp>
-#include <boost/preprocessor/arithmetic/sub.hpp>
-#include <boost/preprocessor/array/elem.hpp>
-
-#include <boost/char_type_switch/string.hpp>
-#include <boost/mirror/meta_data_fwd.hpp>
+#include <boost/mirror/detail/function_meta_data.hpp>
 
 namespace boost {
 namespace mirror {
@@ -49,112 +23,50 @@
 /** Begins the registering of template class' constructors
  */
 #define BOOST_MIRROR_REG_TEMPLATE_CONSTRUCTORS_BEGIN(TEMPLATE, TEMPL_ARG_COUNT)\
-template < BOOST_PP_ENUM_PARAMS(TEMPL_ARG_COUNT, typename T) > \
-struct meta_constructors_base< \
- TEMPLATE < BOOST_PP_ENUM_PARAMS(TEMPL_ARG_COUNT, T) > \
-> \
-{ \
- typedef mpl::vector0<>
-
+BOOST_MIRROR_REG_TEMPLATE_META_FUNCTIONS_BEGIN( \
+ TEMPLATE, \
+ TEMPL_ARG_COUNT, \
+ meta_constructors_base \
+)
 
 /** Begins the registering of class' constructors
  */
 #define BOOST_MIRROR_REG_CONSTRUCTORS_BEGIN(CLASS) \
-template <> \
-struct meta_constructors_base< CLASS > \
-{ \
- typedef mpl::vector0<>
-
-/** Registers the parameter name of the j-th parameter
- * of the i-th constructor
- */
-#define BOOST_MIRROR_IMPLEMENT_CONSTRUCTOR_GET_PARAM_NAME( \
- CONSTRUCTOR, \
- PARAM, \
- NAME, \
- CHAR_T \
-) \
-inline static const ::std::basic_string< CHAR_T >& get_param_name( \
- mpl::false_, \
- const ::std::char_traits< CHAR_T >&, \
- mpl::int_< CONSTRUCTOR >, \
- mpl::int_< PARAM > \
-) \
-{ \
- static ::std::basic_string< CHAR_T > result( \
- BOOST_CTS_STRINGIZE_CHAR_T( CHAR_T, NAME ) \
- ); \
- return result; \
-}
-
-#define BOOST_MIRROR_IMPLEMENT_CONSTRUCTOR_GET_PARAM_NAME_HELPER(\
- R, PARAMS, I, CHAR_T \
-) BOOST_MIRROR_IMPLEMENT_CONSTRUCTOR_GET_PARAM_NAME( \
- BOOST_PP_ARRAY_ELEM(0, PARAMS), \
- BOOST_PP_ARRAY_ELEM(1, PARAMS), \
- BOOST_PP_ARRAY_ELEM(2, PARAMS), \
- CHAR_T \
-)
+BOOST_MIRROR_REG_META_FUNCTIONS_BEGIN(CLASS, meta_constructors_base)
+
+/** Implements the get_function_name helper member function
+ * for the meta-constructor-base class
+ */
+#define BOOST_MIRROR_REG_CONSTR_IMPL_GET_FUNCTION_NAME(R, DATA, I, CHAR_T) \
+ template <bool FullOrBase, class FunctionIndex> \
+ inline static const ::std::basic_string<CHAR_T>& \
+ get_function_name( \
+ mpl::bool_<FullOrBase> full_or_base, \
+ const ::std::char_traits<CHAR_T>& traits, \
+ FunctionIndex \
+ ) \
+ { \
+ typedef typename get_scope<FunctionIndex>::type scope; \
+ return scope::get_name(full_or_base, traits); \
+ }
 
-#define BOOST_MIRROR_REG_CONSTRUCTOR_PARAM_NAME(R,CONSTRUCTOR, PARAM, NAME) \
- BOOST_CTS_FOR_EACH_CHAR_T_2( \
- BOOST_MIRROR_IMPLEMENT_CONSTRUCTOR_GET_PARAM_NAME_HELPER, \
- (3, (CONSTRUCTOR, PARAM, NAME)) \
- )
 
 /** Ends the registering of (template) class' constructors
  */
 #define BOOST_MIRROR_REG_CONSTRUCTORS_END \
         param_type_lists; \
+ BOOST_CTS_FOR_EACH_CHAR_T( \
+ BOOST_MIRROR_REG_CONSTR_IMPL_GET_FUNCTION_NAME, \
+ _ \
+ ) \
 };
 
-
-/** Helper macro which expands into the type of the j-th parameter
- * preceeded by a comma if it is not the first parameter
- */
-#define BOOST_MIRROR_REG_CONSTR_EXTRACT_PARAM_TYPE( \
- R, X, \
- PARAM_INDEX, \
- TYPE_AND_NAME \
-) BOOST_PP_COMMA_IF(PARAM_INDEX) BOOST_PP_SEQ_HEAD(TYPE_AND_NAME)
-
-
-
-/** Calls the BOOST_MIRROR_REG_CONSTRUCTOR_PARAM_NAME macro
- * in repetitions.
- */
-#define BOOST_MIRROR_REG_CONSTR_REG_CALL_PARAM_NAME(\
- R, \
- CONSTR_INDEX, \
- PARAM_INDEX, \
- TYPE_AND_NAME \
-) BOOST_MIRROR_REG_CONSTRUCTOR_PARAM_NAME( \
- R, \
- CONSTR_INDEX, \
- PARAM_INDEX, \
- BOOST_PP_SEQ_HEAD(BOOST_PP_SEQ_TAIL(TYPE_AND_NAME)) \
- )
-
-
-/** Adds the parameter typelist to the list storing
- * storing the parameter types for the individual constructors
- */
-#define BOOST_MIRROR_REG_CONSTRUCTOR_PUSH_BACK_PARAM_TYPES( \
- CONSTR_INDEX, \
- TYPENAME_KW\
-) typedef TYPENAME_KW mpl::push_back< \
- BOOST_PP_CAT(param_type_lists_, CONSTR_INDEX), \
- BOOST_PP_CAT(BOOST_PP_CAT(constr_, CONSTR_INDEX), _params) \
- >::type
-
-
 /** Registers a single default constructor
  */
 #define BOOST_MIRROR_REG_DEFAULT_CONSTRUCTOR(CONSTR_INDEX) \
         param_type_lists_ ## CONSTR_INDEX ; \
- typedef mpl::vector0< \
- > BOOST_PP_CAT(BOOST_PP_CAT(constr_, CONSTR_INDEX), _params) ;\
- BOOST_MIRROR_REG_CONSTRUCTOR_PUSH_BACK_PARAM_TYPES(\
+ BOOST_MIRROR_REG_META_FUNCTION_DEFINE_EMPTY_PARAM_TYPELIST(CONSTR_INDEX)\
+ BOOST_MIRROR_REG_META_FUNCTION_PUSH_BACK_PARAM_TYPES(\
                 CONSTR_INDEX, \
                 BOOST_PP_EMPTY()\
         )
@@ -167,38 +79,20 @@
         TYPENAME_KW\
 ) \
         param_type_lists_ ## CONSTR_INDEX ; \
- typedef BOOST_PP_CAT(mpl::vector, BOOST_PP_SEQ_SIZE(PARAM_SEQ)) < \
- BOOST_PP_SEQ_FOR_EACH_I( \
- BOOST_MIRROR_REG_CONSTR_EXTRACT_PARAM_TYPE, \
- 0, \
- PARAM_SEQ \
- ) \
- > BOOST_PP_CAT(BOOST_PP_CAT(constr_, CONSTR_INDEX), _params) ;\
- BOOST_PP_SEQ_FOR_EACH_I( \
- BOOST_MIRROR_REG_CONSTR_REG_CALL_PARAM_NAME, \
+ BOOST_MIRROR_REG_META_FUNCTION_DEFINE_PARAM_TYPELIST( \
+ CONSTR_INDEX, \
+ PARAM_SEQ \
+ ) \
+ BOOST_MIRROR_REG_META_FUNCTION_PARAM_NAMES( \
                 CONSTR_INDEX, \
                 PARAM_SEQ \
         ) \
- BOOST_MIRROR_REG_CONSTRUCTOR_PUSH_BACK_PARAM_TYPES( \
+ BOOST_MIRROR_REG_META_FUNCTION_PUSH_BACK_PARAM_TYPES( \
                 CONSTR_INDEX, \
                 TYPENAME_KW \
         )
 
 
-
-/** Decides whether the PARAM_SEQ is a argument sequence for
- * a default constructor (having no parameters)
- */
-#define BOOST_MIRROR_IS_VOID_FN_ARG_LIST(PARAM_SEQ) \
- BOOST_PP_AND( \
- BOOST_PP_EQUAL(BOOST_PP_SEQ_SIZE(PARAM_SEQ),1), \
- BOOST_PP_EQUAL( \
- BOOST_PP_SEQ_SIZE( \
- BOOST_PP_SEQ_HEAD(PARAM_SEQ) \
- ),1 \
- ) \
- )
-
 /** expands into the default constructor registering macro
  */
 #define BOOST_MIRROR_REG_CLASS_OR_TEMPL_CONSTRUCTOR_1( \
@@ -277,8 +171,6 @@
 BOOST_MIRROR_REG_CONSTRUCTORS_END
 
 
-
-
 /** Helper macro which registers the constructors of
  * native C++ types and some other commonly used types
  * like strings.
@@ -314,85 +206,10 @@
 template <class Class /*, class VariantTag*/ >
 struct meta_constructors : public meta_constructors_base<Class>
 {
- typedef meta_constructors_base<Class> base_class;
         template <class ConstructorIndex>
         struct constructor
- {
- struct params
- {
- private:
- typedef typename mpl::at<
- typename base_class::param_type_lists,
- ConstructorIndex
- >::type type_list;
- public:
- template <class ParamIndex>
- struct param
- {
- private:
- typedef typename mpl::at<
- type_list,
- ParamIndex
- >::type param_type;
- public:
- typedef BOOST_MIRRORED_TYPE(param_type)
- type;
-
- template <class CharT>
- inline static const ::std::basic_string<CharT>&
- get_name(
- mpl::false_ full_or_base,
- const ::std::char_traits<CharT>& traits
- )
- {
- return meta_constructors::get_param_name(
- full_or_base,
- traits,
- ConstructorIndex(),
- ParamIndex()
- );
- }
-
- inline static const cts::bstring& base_name(void)
- {
- return meta_constructors::get_param_name(
- mpl::false_(),
- cts::bchar_traits(),
- ConstructorIndex(),
- ParamIndex()
- );
- }
- };
-
- typedef mpl::int_<
- mpl::size< type_list>::value
- > size;
-
- template <class Functor>
- static void for_each(Functor f)
- {
- call_for_each(f, mpl::int_<0>());
- }
- private:
- template <class Functor, class ParamIndex>
- static inline void call_for_each(
- Functor func,
- ParamIndex pi
- )
- {
- func((params*)0, pi);
- call_for_each(
- func,
- typename mpl::next<ParamIndex>::type()
- );
- }
-
- template <class Functor>
- static inline void call_for_each(const Functor&, size)
- {
- }
- };
- };
+ : detail::meta_function<meta_constructors, ConstructorIndex>
+ { };
 };
 
 } // namespace mirror

Modified: sandbox/mirror/boost/mirror/meta_mem_functions.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/meta_mem_functions.hpp (original)
+++ sandbox/mirror/boost/mirror/meta_mem_functions.hpp 2009-05-02 15:21:43 EDT (Sat, 02 May 2009)
@@ -11,6 +11,8 @@
 #define BOOST_MIRROR_META_MEM_FUNCTIONS_HPP
 
 #include <boost/mirror/meta_constructors.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/mpl/eval_if.hpp>
 
 namespace boost {
 namespace mirror {
@@ -20,241 +22,169 @@
 template <class Class /*, class VariantTag*/ >
 struct meta_mem_functions_base;
 
-#ifdef NOT_DEFINED //TODO:
+/** Begins the registering of template class' member_functions
+ */
+#define BOOST_MIRROR_REG_TEMPLATE_MEM_FUNCTIONS_BEGIN(TEMPLATE, TEMPL_ARG_COUNT)\
+BOOST_MIRROR_REG_TEMPLATE_META_FUNCTIONS_BEGIN( \
+ TEMPLATE, \
+ TEMPL_ARG_COUNT, \
+ meta_mem_functions_base \
+)
 
-/** Begins the registering of template class' constructors
+/** Begins the registering of class' member functions
  */
-#define BOOST_MIRROR_REG_TEMPLATE_CONSTRUCTORS_BEGIN(TEMPLATE, TEMPL_ARG_COUNT)\
-template < BOOST_PP_ENUM_PARAMS(TEMPL_ARG_COUNT, typename T) > \
-struct meta_constructors_base< \
- TEMPLATE < BOOST_PP_ENUM_PARAMS(TEMPL_ARG_COUNT, T) > \
-> \
-{ \
- typedef mpl::vector0<>
-
-
-/** Begins the registering of class' constructors
- */
-#define BOOST_MIRROR_REG_CONSTRUCTORS_BEGIN(CLASS) \
-template <> \
-struct meta_constructors_base< CLASS > \
-{ \
- typedef mpl::vector0<>
-
-/** Registers the parameter name of the j-th parameter
- * of the i-th constructor
- */
-#define BOOST_MIRROR_REG_CONSTRUCTOR_PARAM_NAME(CONSTRUCTOR, PARAM, NAME) \
-inline static const ::std::string& get_param_name( \
- mpl::false_, \
- const ::std::char_traits<char>&, \
- mpl::int_< CONSTRUCTOR >, \
- mpl::int_< PARAM > \
-) \
-{ \
- static ::std::string result( BOOST_PP_STRINGIZE( NAME ) ); \
- return result; \
-} \
-inline static const ::std::wstring& get_param_name( \
- mpl::false_, \
- const ::std::char_traits<wchar_t>&, \
- mpl::int_< CONSTRUCTOR >, \
- mpl::int_< PARAM > \
-) \
-{ \
- static ::std::wstring result( BOOST_PP_WSTRINGIZE( NAME ) ); \
- return result; \
-}
+#define BOOST_MIRROR_REG_MEM_FUNCTIONS_BEGIN(CLASS) \
+BOOST_MIRROR_REG_META_FUNCTIONS_BEGIN(CLASS, meta_mem_functions_base)
 
 
-/** Ends the registering of (template) class' constructors
+/** Ends the registering of (template) class' member functions
  */
-#define BOOST_MIRROR_REG_CONSTRUCTORS_END \
+#define BOOST_MIRROR_REG_MEM_FUNCTIONS_END \
         param_type_lists; \
- template <class ConstrIndex, class ParamIndex> \
- inline static const cts::bstring& base_param_name( \
- ConstrIndex ci, \
- ParamIndex pi \
- ) \
- { \
- return get_param_name( \
- mpl::false_(), \
- ::std::char_traits< cts::bchar >(), \
- ci, \
- pi \
- ); \
- } \
 };
 
-
-/** Helper macro which expands into the type of the j-th parameter
- * preceeded by a comma if it is not the first parameter
+/** Registers a member function without parameters
  */
-#define BOOST_MIRROR_REG_CONSTR_EXTRACT_PARAM_TYPE( \
- R, X, \
- PARAM_INDEX, \
- TYPE_AND_NAME \
-) BOOST_PP_COMMA_IF(PARAM_INDEX) BOOST_PP_SEQ_HEAD(TYPE_AND_NAME)
-
-
-
-/** Calls the BOOST_MIRROR_REG_CONSTRUCTOR_PARAM_NAME macro
- * in repetitions.
- */
-#define BOOST_MIRROR_REG_CONSTR_REG_CALL_PARAM_NAME(\
- R, \
- CONSTR_INDEX, \
- PARAM_INDEX, \
- TYPE_AND_NAME \
-) BOOST_MIRROR_REG_CONSTRUCTOR_PARAM_NAME( \
- CONSTR_INDEX, \
- PARAM_INDEX, \
- BOOST_PP_SEQ_HEAD(BOOST_PP_SEQ_TAIL(TYPE_AND_NAME)) \
+#define BOOST_MIRROR_REG_PARAMLESS_MEM_FUNCTION( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME \
+) \
+ param_type_lists_ ## FUNC_INDEX ; \
+ static RET_VAL get_result_of(mpl::int_< FUNC_INDEX >); \
+ BOOST_MIRROR_REG_META_FUNCTION_DEFINE_EMPTY_PARAM_TYPELIST(FUNC_INDEX)\
+ BOOST_MIRROR_REG_META_FUNCTION_PUSH_BACK_PARAM_TYPES(\
+ FUNC_INDEX, \
+ BOOST_PP_EMPTY()\
         )
 
-
-/** Adds the parameter typelist to the list storing
- * storing the parameter types for the individual constructors
+/** Implements the get_function_name helper member function
+ * for the meta-member-functions-base class
  */
-#define BOOST_MIRROR_REG_CONSTRUCTOR_PUSH_BACK_PARAM_TYPES( \
- CONSTR_INDEX, \
- TYPENAME_KW\
-) typedef TYPENAME_KW mpl::push_back< \
- BOOST_PP_CAT(param_type_lists_, CONSTR_INDEX), \
- BOOST_PP_CAT(BOOST_PP_CAT(constr_, CONSTR_INDEX), _params) \
- >::type
-
-
-/** Registers a single default constructor
- */
-#define BOOST_MIRROR_REG_DEFAULT_CONSTRUCTOR(CONSTR_INDEX) \
- param_type_lists_ ## CONSTR_INDEX ; \
- typedef mpl::vector0< \
- > BOOST_PP_CAT(BOOST_PP_CAT(constr_, CONSTR_INDEX), _params) ;\
- BOOST_MIRROR_REG_CONSTRUCTOR_PUSH_BACK_PARAM_TYPES(\
- CONSTR_INDEX, \
- BOOST_PP_EMPTY()\
- )
-
-/** registers a single non-default constructor
- */
-#define BOOST_MIRROR_DO_REG_CLASS_OR_TEMPL_CONSTRUCTOR(\
- CONSTR_INDEX, \
- PARAM_SEQ, \
- TYPENAME_KW\
+#define BOOST_MIRROR_REG_MEM_FN_IMPL_GET_FUNCTION_NAME(R, PARAMS, I, CHAR_T)\
+ inline static const ::std::basic_string<CHAR_T>& \
+ get_function_name( \
+ mpl::false_, \
+ const ::std::char_traits<CHAR_T>& traits, \
+ mpl::int_< BOOST_PP_ARRAY_ELEM(0, PARAMS) > \
+ ) \
+ { \
+ static ::std::basic_string<CHAR_T> result( \
+ BOOST_CTS_STRINGIZE_CHAR_T( \
+ CHAR_T, \
+ BOOST_PP_ARRAY_ELEM(1, PARAMS) \
+ ) \
+ ); \
+ return result; \
+ }
+
+/** This macro does the registering of the member function
+ * name for all supported character types
+ */
+#define BOOST_MIRROR_REG_META_FUNCTION_NAME( \
+ FUNC_INDEX, \
+ FUNC_NAME \
 ) \
- param_type_lists_ ## CONSTR_INDEX ; \
- typedef BOOST_PP_CAT(mpl::vector, BOOST_PP_SEQ_SIZE(PARAM_SEQ)) < \
- BOOST_PP_SEQ_FOR_EACH_I( \
- BOOST_MIRROR_REG_CONSTR_EXTRACT_PARAM_TYPE, \
- 0, \
- PARAM_SEQ \
- ) \
- > BOOST_PP_CAT(BOOST_PP_CAT(constr_, CONSTR_INDEX), _params) ;\
- BOOST_PP_SEQ_FOR_EACH_I( \
- BOOST_MIRROR_REG_CONSTR_REG_CALL_PARAM_NAME, \
- CONSTR_INDEX, \
- PARAM_SEQ \
- ) \
- BOOST_MIRROR_REG_CONSTRUCTOR_PUSH_BACK_PARAM_TYPES( \
- CONSTR_INDEX, \
- TYPENAME_KW \
- )
+ BOOST_CTS_FOR_EACH_CHAR_T_2( \
+ BOOST_MIRROR_REG_MEM_FN_IMPL_GET_FUNCTION_NAME, \
+ (2, (FUNC_INDEX, FUNC_NAME)) \
+ )
 
 
+/** registers a single function with parameters
+ */
+#define BOOST_MIRROR_DO_REG_CLASS_OR_TEMPL_MEM_FUNCTION(\
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
+ PARAM_SEQ, \
+ TYPENAME_KW\
+) \
+ param_type_lists_ ## FUNC_INDEX ; \
+ static RET_VAL get_result_of(mpl::int_< FUNC_INDEX >); \
+ BOOST_MIRROR_REG_META_FUNCTION_DEFINE_PARAM_TYPELIST( \
+ FUNC_INDEX, \
+ PARAM_SEQ \
+ ) \
+ BOOST_MIRROR_REG_META_FUNCTION_NAME(FUNC_INDEX, FUNC_NAME) \
+ BOOST_MIRROR_REG_META_FUNCTION_PARAM_NAMES( \
+ FUNC_INDEX, \
+ PARAM_SEQ \
+ ) \
+ BOOST_MIRROR_REG_META_FUNCTION_PUSH_BACK_PARAM_TYPES( \
+ FUNC_INDEX, \
+ TYPENAME_KW \
+ )
 
-/** Decides whether the PARAM_SEQ is a argument sequence for
- * a default constructor (having no parameters)
- */
-#define BOOST_MIRROR_IS_VOID_FN_ARG_LIST(PARAM_SEQ) \
- BOOST_PP_AND( \
- BOOST_PP_EQUAL(BOOST_PP_SEQ_SIZE(PARAM_SEQ),1), \
- BOOST_PP_EQUAL( \
- BOOST_PP_SEQ_SIZE( \
- BOOST_PP_SEQ_HEAD(PARAM_SEQ) \
- ),1 \
- ) \
- )
 
-/** expands into the default constructor registering macro
+/** expands into the paramless function registering macro
  */
-#define BOOST_MIRROR_REG_CLASS_OR_TEMPL_CONSTRUCTOR_1( \
- CONSTR_INDEX, \
+#define BOOST_MIRROR_REG_CLASS_OR_TEMPL_MEM_FUNCTION_1( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
         PARAM_SEQ, \
         TYPENAME_KW \
-) BOOST_MIRROR_REG_DEFAULT_CONSTRUCTOR(CONSTR_INDEX)
+) BOOST_MIRROR_REG_PARAMLESS_MEM_FUNCTION(FUNC_INDEX, RET_VAL, FUNC_NAME)
 
-/** expands into the non-default constructor registering macro
+/** expands into the member function registering macro
  */
-#define BOOST_MIRROR_REG_CLASS_OR_TEMPL_CONSTRUCTOR_0( \
- CONSTR_INDEX, \
+#define BOOST_MIRROR_REG_CLASS_OR_TEMPL_MEM_FUNCTION_0( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
+ PARAM_SEQ, \
+ TYPENAME_KW \
+) BOOST_MIRROR_DO_REG_CLASS_OR_TEMPL_MEM_FUNCTION( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
         PARAM_SEQ, \
         TYPENAME_KW \
-) BOOST_MIRROR_DO_REG_CLASS_OR_TEMPL_CONSTRUCTOR( \
- CONSTR_INDEX, \
- PARAM_SEQ, \
- TYPENAME_KW \
 )
 
-/** Registers a single constructor, by disparching between
- * the BOOST_MIRROR_DO_REG_CLASS_OR_TEMPL_CONSTRUCTOR and
- * the BOOST_MIRROR_REG_DEFAULT_CONSTRUCTOR macros based on
- * whether the constructor is default or non-default.
- * Default constructors are identified as those
- * having only a single parameter of void type. All other constructors
- * are considered as non-default.
- */
-#define BOOST_MIRROR_REG_CLASS_OR_TEMPL_CONSTRUCTOR( \
- CONSTR_INDEX, \
- PARAM_SEQ, \
- TYPENAME_KW \
+#define BOOST_MIRROR_REG_CLASS_OR_TEMPL_MEM_FUNCTION( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
+ PARAM_SEQ, \
+ TYPENAME_KW \
 ) BOOST_PP_CAT( \
- BOOST_MIRROR_REG_CLASS_OR_TEMPL_CONSTRUCTOR_, \
- BOOST_MIRROR_IS_VOID_FN_ARG_LIST(PARAM_SEQ) \
-) (CONSTR_INDEX, PARAM_SEQ, TYPENAME_KW)
-
-
+ BOOST_MIRROR_REG_CLASS_OR_TEMPL_MEM_FUNCTION_, \
+ BOOST_MIRROR_IS_VOID_FN_ARG_LIST(PARAM_SEQ) \
+) (FUNC_INDEX, RET_VAL, FUNC_NAME, PARAM_SEQ, TYPENAME_KW)
+
+
+/** Registers a member function of a non-template class
+ */
+#define BOOST_MIRROR_REG_MEM_FUNCTION( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
+ PARAM_SEQ \
+) BOOST_MIRROR_REG_CLASS_OR_TEMPL_MEM_FUNCTION( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
+ PARAM_SEQ, \
+ BOOST_PP_EMPTY() \
+)
 
-/** Registers a constructor of a non-template class
- */
-#define BOOST_MIRROR_REG_CONSTRUCTOR(CONSTR_INDEX, PARAM_SEQ) \
- BOOST_MIRROR_REG_CLASS_OR_TEMPL_CONSTRUCTOR( \
- CONSTR_INDEX, \
- PARAM_SEQ, \
- BOOST_PP_EMPTY() \
- )
-
-/** Registers a constructor of a template class
+/** Registers a member function of a template class
  */
-#define BOOST_MIRROR_REG_TEMPLATE_CONSTRUCTOR(CONSTR_INDEX, PARAM_SEQ) \
- BOOST_MIRROR_REG_CLASS_OR_TEMPL_CONSTRUCTOR( \
- CONSTR_INDEX, \
- PARAM_SEQ, \
- typename \
- )
-
-/** Helper macro used to call the BOOST_MIRROR_REG_CONSTRUCTOR
- * for each constructor in the quick registering macro
- */
-#define BOOST_MIRROR_CALL_REG_CONSTRUCTOR_QREG(R, D, PARAM_SEQ)\
- BOOST_MIRROR_REG_CONSTRUCTOR(BOOST_PP_SUB(R,2), PARAM_SEQ)
-
-/** Quick and simple constructor registering macro
- */
-#define BOOST_MIRROR_QREG_CONSTRUCTORS( \
- CLASS, \
- CONSTR_PARAM_SEQ_SEQ \
-) \
-BOOST_MIRROR_REG_CONSTRUCTORS_BEGIN( CLASS ) \
- BOOST_PP_SEQ_FOR_EACH( \
- BOOST_MIRROR_CALL_REG_CONSTRUCTOR_QREG, \
- _, \
- CONSTR_PARAM_SEQ_SEQ \
- ) \
-BOOST_MIRROR_REG_CONSTRUCTORS_END
-
+#define BOOST_MIRROR_REG_TEMPLATE_MEM_FUNCTION( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
+ PARAM_SEQ \
+) BOOST_MIRROR_REG_CLASS_OR_TEMPL_MEM_FUNCTION( \
+ FUNC_INDEX, \
+ RET_VAL, \
+ FUNC_NAME, \
+ PARAM_SEQ, \
+ typename \
+)
 
-#endif //NOT_DEFINED TODO
 
 /** Template providing meta-data about the member functions
  * (methods) of the Class.
@@ -262,120 +192,48 @@
 template <class Class /*, class VariantTag*/ >
 struct meta_member_functions : public meta_mem_functions_base<Class>
 {
- typedef meta_mem_functions_base<Class> base_class;
+private:
+ // internal only
+ typedef meta_mem_functions_base<Class> base_meta_data;
+public:
         template <class FunctionIndex>
         struct function
+ : detail::meta_function<meta_member_functions, FunctionIndex>
         {
- // returns the name of the member function
- template <bool FullOrBase, class CharT>
- inline static const ::std::basic_string<CharT>&
- get_name(
- mpl::bool_<FullOrBase> full_or_base,
- const ::std::char_traits<CharT>& traits
- )
- {
- return meta_member_functions::get_function_name(
- full_or_base,
- traits,
- FunctionIndex()
- );
- }
-
- // returns the base name of the member function
- inline static const cts::bstring&
- base_name(void)
+ private:
+ template <typename T>
+ static mpl::true_ returns_something(T(*)(FunctionIndex));
+ static mpl::false_ returns_something(void(*)(FunctionIndex));
+
+ typedef BOOST_TYPEOF(
+ returns_something(&base_meta_data::get_result_of)
+ ) non_void_rv;
+
+ template <typename Idx>
+ struct reflected_result
                 {
- return meta_member_functions::get_function_name(
- mpl::false_(),
- cts::bchar_traits(),
- FunctionIndex()
- );
- }
-
- // meta-data about the parameters of the function
- struct params
+ typedef BOOST_MIRRORED_CLASS(
+ BOOST_TYPEOF(
+ base_meta_data::get_result_of(
+ Idx()
+ )
+ )
+ ) type;
+ };
+
+ template <typename T>
+ struct reflected_type
                 {
- private:
- typedef typename mpl::at<
- typename base_class::param_type_lists,
- FunctionIndex
- >::type type_list;
- public:
- // some meta-data about the i-th param
- template <class ParamIndex>
- struct param
- {
- private:
- typedef typename mpl::at<
- type_list,
- ParamIndex
- >::type param_type;
- public:
- typedef BOOST_MIRRORED_TYPE(param_type)
- type;
- };
-
- // the count of parameters
- typedef mpl::int_<
- mpl::size< type_list>::value
- > size;
-
- // gets the i-th param name
- template <class CharT, class ParamIndex>
- inline static const ::std::basic_string<CharT>&
- get_param_name(
- mpl::false_ full_or_base,
- const ::std::char_traits<CharT>& traits,
- ParamIndex
- )
- {
- return meta_member_functions::get_param_name(
- full_or_base,
- traits,
- FunctionIndex(),
- ParamIndex()
- );
- }
-
- // get the base name of the i-th param
- template <class ParamIndex>
- inline static const cts::bstring& base_param_name(
- ParamIndex
- )
- {
- return meta_member_functions::base_param_name(
- FunctionIndex(),
- ParamIndex()
- );
- }
-
-
- // executes the given binary functor on all
- // parameters of the i-th function
- template <class Functor>
- static void for_each(Functor f)
- {
- call_for_each(f, mpl::int_<0>());
- }
- private:
- template <class Functor, class ParamIndex>
- static inline void call_for_each(
- Functor func,
- ParamIndex pi
- )
- {
- func((params*)0, pi);
- call_for_each(
- func,
- typename mpl::next<ParamIndex>::type()
- );
- }
-
- template <class Functor>
- static inline void call_for_each(const Functor&, size)
- {
- }
+ typedef BOOST_MIRRORED_CLASS(T) type;
                 };
+
+ public:
+ // meta-class reflecting the result type of this function
+ typedef typename mpl::eval_if<
+ non_void_rv,
+ reflected_result<FunctionIndex>,
+ reflected_type<void>
+ >::type result_type;
         };
 };
 

Modified: sandbox/mirror/libs/mirror/example/factories/inserter.cpp
==============================================================================
--- sandbox/mirror/libs/mirror/example/factories/inserter.cpp (original)
+++ sandbox/mirror/libs/mirror/example/factories/inserter.cpp 2009-05-02 15:21:43 EDT (Sat, 02 May 2009)
@@ -128,8 +128,14 @@
         // TODO: remove this
         //
         typedef meta_member_functions<person> mem_fns;
+ typedef mem_fns::function<mpl::int_<0> > fn_0;
         cts::bcout() <<
- mem_fns::function<mpl::int_<0> >::base_name() <<
+ fn_0::result_type::base_name() << " " <<
+ fn_0::base_name() << "(" <<
+ fn_0::params::param<mpl::int_<0> >::type::base_name() << ", " <<
+ fn_0::params::param<mpl::int_<1> >::type::base_name() << ", " <<
+ fn_0::params::param<mpl::int_<2> >::type::base_name() << ", " <<
+ fn_0::params::param<mpl::int_<3> >::type::base_name() << ")" <<
                 ::std::endl;
         //
         // TODO:

Modified: sandbox/mirror/libs/mirror/example/factories/person.hpp
==============================================================================
--- sandbox/mirror/libs/mirror/example/factories/person.hpp (original)
+++ sandbox/mirror/libs/mirror/example/factories/person.hpp 2009-05-02 15:21:43 EDT (Sat, 02 May 2009)
@@ -69,8 +69,7 @@
         (first_name)(family_name)(street)(number)(city)(postal_code)
 )
 BOOST_MIRROR_QREG_CONSTRUCTORS(
- ::test::person,
- (
+ ::test::person, (
                 ((::boost::cts::bstring)(first_name))
                 ((::boost::cts::bstring)(family_name))
                 ((::boost::cts::bstring)(street))
@@ -80,28 +79,15 @@
         )
 )
 
-#define BOOST_MIRROR_TMP_IMPLEMENT_MEM_FN_GET_NAME(R, MEM_FN, I, CHAR_T) \
- inline static const ::std::basic_string< CHAR_T >& \
- get_function_name( \
- mpl::false_, \
- const ::std::char_traits< CHAR_T >, \
- mpl::int_<0> \
- ) \
- { \
- static ::std::basic_string< CHAR_T > result( \
- BOOST_CTS_STRINGIZE_CHAR_T(CHAR_T, MEM_FN) \
- ); \
- return result; \
- }
-
-template <class Class>
-struct meta_mem_functions_base
-{
- BOOST_CTS_FOR_EACH_CHAR_T(
- BOOST_MIRROR_TMP_IMPLEMENT_MEM_FN_GET_NAME,
- change_address
- )
-};
+BOOST_MIRROR_REG_MEM_FUNCTIONS_BEGIN(::test::person)
+BOOST_MIRROR_REG_MEM_FUNCTION(
+ 0, void, change_address,
+ ((::boost::cts::bstring)(street))
+ ((::boost::cts::bstring)(number))
+ ((::boost::cts::bstring)(city))
+ ((::boost::cts::bstring)(postal_code))
+)
+BOOST_MIRROR_REG_MEM_FUNCTIONS_END
 
 } // namespace mirror
 } // namespace boost


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk