summaryrefslogtreecommitdiff
path: root/libs/sigc++2/sigc++/functors/ptr_fun.h
blob: 5ab6b5ab96a19497c849dc25dac64c6cef0b6c5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
// -*- c++ -*-
/* Do not edit! -- generated file */

#ifndef _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_
#define _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_
#include <sigc++/type_traits.h>
#include <sigc++/functors/functor_trait.h>

namespace sigc {

/** @defgroup ptr_fun ptr_fun()
 * ptr_fun() is used to convert a pointer to a function to a functor.
 * If the function pointer is to an overloaded type, you must specify
 * the types using template arguments starting with the first argument.
 * It is not necessary to supply the return type.
 *
 * @par Example:
 *   @code
 *   void foo(int) {}
 *   sigc::slot<void, int> sl = sigc::ptr_fun(&foo);
 *   @endcode
 *
 * Use ptr_fun#() if there is an abiguity as to the number of arguments.
 *
 * @par Example:
 *   @code
 *   void foo(int) {}  // choose this one
 *   void foo(float) {}
 *   void foo(int, int) {}
 *   sigc::slot<void, long> sl = sigc::ptr_fun1<int>(&foo);
 *   @endcode
 *
 * ptr_fun() can also be used to convert a pointer to a static member
 * function to a functor, like so:
 *
 * @par Example:
 *   @code
 *   struct foo
 *   {
 *     static void bar(int) {}
 *   };
 *   sigc::slot<void, int> sl = sigc::ptr_fun(&foo::bar);
 *   @endcode
 *
 * @ingroup functors
 */

/** pointer_functor0 wraps existing non-member functions with 0 argument(s).
 * Use the convenience function ptr_fun() to create an instance of pointer_functor0.
 *
 * The following template arguments are used:
 * - @e T_return The return type of operator()().
 *
 * @ingroup ptr_fun
 */
template <class T_return>
class pointer_functor0 : public functor_base
{
  typedef T_return (*function_type)();
protected: 
  function_type func_ptr_;
public:
  typedef T_return result_type;

  /// Constructs an invalid functor.
  pointer_functor0() {}

  /** Constructs a pointer_functor0 object that wraps an existing function.
   * @param _A_func Pointer to function that will be invoked from operator()().
   */
  explicit pointer_functor0(function_type _A_func): func_ptr_(_A_func) {}

  /** Execute the wrapped function.
   * @return The return value of the function invocation.
   */
  T_return operator()() const 
    { return func_ptr_(); }
};

/** pointer_functor1 wraps existing non-member functions with 1 argument(s).
 * Use the convenience function ptr_fun() to create an instance of pointer_functor1.
 *
 * The following template arguments are used:
 * - @e T_arg1 Argument type used in the definition of operator()().
 * - @e T_return The return type of operator()().
 *
 * @ingroup ptr_fun
 */
template <class T_arg1, class T_return>
class pointer_functor1 : public functor_base
{
  typedef T_return (*function_type)(T_arg1);
protected: 
  function_type func_ptr_;
public:
  typedef T_return result_type;

  /// Constructs an invalid functor.
  pointer_functor1() {}

  /** Constructs a pointer_functor1 object that wraps an existing function.
   * @param _A_func Pointer to function that will be invoked from operator()().
   */
  explicit pointer_functor1(function_type _A_func): func_ptr_(_A_func) {}

  /** Execute the wrapped function.
   * @param _A_a1 Argument to be passed on to the function.
   * @return The return value of the function invocation.
   */
  T_return operator()(typename type_trait<T_arg1>::take _A_a1) const 
    { return func_ptr_(_A_a1); }
};

/** pointer_functor2 wraps existing non-member functions with 2 argument(s).
 * Use the convenience function ptr_fun() to create an instance of pointer_functor2.
 *
 * The following template arguments are used:
 * - @e T_arg1 Argument type used in the definition of operator()().
 * - @e T_arg2 Argument type used in the definition of operator()().
 * - @e T_return The return type of operator()().
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2, class T_return>
class pointer_functor2 : public functor_base
{
  typedef T_return (*function_type)(T_arg1,T_arg2);
protected: 
  function_type func_ptr_;
public:
  typedef T_return result_type;

  /// Constructs an invalid functor.
  pointer_functor2() {}

  /** Constructs a pointer_functor2 object that wraps an existing function.
   * @param _A_func Pointer to function that will be invoked from operator()().
   */
  explicit pointer_functor2(function_type _A_func): func_ptr_(_A_func) {}

  /** Execute the wrapped function.
   * @param _A_a1 Argument to be passed on to the function.
   * @param _A_a2 Argument to be passed on to the function.
   * @return The return value of the function invocation.
   */
  T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const 
    { return func_ptr_(_A_a1,_A_a2); }
};

/** pointer_functor3 wraps existing non-member functions with 3 argument(s).
 * Use the convenience function ptr_fun() to create an instance of pointer_functor3.
 *
 * The following template arguments are used:
 * - @e T_arg1 Argument type used in the definition of operator()().
 * - @e T_arg2 Argument type used in the definition of operator()().
 * - @e T_arg3 Argument type used in the definition of operator()().
 * - @e T_return The return type of operator()().
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3, class T_return>
class pointer_functor3 : public functor_base
{
  typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3);
protected: 
  function_type func_ptr_;
public:
  typedef T_return result_type;

  /// Constructs an invalid functor.
  pointer_functor3() {}

  /** Constructs a pointer_functor3 object that wraps an existing function.
   * @param _A_func Pointer to function that will be invoked from operator()().
   */
  explicit pointer_functor3(function_type _A_func): func_ptr_(_A_func) {}

  /** Execute the wrapped function.
   * @param _A_a1 Argument to be passed on to the function.
   * @param _A_a2 Argument to be passed on to the function.
   * @param _A_a3 Argument to be passed on to the function.
   * @return The return value of the function invocation.
   */
  T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const 
    { return func_ptr_(_A_a1,_A_a2,_A_a3); }
};

/** pointer_functor4 wraps existing non-member functions with 4 argument(s).
 * Use the convenience function ptr_fun() to create an instance of pointer_functor4.
 *
 * The following template arguments are used:
 * - @e T_arg1 Argument type used in the definition of operator()().
 * - @e T_arg2 Argument type used in the definition of operator()().
 * - @e T_arg3 Argument type used in the definition of operator()().
 * - @e T_arg4 Argument type used in the definition of operator()().
 * - @e T_return The return type of operator()().
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return>
class pointer_functor4 : public functor_base
{
  typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4);
protected: 
  function_type func_ptr_;
public:
  typedef T_return result_type;

  /// Constructs an invalid functor.
  pointer_functor4() {}

  /** Constructs a pointer_functor4 object that wraps an existing function.
   * @param _A_func Pointer to function that will be invoked from operator()().
   */
  explicit pointer_functor4(function_type _A_func): func_ptr_(_A_func) {}

  /** Execute the wrapped function.
   * @param _A_a1 Argument to be passed on to the function.
   * @param _A_a2 Argument to be passed on to the function.
   * @param _A_a3 Argument to be passed on to the function.
   * @param _A_a4 Argument to be passed on to the function.
   * @return The return value of the function invocation.
   */
  T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const 
    { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4); }
};

/** pointer_functor5 wraps existing non-member functions with 5 argument(s).
 * Use the convenience function ptr_fun() to create an instance of pointer_functor5.
 *
 * The following template arguments are used:
 * - @e T_arg1 Argument type used in the definition of operator()().
 * - @e T_arg2 Argument type used in the definition of operator()().
 * - @e T_arg3 Argument type used in the definition of operator()().
 * - @e T_arg4 Argument type used in the definition of operator()().
 * - @e T_arg5 Argument type used in the definition of operator()().
 * - @e T_return The return type of operator()().
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return>
class pointer_functor5 : public functor_base
{
  typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5);
protected: 
  function_type func_ptr_;
public:
  typedef T_return result_type;

  /// Constructs an invalid functor.
  pointer_functor5() {}

  /** Constructs a pointer_functor5 object that wraps an existing function.
   * @param _A_func Pointer to function that will be invoked from operator()().
   */
  explicit pointer_functor5(function_type _A_func): func_ptr_(_A_func) {}

  /** Execute the wrapped function.
   * @param _A_a1 Argument to be passed on to the function.
   * @param _A_a2 Argument to be passed on to the function.
   * @param _A_a3 Argument to be passed on to the function.
   * @param _A_a4 Argument to be passed on to the function.
   * @param _A_a5 Argument to be passed on to the function.
   * @return The return value of the function invocation.
   */
  T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const 
    { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
};

/** pointer_functor6 wraps existing non-member functions with 6 argument(s).
 * Use the convenience function ptr_fun() to create an instance of pointer_functor6.
 *
 * The following template arguments are used:
 * - @e T_arg1 Argument type used in the definition of operator()().
 * - @e T_arg2 Argument type used in the definition of operator()().
 * - @e T_arg3 Argument type used in the definition of operator()().
 * - @e T_arg4 Argument type used in the definition of operator()().
 * - @e T_arg5 Argument type used in the definition of operator()().
 * - @e T_arg6 Argument type used in the definition of operator()().
 * - @e T_return The return type of operator()().
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return>
class pointer_functor6 : public functor_base
{
  typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6);
protected: 
  function_type func_ptr_;
public:
  typedef T_return result_type;

  /// Constructs an invalid functor.
  pointer_functor6() {}

  /** Constructs a pointer_functor6 object that wraps an existing function.
   * @param _A_func Pointer to function that will be invoked from operator()().
   */
  explicit pointer_functor6(function_type _A_func): func_ptr_(_A_func) {}

  /** Execute the wrapped function.
   * @param _A_a1 Argument to be passed on to the function.
   * @param _A_a2 Argument to be passed on to the function.
   * @param _A_a3 Argument to be passed on to the function.
   * @param _A_a4 Argument to be passed on to the function.
   * @param _A_a5 Argument to be passed on to the function.
   * @param _A_a6 Argument to be passed on to the function.
   * @return The return value of the function invocation.
   */
  T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const 
    { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
};

/** pointer_functor7 wraps existing non-member functions with 7 argument(s).
 * Use the convenience function ptr_fun() to create an instance of pointer_functor7.
 *
 * The following template arguments are used:
 * - @e T_arg1 Argument type used in the definition of operator()().
 * - @e T_arg2 Argument type used in the definition of operator()().
 * - @e T_arg3 Argument type used in the definition of operator()().
 * - @e T_arg4 Argument type used in the definition of operator()().
 * - @e T_arg5 Argument type used in the definition of operator()().
 * - @e T_arg6 Argument type used in the definition of operator()().
 * - @e T_arg7 Argument type used in the definition of operator()().
 * - @e T_return The return type of operator()().
 *
 * @ingroup ptr_fun
 */
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>
class pointer_functor7 : public functor_base
{
  typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7);
protected: 
  function_type func_ptr_;
public:
  typedef T_return result_type;

  /// Constructs an invalid functor.
  pointer_functor7() {}

  /** Constructs a pointer_functor7 object that wraps an existing function.
   * @param _A_func Pointer to function that will be invoked from operator()().
   */
  explicit pointer_functor7(function_type _A_func): func_ptr_(_A_func) {}

  /** Execute the wrapped function.
   * @param _A_a1 Argument to be passed on to the function.
   * @param _A_a2 Argument to be passed on to the function.
   * @param _A_a3 Argument to be passed on to the function.
   * @param _A_a4 Argument to be passed on to the function.
   * @param _A_a5 Argument to be passed on to the function.
   * @param _A_a6 Argument to be passed on to the function.
   * @param _A_a7 Argument to be passed on to the function.
   * @return The return value of the function invocation.
   */
  T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const 
    { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
};


// numbered ptr_fun
/** Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_return>
inline pointer_functor0<T_return> 
ptr_fun0(T_return (*_A_func)())
{ return pointer_functor0<T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor1 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1, class T_return>
inline pointer_functor1<T_arg1, T_return> 
ptr_fun1(T_return (*_A_func)(T_arg1))
{ return pointer_functor1<T_arg1, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor2 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2, class T_return>
inline pointer_functor2<T_arg1,T_arg2, T_return> 
ptr_fun2(T_return (*_A_func)(T_arg1,T_arg2))
{ return pointer_functor2<T_arg1,T_arg2, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor3 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3, class T_return>
inline pointer_functor3<T_arg1,T_arg2,T_arg3, T_return> 
ptr_fun3(T_return (*_A_func)(T_arg1,T_arg2,T_arg3))
{ return pointer_functor3<T_arg1,T_arg2,T_arg3, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor4 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return>
inline pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return> 
ptr_fun4(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4))
{ return pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor5 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return>
inline pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return> 
ptr_fun5(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5))
{ return pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor6 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return>
inline pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return> 
ptr_fun6(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6))
{ return pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor7 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
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>
inline pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return> 
ptr_fun7(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7))
{ return pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return>(_A_func); }


// unnumbered ptr_fun
/** Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_return>
inline pointer_functor0<T_return> 
ptr_fun(T_return (*_A_func)())
{ return pointer_functor0<T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor1 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1, class T_return>
inline pointer_functor1<T_arg1, T_return> 
ptr_fun(T_return (*_A_func)(T_arg1))
{ return pointer_functor1<T_arg1, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor2 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2, class T_return>
inline pointer_functor2<T_arg1,T_arg2, T_return> 
ptr_fun(T_return (*_A_func)(T_arg1,T_arg2))
{ return pointer_functor2<T_arg1,T_arg2, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor3 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3, class T_return>
inline pointer_functor3<T_arg1,T_arg2,T_arg3, T_return> 
ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3))
{ return pointer_functor3<T_arg1,T_arg2,T_arg3, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor4 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return>
inline pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return> 
ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4))
{ return pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor5 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return>
inline pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return> 
ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5))
{ return pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor6 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return>
inline pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return> 
ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6))
{ return pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return>(_A_func); }

/** Creates a functor of type sigc::pointer_functor7 which wraps an existing non-member function.
 * @param _A_func Pointer to function that should be wrapped.
 * @return Functor that executes @e _A_func on invokation.
 *
 * @ingroup ptr_fun
 */
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>
inline pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return> 
ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7))
{ return pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return>(_A_func); }


} /* namespace sigc */
#endif /* _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_ */