]> git.tdb.fi Git - ext/sigc++-2.0.git/blob - untracked/sigc++/functors/ptr_fun.h
Import libsigc++ 2.10.8 sources
[ext/sigc++-2.0.git] / untracked / sigc++ / functors / ptr_fun.h
1 // -*- c++ -*-
2 /* Do not edit! -- generated file */
3
4 #ifndef _SIGC_FUNCTORS_PTR_FUN_H_
5 #define _SIGC_FUNCTORS_PTR_FUN_H_
6 #include <sigc++/type_traits.h>
7 #include <sigc++/functors/functor_trait.h>
8
9 namespace sigc {
10
11 /** @defgroup ptr_fun ptr_fun()
12  * ptr_fun() is used to convert a pointer to a function to a functor.
13  * If the function pointer is to an overloaded type, you must specify
14  * the types using template arguments starting with the first argument.
15  * It is not necessary to supply the return type.
16  *
17  * @par Example:
18  * @code
19  * void foo(int) {}
20  * sigc::slot<void, int> sl = sigc::ptr_fun(&foo);
21  * @endcode
22  *
23  * Use ptr_fun#() if there is an ambiguity as to the number of arguments.
24  *
25  * @par Example:
26  * @code
27  * void foo(int) {}  // choose this one
28  * void foo(float) {}
29  * void foo(int, int) {}
30  * sigc::slot<void, long> sl = sigc::ptr_fun1<int>(&foo);
31  * @endcode
32  *
33  * ptr_fun() can also be used to convert a pointer to a static member
34  * function to a functor, like so:
35  *
36  * @par Example:
37  * @code
38  * struct foo
39  * {
40  *   static void bar(int) {}
41  * };
42  * sigc::slot<void, int> sl = sigc::ptr_fun(&foo::bar);
43  * @endcode
44  *
45  * @ingroup sigcfunctors
46  */
47
48 /** pointer_functor0 wraps existing non-member functions with 0 argument(s).
49  * Use the convenience function ptr_fun() to create an instance of pointer_functor0.
50  *
51  * The following template arguments are used:
52  * - @e T_return The return type of operator()().
53  *
54  * @ingroup ptr_fun
55  */
56 template <class T_return>
57 class pointer_functor0 : public functor_base
58 {
59   typedef T_return (*function_type)();
60 protected: 
61   function_type func_ptr_;
62 public:
63   typedef T_return result_type;
64
65   /// Constructs an invalid functor.
66   pointer_functor0() {}
67
68   /** Constructs a pointer_functor0 object that wraps an existing function.
69    * @param _A_func Pointer to function that will be invoked from operator()().
70    */
71   explicit pointer_functor0(function_type _A_func): func_ptr_(_A_func) {}
72
73   /** Execute the wrapped function.
74    * @return The return value of the function invocation.
75    */
76   T_return operator()() const 
77     { return func_ptr_(); }
78 };
79
80 /** pointer_functor1 wraps existing non-member functions with 1 argument(s).
81  * Use the convenience function ptr_fun() to create an instance of pointer_functor1.
82  *
83  * The following template arguments are used:
84  * - @e T_arg1 Argument type used in the definition of operator()().
85  * - @e T_return The return type of operator()().
86  *
87  * @ingroup ptr_fun
88  */
89 template <class T_arg1, class T_return>
90 class pointer_functor1 : public functor_base
91 {
92   typedef T_return (*function_type)(T_arg1);
93 protected: 
94   function_type func_ptr_;
95 public:
96   typedef T_return result_type;
97
98   /// Constructs an invalid functor.
99   pointer_functor1() {}
100
101   /** Constructs a pointer_functor1 object that wraps an existing function.
102    * @param _A_func Pointer to function that will be invoked from operator()().
103    */
104   explicit pointer_functor1(function_type _A_func): func_ptr_(_A_func) {}
105
106   /** Execute the wrapped function.
107    * @param _A_a1 Argument to be passed on to the function.
108    * @return The return value of the function invocation.
109    */
110   T_return operator()(type_trait_take_t<T_arg1> _A_a1) const 
111     { return func_ptr_(_A_a1); }
112 };
113
114 /** pointer_functor2 wraps existing non-member functions with 2 argument(s).
115  * Use the convenience function ptr_fun() to create an instance of pointer_functor2.
116  *
117  * The following template arguments are used:
118  * - @e T_arg1 Argument type used in the definition of operator()().
119  * - @e T_arg2 Argument type used in the definition of operator()().
120  * - @e T_return The return type of operator()().
121  *
122  * @ingroup ptr_fun
123  */
124 template <class T_arg1, class T_arg2, class T_return>
125 class pointer_functor2 : public functor_base
126 {
127   typedef T_return (*function_type)(T_arg1, T_arg2);
128 protected: 
129   function_type func_ptr_;
130 public:
131   typedef T_return result_type;
132
133   /// Constructs an invalid functor.
134   pointer_functor2() {}
135
136   /** Constructs a pointer_functor2 object that wraps an existing function.
137    * @param _A_func Pointer to function that will be invoked from operator()().
138    */
139   explicit pointer_functor2(function_type _A_func): func_ptr_(_A_func) {}
140
141   /** Execute the wrapped function.
142    * @param _A_a1 Argument to be passed on to the function.
143    * @param _A_a2 Argument to be passed on to the function.
144    * @return The return value of the function invocation.
145    */
146   T_return operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2) const 
147     { return func_ptr_(_A_a1, _A_a2); }
148 };
149
150 /** pointer_functor3 wraps existing non-member functions with 3 argument(s).
151  * Use the convenience function ptr_fun() to create an instance of pointer_functor3.
152  *
153  * The following template arguments are used:
154  * - @e T_arg1 Argument type used in the definition of operator()().
155  * - @e T_arg2 Argument type used in the definition of operator()().
156  * - @e T_arg3 Argument type used in the definition of operator()().
157  * - @e T_return The return type of operator()().
158  *
159  * @ingroup ptr_fun
160  */
161 template <class T_arg1, class T_arg2, class T_arg3, class T_return>
162 class pointer_functor3 : public functor_base
163 {
164   typedef T_return (*function_type)(T_arg1, T_arg2, T_arg3);
165 protected: 
166   function_type func_ptr_;
167 public:
168   typedef T_return result_type;
169
170   /// Constructs an invalid functor.
171   pointer_functor3() {}
172
173   /** Constructs a pointer_functor3 object that wraps an existing function.
174    * @param _A_func Pointer to function that will be invoked from operator()().
175    */
176   explicit pointer_functor3(function_type _A_func): func_ptr_(_A_func) {}
177
178   /** Execute the wrapped function.
179    * @param _A_a1 Argument to be passed on to the function.
180    * @param _A_a2 Argument to be passed on to the function.
181    * @param _A_a3 Argument to be passed on to the function.
182    * @return The return value of the function invocation.
183    */
184   T_return operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3) const 
185     { return func_ptr_(_A_a1, _A_a2, _A_a3); }
186 };
187
188 /** pointer_functor4 wraps existing non-member functions with 4 argument(s).
189  * Use the convenience function ptr_fun() to create an instance of pointer_functor4.
190  *
191  * The following template arguments are used:
192  * - @e T_arg1 Argument type used in the definition of operator()().
193  * - @e T_arg2 Argument type used in the definition of operator()().
194  * - @e T_arg3 Argument type used in the definition of operator()().
195  * - @e T_arg4 Argument type used in the definition of operator()().
196  * - @e T_return The return type of operator()().
197  *
198  * @ingroup ptr_fun
199  */
200 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_return>
201 class pointer_functor4 : public functor_base
202 {
203   typedef T_return (*function_type)(T_arg1, T_arg2, T_arg3, T_arg4);
204 protected: 
205   function_type func_ptr_;
206 public:
207   typedef T_return result_type;
208
209   /// Constructs an invalid functor.
210   pointer_functor4() {}
211
212   /** Constructs a pointer_functor4 object that wraps an existing function.
213    * @param _A_func Pointer to function that will be invoked from operator()().
214    */
215   explicit pointer_functor4(function_type _A_func): func_ptr_(_A_func) {}
216
217   /** Execute the wrapped function.
218    * @param _A_a1 Argument to be passed on to the function.
219    * @param _A_a2 Argument to be passed on to the function.
220    * @param _A_a3 Argument to be passed on to the function.
221    * @param _A_a4 Argument to be passed on to the function.
222    * @return The return value of the function invocation.
223    */
224   T_return operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4) const 
225     { return func_ptr_(_A_a1, _A_a2, _A_a3, _A_a4); }
226 };
227
228 /** pointer_functor5 wraps existing non-member functions with 5 argument(s).
229  * Use the convenience function ptr_fun() to create an instance of pointer_functor5.
230  *
231  * The following template arguments are used:
232  * - @e T_arg1 Argument type used in the definition of operator()().
233  * - @e T_arg2 Argument type used in the definition of operator()().
234  * - @e T_arg3 Argument type used in the definition of operator()().
235  * - @e T_arg4 Argument type used in the definition of operator()().
236  * - @e T_arg5 Argument type used in the definition of operator()().
237  * - @e T_return The return type of operator()().
238  *
239  * @ingroup ptr_fun
240  */
241 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_return>
242 class pointer_functor5 : public functor_base
243 {
244   typedef T_return (*function_type)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5);
245 protected: 
246   function_type func_ptr_;
247 public:
248   typedef T_return result_type;
249
250   /// Constructs an invalid functor.
251   pointer_functor5() {}
252
253   /** Constructs a pointer_functor5 object that wraps an existing function.
254    * @param _A_func Pointer to function that will be invoked from operator()().
255    */
256   explicit pointer_functor5(function_type _A_func): func_ptr_(_A_func) {}
257
258   /** Execute the wrapped function.
259    * @param _A_a1 Argument to be passed on to the function.
260    * @param _A_a2 Argument to be passed on to the function.
261    * @param _A_a3 Argument to be passed on to the function.
262    * @param _A_a4 Argument to be passed on to the function.
263    * @param _A_a5 Argument to be passed on to the function.
264    * @return The return value of the function invocation.
265    */
266   T_return operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5) const 
267     { return func_ptr_(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); }
268 };
269
270 /** pointer_functor6 wraps existing non-member functions with 6 argument(s).
271  * Use the convenience function ptr_fun() to create an instance of pointer_functor6.
272  *
273  * The following template arguments are used:
274  * - @e T_arg1 Argument type used in the definition of operator()().
275  * - @e T_arg2 Argument type used in the definition of operator()().
276  * - @e T_arg3 Argument type used in the definition of operator()().
277  * - @e T_arg4 Argument type used in the definition of operator()().
278  * - @e T_arg5 Argument type used in the definition of operator()().
279  * - @e T_arg6 Argument type used in the definition of operator()().
280  * - @e T_return The return type of operator()().
281  *
282  * @ingroup ptr_fun
283  */
284 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_return>
285 class pointer_functor6 : public functor_base
286 {
287   typedef T_return (*function_type)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6);
288 protected: 
289   function_type func_ptr_;
290 public:
291   typedef T_return result_type;
292
293   /// Constructs an invalid functor.
294   pointer_functor6() {}
295
296   /** Constructs a pointer_functor6 object that wraps an existing function.
297    * @param _A_func Pointer to function that will be invoked from operator()().
298    */
299   explicit pointer_functor6(function_type _A_func): func_ptr_(_A_func) {}
300
301   /** Execute the wrapped function.
302    * @param _A_a1 Argument to be passed on to the function.
303    * @param _A_a2 Argument to be passed on to the function.
304    * @param _A_a3 Argument to be passed on to the function.
305    * @param _A_a4 Argument to be passed on to the function.
306    * @param _A_a5 Argument to be passed on to the function.
307    * @param _A_a6 Argument to be passed on to the function.
308    * @return The return value of the function invocation.
309    */
310   T_return operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6) const 
311     { return func_ptr_(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
312 };
313
314 /** pointer_functor7 wraps existing non-member functions with 7 argument(s).
315  * Use the convenience function ptr_fun() to create an instance of pointer_functor7.
316  *
317  * The following template arguments are used:
318  * - @e T_arg1 Argument type used in the definition of operator()().
319  * - @e T_arg2 Argument type used in the definition of operator()().
320  * - @e T_arg3 Argument type used in the definition of operator()().
321  * - @e T_arg4 Argument type used in the definition of operator()().
322  * - @e T_arg5 Argument type used in the definition of operator()().
323  * - @e T_arg6 Argument type used in the definition of operator()().
324  * - @e T_arg7 Argument type used in the definition of operator()().
325  * - @e T_return The return type of operator()().
326  *
327  * @ingroup ptr_fun
328  */
329 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7, class T_return>
330 class pointer_functor7 : public functor_base
331 {
332   typedef T_return (*function_type)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7);
333 protected: 
334   function_type func_ptr_;
335 public:
336   typedef T_return result_type;
337
338   /// Constructs an invalid functor.
339   pointer_functor7() {}
340
341   /** Constructs a pointer_functor7 object that wraps an existing function.
342    * @param _A_func Pointer to function that will be invoked from operator()().
343    */
344   explicit pointer_functor7(function_type _A_func): func_ptr_(_A_func) {}
345
346   /** Execute the wrapped function.
347    * @param _A_a1 Argument to be passed on to the function.
348    * @param _A_a2 Argument to be passed on to the function.
349    * @param _A_a3 Argument to be passed on to the function.
350    * @param _A_a4 Argument to be passed on to the function.
351    * @param _A_a5 Argument to be passed on to the function.
352    * @param _A_a6 Argument to be passed on to the function.
353    * @param _A_a7 Argument to be passed on to the function.
354    * @return The return value of the function invocation.
355    */
356   T_return operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7) const 
357     { return func_ptr_(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); }
358 };
359
360
361 // numbered ptr_fun
362 /** Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member function.
363  * @param _A_func Pointer to function that should be wrapped.
364  * @return Functor that executes @e _A_func on invokation.
365  *
366  * @ingroup ptr_fun
367  */
368 template <class T_return>
369 inline pointer_functor0<T_return> 
370 ptr_fun0(T_return (*_A_func)())
371 { return pointer_functor0<T_return>(_A_func); }
372
373 /** Creates a functor of type sigc::pointer_functor1 which wraps an existing non-member function.
374  * @param _A_func Pointer to function that should be wrapped.
375  * @return Functor that executes @e _A_func on invokation.
376  *
377  * @ingroup ptr_fun
378  */
379 template <class T_arg1, class T_return>
380 inline pointer_functor1<T_arg1, T_return> 
381 ptr_fun1(T_return (*_A_func)(T_arg1))
382 { return pointer_functor1<T_arg1, T_return>(_A_func); }
383
384 /** Creates a functor of type sigc::pointer_functor2 which wraps an existing non-member function.
385  * @param _A_func Pointer to function that should be wrapped.
386  * @return Functor that executes @e _A_func on invokation.
387  *
388  * @ingroup ptr_fun
389  */
390 template <class T_arg1, class T_arg2, class T_return>
391 inline pointer_functor2<T_arg1, T_arg2, T_return> 
392 ptr_fun2(T_return (*_A_func)(T_arg1, T_arg2))
393 { return pointer_functor2<T_arg1, T_arg2, T_return>(_A_func); }
394
395 /** Creates a functor of type sigc::pointer_functor3 which wraps an existing non-member function.
396  * @param _A_func Pointer to function that should be wrapped.
397  * @return Functor that executes @e _A_func on invokation.
398  *
399  * @ingroup ptr_fun
400  */
401 template <class T_arg1, class T_arg2, class T_arg3, class T_return>
402 inline pointer_functor3<T_arg1, T_arg2, T_arg3, T_return> 
403 ptr_fun3(T_return (*_A_func)(T_arg1, T_arg2, T_arg3))
404 { return pointer_functor3<T_arg1, T_arg2, T_arg3, T_return>(_A_func); }
405
406 /** Creates a functor of type sigc::pointer_functor4 which wraps an existing non-member function.
407  * @param _A_func Pointer to function that should be wrapped.
408  * @return Functor that executes @e _A_func on invokation.
409  *
410  * @ingroup ptr_fun
411  */
412 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_return>
413 inline pointer_functor4<T_arg1, T_arg2, T_arg3, T_arg4, T_return> 
414 ptr_fun4(T_return (*_A_func)(T_arg1, T_arg2, T_arg3, T_arg4))
415 { return pointer_functor4<T_arg1, T_arg2, T_arg3, T_arg4, T_return>(_A_func); }
416
417 /** Creates a functor of type sigc::pointer_functor5 which wraps an existing non-member function.
418  * @param _A_func Pointer to function that should be wrapped.
419  * @return Functor that executes @e _A_func on invokation.
420  *
421  * @ingroup ptr_fun
422  */
423 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_return>
424 inline pointer_functor5<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_return> 
425 ptr_fun5(T_return (*_A_func)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5))
426 { return pointer_functor5<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_return>(_A_func); }
427
428 /** Creates a functor of type sigc::pointer_functor6 which wraps an existing non-member function.
429  * @param _A_func Pointer to function that should be wrapped.
430  * @return Functor that executes @e _A_func on invokation.
431  *
432  * @ingroup ptr_fun
433  */
434 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_return>
435 inline pointer_functor6<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_return> 
436 ptr_fun6(T_return (*_A_func)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6))
437 { return pointer_functor6<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_return>(_A_func); }
438
439 /** Creates a functor of type sigc::pointer_functor7 which wraps an existing non-member function.
440  * @param _A_func Pointer to function that should be wrapped.
441  * @return Functor that executes @e _A_func on invokation.
442  *
443  * @ingroup ptr_fun
444  */
445 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7, class T_return>
446 inline pointer_functor7<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_return> 
447 ptr_fun7(T_return (*_A_func)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7))
448 { return pointer_functor7<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_return>(_A_func); }
449
450
451 // unnumbered ptr_fun
452 /** Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member function.
453  * @param _A_func Pointer to function that should be wrapped.
454  * @return Functor that executes @e _A_func on invokation.
455  *
456  * @ingroup ptr_fun
457  */
458 template <class T_return>
459 inline pointer_functor0<T_return> 
460 ptr_fun(T_return (*_A_func)())
461 { return pointer_functor0<T_return>(_A_func); }
462
463 /** Creates a functor of type sigc::pointer_functor1 which wraps an existing non-member function.
464  * @param _A_func Pointer to function that should be wrapped.
465  * @return Functor that executes @e _A_func on invokation.
466  *
467  * @ingroup ptr_fun
468  */
469 template <class T_arg1, class T_return>
470 inline pointer_functor1<T_arg1, T_return> 
471 ptr_fun(T_return (*_A_func)(T_arg1))
472 { return pointer_functor1<T_arg1, T_return>(_A_func); }
473
474 /** Creates a functor of type sigc::pointer_functor2 which wraps an existing non-member function.
475  * @param _A_func Pointer to function that should be wrapped.
476  * @return Functor that executes @e _A_func on invokation.
477  *
478  * @ingroup ptr_fun
479  */
480 template <class T_arg1, class T_arg2, class T_return>
481 inline pointer_functor2<T_arg1, T_arg2, T_return> 
482 ptr_fun(T_return (*_A_func)(T_arg1, T_arg2))
483 { return pointer_functor2<T_arg1, T_arg2, T_return>(_A_func); }
484
485 /** Creates a functor of type sigc::pointer_functor3 which wraps an existing non-member function.
486  * @param _A_func Pointer to function that should be wrapped.
487  * @return Functor that executes @e _A_func on invokation.
488  *
489  * @ingroup ptr_fun
490  */
491 template <class T_arg1, class T_arg2, class T_arg3, class T_return>
492 inline pointer_functor3<T_arg1, T_arg2, T_arg3, T_return> 
493 ptr_fun(T_return (*_A_func)(T_arg1, T_arg2, T_arg3))
494 { return pointer_functor3<T_arg1, T_arg2, T_arg3, T_return>(_A_func); }
495
496 /** Creates a functor of type sigc::pointer_functor4 which wraps an existing non-member function.
497  * @param _A_func Pointer to function that should be wrapped.
498  * @return Functor that executes @e _A_func on invokation.
499  *
500  * @ingroup ptr_fun
501  */
502 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_return>
503 inline pointer_functor4<T_arg1, T_arg2, T_arg3, T_arg4, T_return> 
504 ptr_fun(T_return (*_A_func)(T_arg1, T_arg2, T_arg3, T_arg4))
505 { return pointer_functor4<T_arg1, T_arg2, T_arg3, T_arg4, T_return>(_A_func); }
506
507 /** Creates a functor of type sigc::pointer_functor5 which wraps an existing non-member function.
508  * @param _A_func Pointer to function that should be wrapped.
509  * @return Functor that executes @e _A_func on invokation.
510  *
511  * @ingroup ptr_fun
512  */
513 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_return>
514 inline pointer_functor5<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_return> 
515 ptr_fun(T_return (*_A_func)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5))
516 { return pointer_functor5<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_return>(_A_func); }
517
518 /** Creates a functor of type sigc::pointer_functor6 which wraps an existing non-member function.
519  * @param _A_func Pointer to function that should be wrapped.
520  * @return Functor that executes @e _A_func on invokation.
521  *
522  * @ingroup ptr_fun
523  */
524 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_return>
525 inline pointer_functor6<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_return> 
526 ptr_fun(T_return (*_A_func)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6))
527 { return pointer_functor6<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_return>(_A_func); }
528
529 /** Creates a functor of type sigc::pointer_functor7 which wraps an existing non-member function.
530  * @param _A_func Pointer to function that should be wrapped.
531  * @return Functor that executes @e _A_func on invokation.
532  *
533  * @ingroup ptr_fun
534  */
535 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7, class T_return>
536 inline pointer_functor7<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_return> 
537 ptr_fun(T_return (*_A_func)(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7))
538 { return pointer_functor7<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_return>(_A_func); }
539
540
541 } /* namespace sigc */
542 #endif /* _SIGC_FUNCTORS_PTR_FUN_H_ */