[libsigcplusplus/variadic_mem_fun2] Rename mem_functor_base to mem_functor.



commit 975bb8aacc4b3b380bf7dbed0413058b815a011a
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Mar 6 21:15:11 2016 +0100

    Rename mem_functor_base to mem_functor.
    
    And rename bound_mem_functor_base to bound_mem_functor.

 sigc++/adaptors/retype.h            |   12 ++++++------
 sigc++/functors/functor_trait.h     |    4 ++--
 sigc++/functors/macros/mem_fun.h.m4 |   26 +++++++++++++-------------
 sigc++/signal.h                     |    2 +-
 tests/test_size.cc                  |    2 +-
 5 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/sigc++/adaptors/retype.h b/sigc++/adaptors/retype.h
index db3be85..2c511a5 100644
--- a/sigc++/adaptors/retype.h
+++ b/sigc++/adaptors/retype.h
@@ -130,7 +130,7 @@ retype(const pointer_functor<T_return, T_arg...>& _A_functor)
 
 
 /** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on 
to the functor.
- * This function template specialization works on sigc::mem_functor_base.
+ * This function template specialization works on sigc::mem_functor.
  *
  * @param _A_functor Functor that should be wrapped.
  * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
@@ -139,13 +139,13 @@ retype(const pointer_functor<T_return, T_arg...>& _A_functor)
  */
 template <class T_func, class... T_arg>
 inline decltype(auto)
-retype(const mem_functor_base<T_func, T_arg...>& _A_functor)
-{ return retype_functor<mem_functor_base<T_func, T_arg...>, T_arg...>
+retype(const mem_functor<T_func, T_arg...>& _A_functor)
+{ return retype_functor<mem_functor<T_func, T_arg...>, T_arg...>
     (_A_functor);
 }
 
 /** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on 
to the functor.
- * This function template specialization works on sigc::bound_mem_functor_base.
+ * This function template specialization works on sigc::bound_mem_functor.
  *
  * @param _A_functor Functor that should be wrapped.
  * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
@@ -156,8 +156,8 @@ template <
   class T_func,
   class... T_arg>
 inline decltype(auto)
-retype(const bound_mem_functor_base<T_func, T_arg...>& _A_functor)
-{ return retype_functor<bound_mem_functor_base<T_func, T_arg...>, T_arg...>
+retype(const bound_mem_functor<T_func, T_arg...>& _A_functor)
+{ return retype_functor<bound_mem_functor<T_func, T_arg...>, T_arg...>
     (_A_functor);
 }
 
diff --git a/sigc++/functors/functor_trait.h b/sigc++/functors/functor_trait.h
index 366d68c..94d80e7 100644
--- a/sigc++/functors/functor_trait.h
+++ b/sigc++/functors/functor_trait.h
@@ -208,7 +208,7 @@ template <class T_return, class T_obj, class... T_arg>
 struct functor_trait<T_return (T_obj::*)(T_arg...), false, false>
 {
   using result_type = T_return;
-  using functor_type = mem_functor_base<
+  using functor_type = mem_functor<
     T_return (T_obj::*)(T_arg...),
     T_arg...>;
 };
@@ -217,7 +217,7 @@ template <class T_return, class T_obj, class... T_arg>
 struct functor_trait<T_return (T_obj::*)(T_arg...) const, false, false>
 {
   using result_type = T_return;
-  using functor_type = mem_functor_base<
+  using functor_type = mem_functor<
     T_return (T_obj::*)(T_arg...) const,
     T_arg...>;
 };
diff --git a/sigc++/functors/macros/mem_fun.h.m4 b/sigc++/functors/macros/mem_fun.h.m4
index 2d563b8..d3b92bd 100644
--- a/sigc++/functors/macros/mem_fun.h.m4
+++ b/sigc++/functors/macros/mem_fun.h.m4
@@ -28,7 +28,7 @@ define([MEM_FUN],[dnl
 template <class T_return, class T_obj, class... T_arg>
 inline decltype(auto)
 mem_fun(T_return (T_obj::*_A_func)(T_arg...) $3)
-{ return mem_functor_base<
+{ return mem_functor<
     T_return (T_obj::*)(T_arg...) $3,
     T_arg...>(_A_func); }
 
@@ -45,7 +45,7 @@ template <class T_return, class T_obj, class T_obj2, class... T_arg>
 inline decltype(auto)
 mem_fun(/*$2*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg...) $3)
 {
-  return bound_mem_functor_base<
+  return bound_mem_functor<
     T_return (T_obj::*)(T_arg...) $3,
     T_arg...>(*_A_obj, _A_func);
 }
@@ -61,7 +61,7 @@ template <class T_return, class T_obj, class T_obj2, class... T_arg>
 inline decltype(auto)
 mem_fun(/*$2*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...) $3)
 {
-  return bound_mem_functor_base<
+  return bound_mem_functor<
     T_return (T_obj::*)(T_arg...) $3,
     T_arg...>(_A_obj, _A_func);
 }
@@ -132,7 +132,7 @@ namespace sigc {
  */
 
 template <class T_func, class... T_arg>
-class mem_functor_base : public functor_base
+class mem_functor : public functor_base
 {
 public:
   using object_type = typename member_method_class<T_func>::type;
@@ -144,12 +144,12 @@ public:
     member_method_is_const<T_func>::value, const object_type, object_type>;
 
   /// Constructs an invalid functor.
-  mem_functor_base() : func_ptr_(nullptr) {}
+  mem_functor() : func_ptr_(nullptr) {}
 
   /** Constructs a mem_functor object that wraps the passed method.
    * @param _A_func Pointer to method will be invoked from operator()().
    */
-  explicit mem_functor_base(function_type _A_func) : func_ptr_(_A_func) {}
+  explicit mem_functor(function_type _A_func) : func_ptr_(_A_func) {}
 
   /** Execute the wrapped method operating on the passed instance.
    * @param _A_obj Pointer to instance the method should operate on.
@@ -176,10 +176,10 @@ protected:
 
 template <class T_func,
   class... T_arg>
-class bound_mem_functor_base
-: mem_functor_base<T_func, T_arg...>
+class bound_mem_functor
+: mem_functor<T_func, T_arg...>
 {
-  using base_type = mem_functor_base<T_func, T_arg...>;
+  using base_type = mem_functor<T_func, T_arg...>;
 public:
   using function_type = typename base_type::function_type;
   using result_type = typename base_type::result_type;
@@ -192,11 +192,11 @@ public:
     member_method_is_const<T_func>::value,
       limit_reference<const object_type>, limit_reference<object_type>>;
 
-  /** Constructs a bound_mem_functor_base object that wraps the passed method.
+  /** Constructs a bound_mem_functor object that wraps the passed method.
    * @param _A_obj Reference to instance the method will operate on.
    * @param _A_func Pointer to method will be invoked from operator()().
    */
-  bound_mem_functor_base(obj_type_with_modifier& _A_obj, function_type _A_func)
+  bound_mem_functor(obj_type_with_modifier& _A_obj, function_type _A_func)
     : base_type(_A_func),
       obj_(_A_obj)
     {}
@@ -225,11 +225,11 @@ public:
  * @ingroup mem_fun
  */
 template <class T_func, class... T_arg>
-struct visitor<bound_mem_functor_base<T_func, T_arg...> >
+struct visitor<bound_mem_functor<T_func, T_arg...> >
 {
   template <class T_action>
   static void do_visit_each(const T_action& _A_action,
-                            const bound_mem_functor_base<T_func, T_arg...>& _A_target)
+                            const bound_mem_functor<T_func, T_arg...>& _A_target)
   {
     sigc::visit_each(_A_action, _A_target.obj_);
   }
diff --git a/sigc++/signal.h b/sigc++/signal.h
index 307d2c1..07edba2 100644
--- a/sigc++/signal.h
+++ b/sigc++/signal.h
@@ -923,7 +923,7 @@ public:
    */
   decltype(auto) make_slot() const
     {
-      return bound_mem_functor_base<
+      return bound_mem_functor<
         result_type (signal_with_accumulator::*)(type_trait_take_t<T_arg>...) const,
         type_trait_take_t<T_arg>...>(*this, &signal_with_accumulator::emit);
     }
diff --git a/tests/test_size.cc b/tests/test_size.cc
index b05c369..d564a63 100644
--- a/tests/test_size.cc
+++ b/tests/test_size.cc
@@ -44,7 +44,7 @@ int main(int argc, char* argv[])
     std::cout << "  trackable_callback_list: " << sizeof(sigc::internal::trackable_callback_list) << 
std::endl;
     std::cout << "  slot_rep:                " << sizeof(sigc::internal::slot_rep) << std::endl;
     std::cout << "  typed_slot_rep<mem_functor<void,A> >: "
-              << sizeof(sigc::internal::typed_slot_rep<sigc::mem_functor_base<void (A::*)()> >) << std::endl;
+              << sizeof(sigc::internal::typed_slot_rep<sigc::mem_functor<void (A::*)()> >) << std::endl;
     std::cout << "  signal_impl:             " << sizeof(sigc::internal::signal_impl) << std::endl;
   }
   return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]