Boost logo

Boost-Commit :

From: oryol_at_[hidden]
Date: 2008-08-15 17:48:38


Author: jeremypack
Date: 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
New Revision: 48166
URL: http://svn.boost.org/trac/boost/changeset/48166

Log:
Move parameter_map to Extension, from Reflection - for review.

Added:
   sandbox/boost/extension/parameter.hpp
      - copied, changed from r48147, /sandbox/boost/reflection/parameter.hpp
   sandbox/boost/extension/parameter_map.hpp
      - copied, changed from r48147, /sandbox/boost/reflection/parameter_map.hpp
   sandbox/libs/extension/test/parameter_map_test.cpp
      - copied, changed from r48148, /sandbox/libs/reflection/test/parameter_map_test.cpp
Text files modified:
   sandbox/boost/extension/adaptable_factory.hpp | 14 +++++++-------
   sandbox/boost/extension/impl/adaptable_factory.hpp | 2 +-
   sandbox/boost/extension/impl/adaptable_factory_free_functions.hpp | 10 +++++-----
   sandbox/boost/extension/parameter.hpp | 18 +++++++++---------
   sandbox/boost/extension/parameter_map.hpp | 12 ++++++------
   sandbox/libs/extension/test/Jamfile.v2 | 1 +
   sandbox/libs/extension/test/adaptable_factory_test.cpp | 4 ++--
   sandbox/libs/extension/test/parameter_map_test.cpp | 8 ++++----
   8 files changed, 35 insertions(+), 34 deletions(-)

Modified: sandbox/boost/extension/adaptable_factory.hpp
==============================================================================
--- sandbox/boost/extension/adaptable_factory.hpp (original)
+++ sandbox/boost/extension/adaptable_factory.hpp 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
@@ -21,7 +21,7 @@
 #include <boost/extension/common.hpp>
 #include <boost/extension/impl/create.hpp>
 #include <boost/function.hpp>
-#include <boost/reflection/parameter_map.hpp>
+#include <boost/extension/parameter_map.hpp>
 
 namespace boost {
 namespace extensions {
@@ -66,7 +66,7 @@
     * \pre is_valid() == true.
     * \post None.
     */
- Interface* create(boost::reflections::parameter_map& map) const {
+ Interface* create(boost::extensions::parameter_map& map) const {
     return (*func_)(map, parameter_names_);
   }
 
@@ -81,7 +81,7 @@
     * \post None.
     */
   function<Interface* ()> get_function(
- boost::reflections::parameter_map& map) const {
+ boost::extensions::parameter_map& map) const {
     return (*functor_func_)(map, parameter_names_);
   }
 
@@ -93,7 +93,7 @@
     * \post None.
     */
   std::vector<std::pair<TypeInfo, Info> > get_missing_params(
- const boost::reflections::parameter_map& map) const {
+ const boost::extensions::parameter_map& map) const {
     return (*check_func_)(map, parameter_names_);
   }
 
@@ -139,13 +139,13 @@
 # include BOOST_PP_ITERATE()
 private:
   function<Interface* ()> (*functor_func_)(
- boost::reflections::basic_parameter_map<Info>& map,
+ boost::extensions::basic_parameter_map<Info>& map,
     const std::vector<Info>& names);
   Interface* (*func_)(
- boost::reflections::basic_parameter_map<Info>& map,
+ boost::extensions::basic_parameter_map<Info>& map,
     const std::vector<Info>& names);
   std::vector<std::pair<TypeInfo, Info> > (*check_func_)(
- const boost::reflections::basic_parameter_map<Info>& map,
+ const boost::extensions::basic_parameter_map<Info>& map,
     const std::vector<Info>& names);
   std::vector<Info> parameter_names_;
 #endif // BOOST_EXTENSION_DOXYGEN_INVOKED

Modified: sandbox/boost/extension/impl/adaptable_factory.hpp
==============================================================================
--- sandbox/boost/extension/impl/adaptable_factory.hpp (original)
+++ sandbox/boost/extension/impl/adaptable_factory.hpp 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
@@ -1,5 +1,5 @@
 /*
- * Copyright Jeremy Pack 2007
+ * Copyright Jeremy Pack 2008
  * 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)

Modified: sandbox/boost/extension/impl/adaptable_factory_free_functions.hpp
==============================================================================
--- sandbox/boost/extension/impl/adaptable_factory_free_functions.hpp (original)
+++ sandbox/boost/extension/impl/adaptable_factory_free_functions.hpp 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
@@ -13,10 +13,10 @@
 template <class Interface, class Derived, class Info, class TypeInfo
           BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS(N, class Param)>
 inline Interface* create_func(
- boost::reflections::basic_parameter_map<Info, TypeInfo>& map,
+ boost::extensions::basic_parameter_map<Info, TypeInfo>& map,
     const std::vector<Info>& names) {
 #if N
- reflections::generic_parameter<TypeInfo>* gen;
+ extensions::generic_parameter<TypeInfo>* gen;
 #define BOOST_EXTENSION_GET_FROM_LIST(z, n, data) \
   gen = map.template get_first<BOOST_PP_CAT(Param, n)>(names[n]); \
   if (!gen) return 0; \
@@ -31,10 +31,10 @@
 template <class Interface, class Derived, class Info, class TypeInfo
           BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS(N, class Param)>
 inline boost::function<Interface* ()> get_functor_func(
- boost::reflections::basic_parameter_map<Info, TypeInfo>& map,
+ boost::extensions::basic_parameter_map<Info, TypeInfo>& map,
     const std::vector<Info>& names) {
 #if N
- reflections::generic_parameter<TypeInfo>* gen;
+ extensions::generic_parameter<TypeInfo>* gen;
 #define BOOST_EXTENSION_GET_FROM_LIST(z, n, data) \
   gen = map.template get_first<BOOST_PP_CAT(Param, n)>(names[n]); \
   if (!gen) return boost::function<Interface* ()>(); \
@@ -54,7 +54,7 @@
 template <class Info, class TypeInfo BOOST_PP_COMMA_IF(N)
           BOOST_PP_ENUM_PARAMS(N, class Param)>
 inline std::vector<std::pair<TypeInfo, Info> > check_func(
- const boost::reflections::basic_parameter_map<Info, TypeInfo>& map,
+ const boost::extensions::basic_parameter_map<Info, TypeInfo>& map,
     const std::vector<Info>& names) {
   std::vector<std::pair<TypeInfo, Info> > needed_parameters;
 #define BOOST_EXTENSION_CHECK_IN_LIST(z, n, data) \

Copied: sandbox/boost/extension/parameter.hpp (from r48147, /sandbox/boost/reflection/parameter.hpp)
==============================================================================
--- /sandbox/boost/reflection/parameter.hpp (original)
+++ sandbox/boost/extension/parameter.hpp 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
@@ -1,7 +1,7 @@
 /*
  * Boost.Reflection / paramater map (store parameter information for calls)
  *
- * (C) Copyright Mariano G. Consoni 2008
+ * (C) Copyright Jeremy Pack 2008
  * 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)
@@ -10,13 +10,13 @@
  */
 
 
-#ifndef BOOST_REFLECTION_PARAMETER_HPP
-#define BOOST_REFLECTION_PARAMETER_HPP
+#ifndef BOOST_EXTENSION_PARAMETER_HPP
+#define BOOST_EXTENSION_PARAMETER_HPP
 #include <boost/extension/impl/typeinfo.hpp>
 #include <exception>
 #include <map>
 #include <vector>
-namespace boost { namespace reflections {
+namespace boost { namespace extensions {
 using extensions::type_info_handler;
 
 class conversion_not_found_exception : public std::exception {
@@ -117,7 +117,7 @@
   friend class basic_parameter_map;
 
   virtual TypeInfo type() const {
- return reflections::type_info_handler<TypeInfo, T>::get_class_type();
+ return extensions::type_info_handler<TypeInfo, T>::get_class_type();
   }
 
   explicit parameter(T value)
@@ -125,21 +125,21 @@
       value_(value) {
     // Add converter for current type.
     generic_parameter<TypeInfo>::converters_.insert
- (std::make_pair(reflections::type_info_handler<TypeInfo, T>
+ (std::make_pair(extensions::type_info_handler<TypeInfo, T>
                         ::get_class_type(),
                       new default_converter<T>()));
   }
   template <class S>
   void converts_to_with_func(void (*convert_func)(T*, S*)) {
     generic_parameter<TypeInfo>::converters_.insert
- (std::make_pair(reflections::type_info_handler<TypeInfo, S>
+ (std::make_pair(extensions::type_info_handler<TypeInfo, S>
                         ::get_class_type(),
                       new specialized_converter<S>(convert_func)));
   }
   template <class S>
   void converts_to() {
     generic_parameter<TypeInfo>::converters_.insert
- (std::make_pair(reflections::type_info_handler<TypeInfo, S>
+ (std::make_pair(extensions::type_info_handler<TypeInfo, S>
                         ::get_class_type(),
                       new default_converter<S>()));
   }
@@ -173,4 +173,4 @@
 }
 }
 
-#endif // BOOST_REFLECTION_PARAMETER_HPP
+#endif // BOOST_EXTENSION_PARAMETER_HPP

Copied: sandbox/boost/extension/parameter_map.hpp (from r48147, /sandbox/boost/reflection/parameter_map.hpp)
==============================================================================
--- /sandbox/boost/reflection/parameter_map.hpp (original)
+++ sandbox/boost/extension/parameter_map.hpp 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
@@ -1,7 +1,7 @@
 /*
  * Boost.Reflection / paramater map (store parameter information for calls)
  *
- * (C) Copyright Mariano G. Consoni 2008
+ * (C) Copyright Jeremy Pack 2008
  * 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)
@@ -10,16 +10,16 @@
  */
 
 
-#ifndef BOOST_REFLECTION_PARAMETER_MAP_HPP
-#define BOOST_REFLECTION_PARAMETER_MAP_HPP
+#ifndef BOOST_EXTENSION_PARAMETER_MAP_HPP
+#define BOOST_EXTENSION_PARAMETER_MAP_HPP
 #include <boost/extension/impl/typeinfo.hpp>
-#include <boost/reflection/parameter.hpp>
+#include <boost/extension/parameter.hpp>
 #include <exception>
 #include <map>
 #include <string>
 #include <vector>
 
-namespace boost { namespace reflections {
+namespace boost { namespace extensions {
 class parameter_unavailable_exception : public std::exception {
 public:
   virtual const char * what() {
@@ -125,4 +125,4 @@
 typedef basic_parameter_map<> parameter_map;
 }}
 
-#endif // BOOST_REFLECTION_PARAMETER_MAP_HPP
+#endif // BOOST_EXTENSION_PARAMETER_MAP_HPP

Modified: sandbox/libs/extension/test/Jamfile.v2
==============================================================================
--- sandbox/libs/extension/test/Jamfile.v2 (original)
+++ sandbox/libs/extension/test/Jamfile.v2 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
@@ -36,6 +36,7 @@
   [ run shared_library_test.cpp ]
   [ run parameters_test.cpp ]
   [ run executables_test.cpp ]
+ [ run parameter_map_test.cpp ]
   # [ run multiple_inheritance_test.cpp ] # redundant
   [ run extension_test.cpp ]
 :

Modified: sandbox/libs/extension/test/adaptable_factory_test.cpp
==============================================================================
--- sandbox/libs/extension/test/adaptable_factory_test.cpp (original)
+++ sandbox/libs/extension/test/adaptable_factory_test.cpp 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
@@ -10,8 +10,8 @@
  */
 
 #include <boost/extension/adaptable_factory.hpp>
+#include <boost/extension/parameter_map.hpp>
 #include <boost/extension/shared_library.hpp>
-#include <boost/reflection/parameter_map.hpp>
 #include <boost/scoped_ptr.hpp>
 #define BOOST_TEST_MAIN
 #define BOOST_TEST_DYN_LINK 1
@@ -19,7 +19,7 @@
 
 
 using namespace boost::extensions;
-using namespace boost::reflections;
+using namespace boost::extensions;
 using boost::scoped_ptr;
 using boost::function;
 

Copied: sandbox/libs/extension/test/parameter_map_test.cpp (from r48148, /sandbox/libs/reflection/test/parameter_map_test.cpp)
==============================================================================
--- /sandbox/libs/reflection/test/parameter_map_test.cpp (original)
+++ sandbox/libs/extension/test/parameter_map_test.cpp 2008-08-15 17:48:37 EDT (Fri, 15 Aug 2008)
@@ -17,11 +17,11 @@
 #define BOOST_TEST_MAIN
 #define BOOST_TEST_DYN_LINK 1
 #include <boost/test/unit_test.hpp>
-#include <boost/reflection/parameter_map.hpp>
+#include <boost/extension/parameter_map.hpp>
 
-using boost::reflections::parameter_map;
-using boost::reflections::generic_parameter;
-using boost::reflections::parameter;
+using boost::extensions::parameter_map;
+using boost::extensions::generic_parameter;
+using boost::extensions::parameter;
 BOOST_AUTO_TEST_CASE(construction) {
   parameter<int>* p = new parameter<int>(5);
   parameter_map m;


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