Boost logo

Boost-Commit :

From: chochlik_at_[hidden]
Date: 2008-07-24 13:41:18


Author: matus.chochlik
Date: 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
New Revision: 47765
URL: http://svn.boost.org/trac/boost/changeset/47765

Log:
[mirror 0.2.x]
- attribute-name getter functions now return const basic_string<CharT>&
- added get_name to meta-attributes
- added full_name to meta-attributes
- minor docs update
Added:
   sandbox/mirror/doc/index.html (contents, props changed)
Removed:
   sandbox/mirror/boost/mirror/detail/meta_attribs_getset.hpp
Text files modified:
   sandbox/mirror/boost/mirror/detail/meta_attribs_base.hpp | 13 +++-
   sandbox/mirror/boost/mirror/function/select_base_name.hpp | 2
   sandbox/mirror/boost/mirror/function/select_full_name.hpp | 2
   sandbox/mirror/boost/mirror/meta_attributes.hpp | 118 ++++++++++++++++++++++++++++++++-------
   sandbox/mirror/boost/mirror/meta_classes/boost_tuple.hpp | 46 ++++++++++++--
   sandbox/mirror/libs/char_type_switch/doc/introduction.xml | 2
   sandbox/mirror/libs/mirror/doc/reference/class_meta_attribute.xml | 2
   sandbox/mirror/libs/mirror/example/special/boost_tuple.cpp | 10 +-
   8 files changed, 153 insertions(+), 42 deletions(-)

Modified: sandbox/mirror/boost/mirror/detail/meta_attribs_base.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/detail/meta_attribs_base.hpp (original)
+++ sandbox/mirror/boost/mirror/detail/meta_attribs_base.hpp 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -158,9 +158,16 @@
         typedef TYPENAME_KW ::boost::mirror::typedef_::extract_type< \
                 TYPE_SELECTOR \
>::type type_of_##NAME; \
- static const ::boost::cts::bchar* base_name( \
- position_of_##NAME \
- ){return BOOST_CTS_LIT(#NAME);} \
+ inline static const ::std::string& get_name( \
+ position_of_##NAME, \
+ ::boost::mpl::false_, \
+ ::std::char_traits<char> \
+ ){static ::std::string name(#NAME); return name;}\
+ inline static const ::std::wstring& get_name( \
+ position_of_##NAME, \
+ ::boost::mpl::false_, \
+ ::std::char_traits<wchar_t> \
+ ){static ::std::wstring name(L ## #NAME); return name;}\
         static meta_class_attribute_traits< \
                 ::boost::mirror::attrib_storage_specifiers:: SPECIFIERS##_, \
                 TYPE_SELECTOR \

Deleted: sandbox/mirror/boost/mirror/detail/meta_attribs_getset.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/detail/meta_attribs_getset.hpp 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
+++ (empty file)
@@ -1,282 +0,0 @@
-/**
- * \file boost/mirror/detail/meta_attribs_getset.hpp
- * Mscros for declaring meta attributes accessed through getters/setters
- *
- * Copyright 2008 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_DETAIL_META_ATTRIBS_GETSET_HPP
-#define BOOST_MIRROR_DETAIL_META_ATTRIBS_GETSET_HPP
-
-// macros for declaration of simple meta attributes
-#include <boost/mirror/detail/meta_attribs_base.hpp>
-//
-// necessary preprocessor macros
-#include <boost/preprocessor/tuple/to_list.hpp>
-#include <boost/preprocessor/list/enum.hpp>
-//
-// various other things from boost to get this going
-#include <boost/function_types/property_tags.hpp>
-#include <boost/function_types/is_member_function_pointer.hpp>
-#include <boost/typeof/typeof.hpp>
-
-
-
-namespace boost {
-namespace mirror {
-
-/** Helper macro for implementing getter based query meta-class function
- *
- * TODO: This is a rather unfortunate implementation ...
- * It would be great is we could get rid of the do_* helpers.
- * Anyway there should be two overloads of get and two for query
- * one having 'const Class&' and the other 'Class&' as the first param
- * if the provided getter IS const qualified.
- * Otherwise, if the getter IS NOT const qualified there should be only one
- * version of get and one version of query, both having a 'Class&'
- * as the first argument.
- *
- * Now, both overloads get always compiled, but if the one with const Class&
- * gets never used it is (hopefully) culled out of the final binary.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_GETTER_ARGS(NUMBER, TYPE, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT) \
- static call_traits<TYPE>::param_type do_get(Class& instance, mpl::int_<NUMBER>, mpl::bool_<true>)\
- {\
- return instance.GETTER_NAME(BOOST_PP_LIST_ENUM(BOOST_PP_TUPLE_TO_LIST(ARG_COUNT, GETTER_ARGS_TUPLE)));\
- } \
- static call_traits<TYPE>::param_type do_get(const Class& instance, mpl::int_<NUMBER>, mpl::bool_<function_types::is_member_function_pointer<BOOST_TYPEOF(&Class::GETTER_NAME), function_types::const_qualified>::value>)\
- {\
- return const_cast<Class&>(instance).GETTER_NAME(BOOST_PP_LIST_ENUM(BOOST_PP_TUPLE_TO_LIST(ARG_COUNT, GETTER_ARGS_TUPLE)));\
- } \
- template <typename DestType>\
- static DestType& do_query(Class& instance, mpl::int_<NUMBER>, DestType& dest, mpl::bool_<true>)\
- {\
- dest = DestType(instance.GETTER_NAME(BOOST_PP_LIST_ENUM(BOOST_PP_TUPLE_TO_LIST(ARG_COUNT, GETTER_ARGS_TUPLE))));\
- return dest;\
- } \
- template <typename DestType>\
- static DestType& do_query(const Class& instance, mpl::int_<NUMBER>, DestType& dest, mpl::bool_<function_types::is_member_function_pointer<BOOST_TYPEOF(&Class::GETTER_NAME), function_types::const_qualified>::value>)\
- {\
- dest = DestType(const_cast<Class&>(instance).GETTER_NAME(BOOST_PP_LIST_ENUM(BOOST_PP_TUPLE_TO_LIST(ARG_COUNT, GETTER_ARGS_TUPLE))));\
- return dest;\
- } \
- template <class SomeClass> static call_traits<TYPE>::param_type get(SomeClass& instance, mpl::int_<NUMBER>)\
- {\
- return do_get(instance, mpl::int_<NUMBER>(), mpl::bool_<true>());\
- }\
- template <class SomeClass, typename DestType> \
- static DestType& query(SomeClass& instance, mpl::int_<NUMBER>, DestType& dest)\
- {\
- return do_query(instance, mpl::int_<NUMBER>(), dest, mpl::bool_<true>());\
- }
-
-
-#define BOOST_MIRROR_SETTER_SRC val
-
-/** Helper macro for implementing setter based set meta-class function
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SETTER_ARGS(NUMBER, TYPE, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT) \
- static void set(Class& instance, mpl::int_<NUMBER>, call_traits<TYPE>::param_type val)\
- {\
- instance.SETTER_NAME(BOOST_PP_LIST_ENUM(BOOST_PP_TUPLE_TO_LIST(ARG_COUNT, SETTER_ARGS_TUPLE)));\
- }
-
-
-/** This macro declares a single class' query-only attribute with a getter
- * member function.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS_ONLY(NUMBER, TYPE, ATTRIB_NAME, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_GETTER_ARGS(NUMBER, TYPE, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_NO_SETTER(NUMBER, TYPE)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE(NUMBER, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS
- * for getter functions with no bound arguments
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_ONLY(NUMBER, TYPE, ATTRIB_NAME, GETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS_ONLY(NUMBER, TYPE, ATTRIB_NAME, GETTER_NAME, (), 0)
-
-
-/** This macro declares a single class' query-only attribute with a getter
- * member function. Version for typedef'd types.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS_ONLY_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE_NAMESPACE::TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_GETTER_ARGS(NUMBER, TYPE_NAMESPACE::TYPE, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_NO_SETTER(NUMBER, TYPE_NAMESPACE::TYPE)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS
- * for getter functions with no bound arguments
- * Version for typedef'd types.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_ONLY_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, GETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS_ONLY_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, GETTER_NAME, (), 0)
-
-
-
-/** This macro declares a single class' getter-query-simple-set attribute with a getter
- * member function and a simple value setting scheme.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS(NUMBER, TYPE, ATTRIB_NAME, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_GETTER_ARGS(NUMBER, TYPE, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SIMPLE_SET(NUMBER, TYPE, ATTRIB_NAME)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE(NUMBER, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS
- * for getter functions with no bound arguments
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER(NUMBER, TYPE, ATTRIB_NAME, GETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS(NUMBER, TYPE, ATTRIB_NAME, GETTER_NAME, (), 0)
-
-
-/** This macro declares a single class' getter-query-simple-set attribute with a getter
- * member function and a simple value setting scheme.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE_NAMESPACE::TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_GETTER_ARGS(NUMBER, TYPE_NAMESPACE::TYPE, GETTER_NAME, GETTER_ARGS_TUPLE, ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SIMPLE_SET(NUMBER, TYPE_NAMESPACE::TYPE, ATTRIB_NAME)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS
- * for getter functions with no bound arguments.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_TD(NUMBER, TYPE, TYPE_NS_ALIAS, TYPE_NAMESPACE, ATTRIB_NAME, GETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_W_ARGS_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, GETTER_NAME, (), 0)
-
-
-/** This macro declares a single class' set-only attribute with a setter
- * member function.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS_ONLY(NUMBER, TYPE, ATTRIB_NAME, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_NO_GETTER(NUMBER, TYPE)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SETTER_ARGS(NUMBER, TYPE, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE(NUMBER, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS
- * for getter functions with no bound arguments
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_ONLY(NUMBER, TYPE, ATTRIB_NAME, SETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS_ONLY(NUMBER, TYPE, ATTRIB_NAME, SETTER_NAME, (BOOST_MIRROR_SETTER_SRC), 1)
-
-
-/** This macro declares a single class' set-only attribute with a setter
- * member function. Version for typedef'd types.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS_ONLY_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE_NAMESPACE::TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_NO_GETTER(NUMBER, TYPE_NAMESPACE::TYPE)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SETTER_ARGS(NUMBER, TYPE_NAMESPACE::TYPE, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS
- * for getter functions with no bound arguments.
- * Version for typedef'd types.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_ONLY_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, SETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS_ONLY_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, SETTER_NAME, (BOOST_MIRROR_SETTER_SRC), 1)
-
-
-/** This macro declares a single class' simple-get-setter-set attribute with a setter
- * member function and simple value getting scheme.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS(NUMBER, TYPE, ATTRIB_NAME, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SIMPLE_GET(NUMBER, TYPE, ATTRIB_NAME)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SETTER_ARGS(NUMBER, TYPE, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE(NUMBER, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS
- * for setter functions with no bound arguments besides the value to be set
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER(NUMBER, TYPE, ATTRIB_NAME, SETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS(NUMBER, TYPE, ATTRIB_NAME, SETTER_NAME, (BOOST_MIRROR_SETTER_SRC), 1)
-
-/** This macro declares a single class' simple-get-setter-set attribute with a setter
- * member function and simple value getting scheme.
- * Version for typedef'd types.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE_NAMESPACE::TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SIMPLE_GET(NUMBER, TYPE_NAMESPACE::TYPE, ATTRIB_NAME)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SETTER_ARGS(NUMBER, TYPE_NAMESPACE::TYPE, SETTER_NAME, SETTER_ARGS_TUPLE, ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS
- * for setter functions with no bound arguments besides the value to be set.
- * Version for typedef'd types.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, SETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_SETTER_W_ARGS_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, SETTER_NAME, (BOOST_MIRROR_SETTER_SRC), 1)
-
-
-/** This macro declares a single class' simple-get-setter-set attribute with a setter
- * member function and simple value getting scheme.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_SETTER_W_ARGS(\
- NUMBER, \
- TYPE, \
- ATTRIB_NAME, \
- GETTER_NAME, \
- GETTER_ARGS_TUPLE, \
- GETTER_ARG_COUNT, \
- SETTER_NAME, \
- SETTER_ARGS_TUPLE, \
- SETTER_ARG_COUNT\
-) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_GETTER_ARGS(NUMBER, TYPE, GETTER_NAME, GETTER_ARGS_TUPLE, GETTER_ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SETTER_ARGS(NUMBER, TYPE, SETTER_NAME, SETTER_ARGS_TUPLE, SETTER_ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE(NUMBER, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_SETTER_W_ARGS
- * for getter and setter functions with no bound arguments
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_SETTER(NUMBER, TYPE, ATTRIB_NAME, GETTER_NAME, SETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_SETTER_W_ARGS(\
- NUMBER, TYPE, ATTRIB_NAME, \
- GETTER_NAME, (), 0, \
- SETTER_NAME, (BOOST_MIRROR_SETTER_SRC), 1\
- )
-
-/** This macro declares a single class' simple-get-setter-set attribute with a setter
- * member function and simple value getting scheme.
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_SETTER_W_ARGS_TD(\
- NUMBER, \
- TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, \
- ATTRIB_NAME, \
- GETTER_NAME, \
- GETTER_ARGS_TUPLE, \
- GETTER_ARG_COUNT, \
- SETTER_NAME, \
- SETTER_ARGS_TUPLE, \
- SETTER_ARG_COUNT\
-) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_PROLOGUE(NUMBER, TYPE_NAMESPACE::TYPE, ATTRIB_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_GETTER_ARGS(NUMBER, TYPE_NAMESPACE::TYPE, GETTER_NAME, GETTER_ARGS_TUPLE, GETTER_ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_DECL_SETTER_ARGS(NUMBER, TYPE_NAMESPACE::TYPE, SETTER_NAME, SETTER_ARGS_TUPLE, SETTER_ARG_COUNT)\
- BOOST_MIRROR_REG_CLASS_ATTRIB_EPILOGUE(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, false)
-
-/** Simpler version of the BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_SETTER_W_ARGS_TD
- * for getter and setter functions with no bound arguments
- */
-#define BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_SETTER_TD(NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, GETTER_NAME, SETTER_NAME) \
- BOOST_MIRROR_REG_CLASS_ATTRIB_GETTER_SETTER_W_ARGS(\
- NUMBER, TYPE_NS_ALIAS, TYPE_NAMESPACE, TYPE, ATTRIB_NAME, \
- GETTER_NAME, (), 0, \
- SETTER_NAME, (BOOST_MIRROR_SETTER_SRC), 1\
- )
-
-
-} // namespace mirror
-} // namespace boost
-
-#endif //include guard
-

Modified: sandbox/mirror/boost/mirror/function/select_base_name.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/function/select_base_name.hpp (original)
+++ sandbox/mirror/boost/mirror/function/select_base_name.hpp 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -17,7 +17,7 @@
 struct select_base_name
 {
         template <class MetaObject>
- inline const cts::bchar* operator()(MetaObject) const
+ inline const cts::bstring& operator()(MetaObject) const
         {
                 return MetaObject::base_name();
         }

Modified: sandbox/mirror/boost/mirror/function/select_full_name.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/function/select_full_name.hpp (original)
+++ sandbox/mirror/boost/mirror/function/select_full_name.hpp 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -17,7 +17,7 @@
 struct select_full_name
 {
         template <class MetaObject>
- inline const cts::bchar* operator()(MetaObject) const
+ inline const cts::bstring& operator()(MetaObject) const
         {
                 return MetaObject::full_name();
         }

Modified: sandbox/mirror/boost/mirror/meta_attributes.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/meta_attributes.hpp (original)
+++ sandbox/mirror/boost/mirror/meta_attributes.hpp 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -309,26 +309,42 @@
                         /** This function is used to get the names of the member
                           * attributes from the base classes.
                           */
- template <int I>
- static const cts::bchar*
- base_name(mpl::int_<I> pos, mpl::bool_<true>)
+ template <int I, typename CharT>
+ static const ::std::basic_string<CharT>& get_name(
+ mpl::int_<I> pos,
+ mpl::false_ full_name,
+ ::std::char_traits<CharT> cht,
+ mpl::bool_<true> is_inherited
+ )
                         {
                                 typedef typename inherited_attrib_meta_class_and_pos<I>
                                         ::meta_class meta_class;
                                 typedef typename inherited_attrib_meta_class_and_pos<I>
                                         ::position new_position;
 
- return meta_class::attributes::base_name(new_position());
+ return meta_class::attributes::get_name(
+ new_position(),
+ full_name,
+ cht
+ );
                         }
 
- template <int I>
- static const cts::bchar*
- base_name(mpl::int_<I> pos, mpl::bool_<false>)
+ template <int I, typename CharT>
+ static const ::std::basic_string<CharT>& get_name(
+ mpl::int_<I> pos,
+ mpl::false_ full_name,
+ ::std::char_traits<CharT> cht,
+ mpl::bool_<false> is_inherited
+ )
                         {
                                 typedef typename own_attrib_meta_class_and_pos<I>
                                         ::position new_position;
 
- return meta_class::attributes::base_name(new_position());
+ return meta_class::attributes::get_name(
+ new_position(),
+ full_name,
+ cht
+ );
                         }
 
                 
@@ -504,12 +520,17 @@
                 /** Gets the name of the I-th member (including
                  * the inherited ones)
                  */
- template <int I>
- static const cts::bchar*
- base_name(mpl::int_<I> pos)
+ template <int I, typename CharT>
+ static const ::std::basic_string<CharT>& get_name(
+ mpl::int_<I> pos,
+ mpl::false_ full_name,
+ ::std::char_traits<CharT> cht
+ )
                 {
- return detail::base_name(
+ return detail::get_name(
                                 pos,
+ full_name,
+ cht,
                                 is_inherited(pos)
                         );
                 }
@@ -597,6 +618,26 @@
                 typedef typename scope::reflected_type
                         owner_class;
 
+ inline static const char* get_double_colon(::std::char_traits<char>)
+ {
+ return "::";
+ }
+ inline static const wchar_t* get_double_colon(::std::char_traits<wchar_t>)
+ {
+ return L"::";
+ }
+ template <typename CharT>
+ inline static ::std::basic_string<CharT> init_full_name(
+ ::std::char_traits<CharT> cht
+ )
+ {
+ typedef ::std::basic_string<CharT> str_type;
+ str_type name(scope::get_name(mpl::true_(), cht));
+ name.append(str_type(get_double_colon(cht)));
+ name.append(base_name());
+ return name;
+ }
+
         public:
 
                 // the meta-attributes list (own/all)
@@ -614,15 +655,51 @@
                         position
>::type type;
 
+ template <typename CharT>
+ inline static const ::std::basic_string<CharT>& get_name(
+ mpl::false_ full_name,
+ ::std::char_traits<CharT> cht
+ )
+ {
+ return meta_attributes::get_name(
+ position(),
+ full_name,
+ cht
+ );
+ }
+
                 // base name getter
- inline static const cts::bchar* base_name(void)
+ inline static const cts::bstring& base_name(void)
                 {
- return meta_attributes::base_name(position());
+ return get_name(
+ mpl::false_(),
+ cts::bchar_traits()
+ );
+ }
+
+ template <typename CharT>
+ inline static const ::std::basic_string<CharT>& get_name(
+ mpl::true_ full_name,
+ ::std::char_traits<CharT> cht
+ )
+ {
+ typedef ::std::basic_string<CharT> str_type;
+ static str_type name(init_full_name(cht));
+ return name;
+ }
+
+ // full name getter
+ inline static const cts::bstring& full_name(void)
+ {
+ return get_name(
+ mpl::true_(),
+ cts::bchar_traits()
+ );
                 }
 
                 // value getter
                 inline static typename result_of_get::type get(
- const typename owner_class& instance
+ const owner_class& instance
                 )
                 {
                         return meta_attributes::get(instance, position());
@@ -630,9 +707,8 @@
 
                 // value query
                 template <typename DestType>
- inline static DestType&
- query(
- const typename owner_class& instance,
+ inline static DestType& query(
+ const owner_class& instance,
                         DestType& dest
                 )
                 {
@@ -640,8 +716,7 @@
                 }
 
                 // value setter
- inline static void
- set(
+ inline static void set(
                         owner_class& instance,
                         typename call_traits<type>::param_type val
                 )
@@ -650,8 +725,7 @@
                 }
 
                 // value setter
- inline static void
- set(
+ inline static void set(
                         const owner_class& instance,
                         typename call_traits<type>::param_type val
                 )

Modified: sandbox/mirror/boost/mirror/meta_classes/boost_tuple.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/meta_classes/boost_tuple.hpp (original)
+++ sandbox/mirror/boost/mirror/meta_classes/boost_tuple.hpp 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -16,6 +16,25 @@
 
 namespace boost {
 namespace mirror {
+namespace detail {
+ //
+ // specializations of this meta-function return a vector
+ // containing the proper 'static string' that is used as
+ // prefix for tuple member attribute names
+ template <typename CharT>
+ struct meta_class_boost_tuple_attrib_name_prefix;
+
+ template <>
+ struct meta_class_boost_tuple_attrib_name_prefix<char>
+ {
+ typedef mpl::vector_c<char, '_' > type;
+ };
+ template <>
+ struct meta_class_boost_tuple_attrib_name_prefix<wchar_t>
+ {
+ typedef mpl::vector_c<wchar_t, L'_' > type;
+ };
+} // namespace detail
 
 BOOST_MIRROR_REG_TEMPLATE_ATTRIBS_BEGIN(::boost::tuples::tuple, 10)
         __dummy_list;
@@ -31,16 +50,27 @@
>::type template_params;
         //
         // member attribute base name getter
- template <int I>
- static const cts::bchar* base_name(mpl::int_<I>)
- {
+ template <int I, typename CharT>
+ inline static const ::std::basic_string<CharT>& get_name(
+ mpl::int_<I> pos,
+ mpl::false_ full_name,
+ ::std::char_traits<CharT> cht
+ )
+ {
+ // get the prefix 'static string'
+ typedef typename detail::meta_class_boost_tuple_attrib_name_prefix<
+ CharT
+ >::type prefix;
+ // get a prefixed name builder
                 typedef typename boost::mirror::detail::static_int_to_str_w_prefix<
- mpl::vector_c<cts::bchar, BOOST_CTS_LIT('_') >,
- cts::bchar,
+ prefix,
+ CharT,
                         I
- >::holder name;
- //
- return name::get();
+ >::holder name_builder;
+ // build the name and assing it to the static name
+ static ::std::basic_string<CharT> name(name_builder::get());
+ // return the built name
+ return name;
         }
 
         template <int I>

Added: sandbox/mirror/doc/index.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/index.html 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -0,0 +1,10 @@
+<html>
+ <head>
+ <title>Mirror Library Documentation</title>
+ <meta http-equiv="refresh" content="0; url=html/index.html"/>
+ </head>
+ <body>
+ If you are not redirected automatically click here.
+ </body>
+</html>
+

Modified: sandbox/mirror/libs/char_type_switch/doc/introduction.xml
==============================================================================
--- sandbox/mirror/libs/char_type_switch/doc/introduction.xml (original)
+++ sandbox/mirror/libs/char_type_switch/doc/introduction.xml 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -57,7 +57,7 @@
         or a library when the development process starts.
         This decision is influenced by factors many of which are clear
         only much later in the development process or even just before
- the deployment in a concrete enviroment, like the character
+ the deployment in a concrete environment, like the character
         encodings to be used, the memory requirements, other libraries,
         etc.
 </para>

Modified: sandbox/mirror/libs/mirror/doc/reference/class_meta_attribute.xml
==============================================================================
--- sandbox/mirror/libs/mirror/doc/reference/class_meta_attribute.xml (original)
+++ sandbox/mirror/libs/mirror/doc/reference/class_meta_attribute.xml 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -10,7 +10,7 @@
         <purpose>
                 <para>This class template reflects individual attributes of a class. The
                 <code><classname>meta_attribute</classname></code> template should not be instantiated
- directly, but are obtained only as results of introspection operations on
+ directly, but meta-attributes are obtained only as results of introspection operations on
                 <code><classname>meta_class_attributes</classname></code> and
                 <code><classname>meta_class_all_attributes</classname></code>.
                 </para>

Modified: sandbox/mirror/libs/mirror/example/special/boost_tuple.cpp
==============================================================================
--- sandbox/mirror/libs/mirror/example/special/boost_tuple.cpp (original)
+++ sandbox/mirror/libs/mirror/example/special/boost_tuple.cpp 2008-07-24 13:41:17 EDT (Thu, 24 Jul 2008)
@@ -54,7 +54,7 @@
 
 struct str_printer
 {
- void operator()(const ::boost::cts::bchar* str) const
+ void operator()(const ::boost::cts::bstring& str) const
         {
                 ::boost::cts::bcout() << str << ", ";
         }
@@ -102,11 +102,11 @@
         bcout << "---------------------------------------------------" << endl;
         bcout << "The class has "<< meta_T1::all_attributes::size::value << " members" << endl;
         bcout << "---------------------------------------------------" << endl;
- bcout << meta_T1::all_attributes::base_name(mpl::int_<0>()) << " = ";
+ bcout << meta_T1::all_attributes::get_name(mpl::int_<0>(), mpl::false_(), cts::bchar_traits()) << " = ";
         bcout << meta_T1::all_attributes::get(t1, mpl::int_<0>()) << endl;
- bcout << meta_T1::all_attributes::base_name(mpl::int_<1>()) << " = ";
+ bcout << meta_T1::all_attributes::get_name(mpl::int_<1>(), mpl::false_(), cts::bchar_traits()) << " = ";
         bcout << meta_T1::all_attributes::get(t1, mpl::int_<1>()) << endl;
- bcout << meta_T1::all_attributes::base_name(mpl::int_<2>()) << " = ";
+ bcout << meta_T1::all_attributes::get_name(mpl::int_<2>(), mpl::false_(), cts::bchar_traits()) << " = ";
         bcout << meta_T1::all_attributes::get(t1, mpl::int_<2>()) << endl;
         bcout << "---------------------------------------------------" << endl;
         //
@@ -133,7 +133,7 @@
         for_each<
                 begin<meta_X::all_attributes>::type,
                 end<meta_X::all_attributes>::type
- >(cref(select_base_name()), cref(str_printer()));
+ >(cref(select_full_name()), cref(str_printer()));
         bcout << "---------------------------------------------------" << endl;
         reverse_for_each<
                 begin<meta_X::all_attributes>::type,


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