]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add collect_args functions that do not take pointers but references to
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 11 Oct 2000 09:54:17 +0000 (09:54 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 11 Oct 2000 09:54:17 +0000 (09:54 +0000)
objects. They are only for convenience, as one always forgets that we
need `this', but `&object'.

git-svn-id: https://svn.dealii.org/trunk@3402 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/thread_management.h

index 7a0d984ab21983decb2694a6c11f32f63debd721..d5ef6ab2aaf60da57dbf6dbe234fe8b43eb85ea5 100644 (file)
@@ -1130,6 +1130,20 @@ namespace Threads
                                            * from that.
                                            */
          FunEncapsulation collect_args (Class *object);
+
+                                          /**
+                                           * Same as above, but take
+                                           * a reference instead of a
+                                           * pointer. This allows us
+                                           * to be a little
+                                           * convenient, as we can
+                                           * use @p{object} or
+                                           * @p{this}, without taking
+                                           * care that one is a
+                                           * reference and the other
+                                           * a pointer.
+                                           */
+         FunEncapsulation collect_args (Class &object);
     
        private:
                                           /**
@@ -1239,8 +1253,23 @@ namespace Threads
                                            * from that.
                                            */
          FunEncapsulation collect_args (Class *object,
-                                        Arg1 arg1);
-    
+                                        Arg1   arg1);
+
+                                          /**
+                                           * Same as above, but take
+                                           * a reference instead of a
+                                           * pointer. This allows us
+                                           * to be a little
+                                           * convenient, as we can
+                                           * use @p{object} or
+                                           * @p{this}, without taking
+                                           * care that one is a
+                                           * reference and the other
+                                           * a pointer.
+                                           */
+         FunEncapsulation collect_args (Class &object,
+                                        Arg1   arg1);
+
        private:
                                           /**
                                            * Space to temporarily store
@@ -1353,6 +1382,22 @@ namespace Threads
          FunEncapsulation collect_args (Class *object,
                                         Arg1 arg1,
                                         Arg2 arg2);
+         
+                                          /**
+                                           * Same as above, but take
+                                           * a reference instead of a
+                                           * pointer. This allows us
+                                           * to be a little
+                                           * convenient, as we can
+                                           * use @p{object} or
+                                           * @p{this}, without taking
+                                           * care that one is a
+                                           * reference and the other
+                                           * a pointer.
+                                           */
+         FunEncapsulation collect_args (Class &object,
+                                        Arg1   arg1,
+                                        Arg2   arg2);
     
        private:
                                           /**
@@ -1469,6 +1514,23 @@ namespace Threads
                                         Arg2 arg2,
                                         Arg3 arg3);
     
+                                          /**
+                                           * Same as above, but take
+                                           * a reference instead of a
+                                           * pointer. This allows us
+                                           * to be a little
+                                           * convenient, as we can
+                                           * use @p{object} or
+                                           * @p{this}, without taking
+                                           * care that one is a
+                                           * reference and the other
+                                           * a pointer.
+                                           */
+         FunEncapsulation collect_args (Class &object,
+                                        Arg1   arg1,
+                                        Arg2   arg2,
+                                        Arg3   arg3);
+
        private:
                                           /**
                                            * Space to temporarily store
@@ -1588,6 +1650,23 @@ namespace Threads
                                         Arg3 arg3,
                                         Arg4 arg4);
     
+                                          /**
+                                           * Same as above, but take
+                                           * a reference instead of a
+                                           * pointer. This allows us
+                                           * to be a little
+                                           * convenient, as we can
+                                           * use @p{object} or
+                                           * @p{this}, without taking
+                                           * care that one is a
+                                           * reference and the other
+                                           * a pointer.
+                                           */
+         FunEncapsulation collect_args (Class &object,
+                                        Arg1   arg1,
+                                        Arg2   arg2,
+                                        Arg3   arg3,
+                                        Arg4   arg4);
        private:
                                           /**
                                            * Space to temporarily store
@@ -1710,6 +1789,24 @@ namespace Threads
                                         Arg4 arg4,
                                         Arg5 arg5);
     
+                                          /**
+                                           * Same as above, but take
+                                           * a reference instead of a
+                                           * pointer. This allows us
+                                           * to be a little
+                                           * convenient, as we can
+                                           * use @p{object} or
+                                           * @p{this}, without taking
+                                           * care that one is a
+                                           * reference and the other
+                                           * a pointer.
+                                           */
+         FunEncapsulation collect_args (Class &object,
+                                        Arg1   arg1,
+                                        Arg2   arg2,
+                                        Arg3   arg3,
+                                        Arg4   arg4,
+                                        Arg5   arg5);
        private:
                                           /**
                                            * Space to temporarily store
@@ -1835,6 +1932,25 @@ namespace Threads
                                         Arg5 arg5,
                                         Arg6 arg6);
     
+                                          /**
+                                           * Same as above, but take
+                                           * a reference instead of a
+                                           * pointer. This allows us
+                                           * to be a little
+                                           * convenient, as we can
+                                           * use @p{object} or
+                                           * @p{this}, without taking
+                                           * care that one is a
+                                           * reference and the other
+                                           * a pointer.
+                                           */
+         FunEncapsulation collect_args (Class &object,
+                                        Arg1   arg1,
+                                        Arg2   arg2,
+                                        Arg3   arg3,
+                                        Arg4   arg4,
+                                        Arg5   arg5,
+                                        Arg6   arg6);
        private:
                                           /**
                                            * Space to temporarily store
@@ -2904,6 +3020,16 @@ namespace Threads
  
 
 
+  template <class Class, typename RetType>
+  inline
+  FunEncapsulation
+  MemFunData0<Class,RetType>::ArgCollector::collect_args (Class &object)
+  {
+    return collect_args (&object);
+  };
+
+
 /* ---------------------- MemFunData1 implementation ------------------------ */
 
   template <class Class, typename Arg1, typename RetType>
@@ -2986,7 +3112,16 @@ namespace Threads
  
   
 
+  template <class Class, typename Arg1, typename RetType>
+  inline
+  FunEncapsulation
+  MemFunData1<Class,Arg1,RetType>::ArgCollector::collect_args (Class &object,
+                                                              Arg1   arg1)
+  {
+    return collect_args (&object, arg1);
+  };
 
+  
 /* ---------------------- MemFunData2 implementation ------------------------ */
 
   template <class Class, typename Arg1, typename Arg2, typename RetType>
@@ -3074,6 +3209,17 @@ namespace Threads
   };
  
   
+  template <class Class, typename Arg1, typename Arg2, typename RetType>
+  inline
+  FunEncapsulation
+  MemFunData2<Class,Arg1,Arg2,RetType>::ArgCollector::collect_args (Class &object,
+                                                                   Arg1   arg1,
+                                                                   Arg2   arg2)
+  {
+    return collect_args (&object, arg1, arg2);
+  };
+  
 
 
 /* ---------------------- MemFunData3 implementation ------------------------ */
@@ -3169,6 +3315,18 @@ namespace Threads
   };
  
   
+  
+  template <class Class, typename Arg1, typename Arg2, typename Arg3, typename RetType>
+  inline
+  FunEncapsulation
+  MemFunData3<Class,Arg1,Arg2,Arg3,RetType>::ArgCollector::collect_args (Class &object,
+                                                                        Arg1   arg1,
+                                                                        Arg2   arg2,
+                                                                        Arg3   arg3)
+  {
+    return collect_args (&object, arg1, arg2, arg3);
+  };
+  
 
 
 /* ---------------------- MemFunData4 implementation ------------------------ */
@@ -3270,6 +3428,18 @@ namespace Threads
  
   
 
+  template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename RetType>
+  inline
+  FunEncapsulation
+  MemFunData4<Class,Arg1,Arg2,Arg3,Arg4,RetType>::ArgCollector::collect_args (Class &object,
+                                                                             Arg1   arg1,
+                                                                             Arg2   arg2,
+                                                                             Arg3   arg3,
+                                                                             Arg4   arg4)
+  {
+    return collect_args (&object, arg1, arg2, arg3, arg4);
+  };
+  
 
 /* ---------------------- MemFunData5 implementation ------------------------ */
 
@@ -3373,6 +3543,20 @@ namespace Threads
                                                                arg1, arg2, arg3, arg4, arg5);
   };
  
+
+  
+  template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename RetType>
+  inline
+  FunEncapsulation
+  MemFunData5<Class,Arg1,Arg2,Arg3,Arg4,Arg5,RetType>::ArgCollector::collect_args (Class &object,
+                                                                                  Arg1   arg1,
+                                                                                  Arg2   arg2,
+                                                                                  Arg3   arg3,
+                                                                                  Arg4   arg4,
+                                                                                  Arg5   arg5)
+  {
+    return collect_args (&object, arg1, arg2, arg3, arg4, arg5);
+  };
   
 
   
@@ -3478,14 +3662,28 @@ namespace Threads
                                                                                        Arg4   arg4,
                                                                                        Arg5   arg5,
                                                                                        Arg6   arg6)
-    {
-      return new MemFunData6<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,void>(fun_ptr, object,
-                                                                      arg1, arg2, arg3, arg4, arg5, arg6);
+  {
+    return new MemFunData6<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,void>(fun_ptr, object,
+                                                                    arg1, arg2, arg3, arg4, arg5, arg6);
   };
   
 
 
+  template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename RetType>
+  inline
+  FunEncapsulation
+  MemFunData6<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,RetType>::ArgCollector::collect_args (Class &object,
+                                                                                       Arg1   arg1,
+                                                                                       Arg2   arg2,
+                                                                                       Arg3   arg3,
+                                                                                       Arg4   arg4,
+                                                                                       Arg5   arg5,
+                                                                                       Arg6   arg6)
+    {
+      return collect_args (&object, arg1, arg2, arg3, arg4, arg5, arg6);
+    };
+  
+
 /* ---------------------------------------------------------------- */
 
   inline

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.