2 /* Do not edit! -- generated file */
5 #ifndef _SIGC_MACROS_SLOTHM4_
6 #define _SIGC_MACROS_SLOTHM4_
8 #include <sigc++/functors/slot.h>
10 #ifndef LIBSIGC_DISABLE_DEPRECATED
15 /** Converts an arbitrary functor to a unified type which is opaque.
16 * Slot0 itself is a functor or to be more precise a closure. It contains
17 * a single, arbitrary functor (or closure) that is executed in operator()().
19 * The template arguments determine the function signature of operator()():
20 * - @e T_return The return type of operator()().
22 * To use simply assign the slot to the desired functor. If the functor
23 * is not compatible with the parameter list defined with the template
24 * arguments compiler errors are triggered. When called the slot
25 * will invoke the functor with minimal copies.
26 * block() and unblock() can be used to block the functor's invocation
27 * from operator()() temporarily.
31 * #include <sigc++/slot.h>
33 * SigC::Slot1<void, long> s = SigC::slot(&foo);
37 * @deprecated Use the unnumbered template sigc::slot instead.
40 template <class T_return>
42 : public ::sigc::slot<T_return>
45 typedef ::sigc::slot<T_return> parent_type;
47 /// Constructs an empty slot.
50 /** Constructs a slot from an arbitrary functor.
51 * @param _A_func The desired functor the new slot should be assigned to.
53 template <class T_functor>
54 Slot0(const T_functor& _A_func)
55 : ::sigc::slot<T_return>(_A_func) {}
57 /** Constructs a slot, copying an existing one.
58 * @param src The existing slot to copy.
60 Slot0(const parent_type& src)
63 /** Overrides this slot making a copy from another slot.
64 * @param src The slot from which to make a copy.
67 Slot0& operator=(const parent_type& src)
68 { parent_type::operator=(src); return *this; }
71 /** Converts an arbitrary functor to a unified type which is opaque.
72 * Slot1 itself is a functor or to be more precise a closure. It contains
73 * a single, arbitrary functor (or closure) that is executed in operator()().
75 * The template arguments determine the function signature of operator()():
76 * - @e T_return The return type of operator()().
77 * - @e T_arg1 Argument type used in the definition of operator()().
79 * To use simply assign the slot to the desired functor. If the functor
80 * is not compatible with the parameter list defined with the template
81 * arguments compiler errors are triggered. When called the slot
82 * will invoke the functor with minimal copies.
83 * block() and unblock() can be used to block the functor's invocation
84 * from operator()() temporarily.
88 * #include <sigc++/slot.h>
90 * SigC::Slot1<void, long> s = SigC::slot(&foo);
94 * @deprecated Use the unnumbered template sigc::slot instead.
97 template <class T_return, class T_arg1>
99 : public ::sigc::slot<T_return, T_arg1>
102 typedef ::sigc::slot<T_return, T_arg1> parent_type;
104 /// Constructs an empty slot.
107 /** Constructs a slot from an arbitrary functor.
108 * @param _A_func The desired functor the new slot should be assigned to.
110 template <class T_functor>
111 Slot1(const T_functor& _A_func)
112 : ::sigc::slot<T_return, T_arg1>(_A_func) {}
114 /** Constructs a slot, copying an existing one.
115 * @param src The existing slot to copy.
117 Slot1(const parent_type& src)
118 : parent_type(src) {}
120 /** Overrides this slot making a copy from another slot.
121 * @param src The slot from which to make a copy.
124 Slot1& operator=(const parent_type& src)
125 { parent_type::operator=(src); return *this; }
128 /** Converts an arbitrary functor to a unified type which is opaque.
129 * Slot2 itself is a functor or to be more precise a closure. It contains
130 * a single, arbitrary functor (or closure) that is executed in operator()().
132 * The template arguments determine the function signature of operator()():
133 * - @e T_return The return type of operator()().
134 * - @e T_arg1 Argument type used in the definition of operator()().
135 * - @e T_arg2 Argument type used in the definition of operator()().
137 * To use simply assign the slot to the desired functor. If the functor
138 * is not compatible with the parameter list defined with the template
139 * arguments compiler errors are triggered. When called the slot
140 * will invoke the functor with minimal copies.
141 * block() and unblock() can be used to block the functor's invocation
142 * from operator()() temporarily.
146 * #include <sigc++/slot.h>
148 * SigC::Slot1<void, long> s = SigC::slot(&foo);
152 * @deprecated Use the unnumbered template sigc::slot instead.
155 template <class T_return, class T_arg1,class T_arg2>
157 : public ::sigc::slot<T_return, T_arg1,T_arg2>
160 typedef ::sigc::slot<T_return, T_arg1,T_arg2> parent_type;
162 /// Constructs an empty slot.
165 /** Constructs a slot from an arbitrary functor.
166 * @param _A_func The desired functor the new slot should be assigned to.
168 template <class T_functor>
169 Slot2(const T_functor& _A_func)
170 : ::sigc::slot<T_return, T_arg1,T_arg2>(_A_func) {}
172 /** Constructs a slot, copying an existing one.
173 * @param src The existing slot to copy.
175 Slot2(const parent_type& src)
176 : parent_type(src) {}
178 /** Overrides this slot making a copy from another slot.
179 * @param src The slot from which to make a copy.
182 Slot2& operator=(const parent_type& src)
183 { parent_type::operator=(src); return *this; }
186 /** Converts an arbitrary functor to a unified type which is opaque.
187 * Slot3 itself is a functor or to be more precise a closure. It contains
188 * a single, arbitrary functor (or closure) that is executed in operator()().
190 * The template arguments determine the function signature of operator()():
191 * - @e T_return The return type of operator()().
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()().
196 * To use simply assign the slot to the desired functor. If the functor
197 * is not compatible with the parameter list defined with the template
198 * arguments compiler errors are triggered. When called the slot
199 * will invoke the functor with minimal copies.
200 * block() and unblock() can be used to block the functor's invocation
201 * from operator()() temporarily.
205 * #include <sigc++/slot.h>
207 * SigC::Slot1<void, long> s = SigC::slot(&foo);
211 * @deprecated Use the unnumbered template sigc::slot instead.
214 template <class T_return, class T_arg1,class T_arg2,class T_arg3>
216 : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3>
219 typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3> parent_type;
221 /// Constructs an empty slot.
224 /** Constructs a slot from an arbitrary functor.
225 * @param _A_func The desired functor the new slot should be assigned to.
227 template <class T_functor>
228 Slot3(const T_functor& _A_func)
229 : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3>(_A_func) {}
231 /** Constructs a slot, copying an existing one.
232 * @param src The existing slot to copy.
234 Slot3(const parent_type& src)
235 : parent_type(src) {}
237 /** Overrides this slot making a copy from another slot.
238 * @param src The slot from which to make a copy.
241 Slot3& operator=(const parent_type& src)
242 { parent_type::operator=(src); return *this; }
245 /** Converts an arbitrary functor to a unified type which is opaque.
246 * Slot4 itself is a functor or to be more precise a closure. It contains
247 * a single, arbitrary functor (or closure) that is executed in operator()().
249 * The template arguments determine the function signature of operator()():
250 * - @e T_return The return type of operator()().
251 * - @e T_arg1 Argument type used in the definition of operator()().
252 * - @e T_arg2 Argument type used in the definition of operator()().
253 * - @e T_arg3 Argument type used in the definition of operator()().
254 * - @e T_arg4 Argument type used in the definition of operator()().
256 * To use simply assign the slot to the desired functor. If the functor
257 * is not compatible with the parameter list defined with the template
258 * arguments compiler errors are triggered. When called the slot
259 * will invoke the functor with minimal copies.
260 * block() and unblock() can be used to block the functor's invocation
261 * from operator()() temporarily.
265 * #include <sigc++/slot.h>
267 * SigC::Slot1<void, long> s = SigC::slot(&foo);
271 * @deprecated Use the unnumbered template sigc::slot instead.
274 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
276 : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
279 typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4> parent_type;
281 /// Constructs an empty slot.
284 /** Constructs a slot from an arbitrary functor.
285 * @param _A_func The desired functor the new slot should be assigned to.
287 template <class T_functor>
288 Slot4(const T_functor& _A_func)
289 : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func) {}
291 /** Constructs a slot, copying an existing one.
292 * @param src The existing slot to copy.
294 Slot4(const parent_type& src)
295 : parent_type(src) {}
297 /** Overrides this slot making a copy from another slot.
298 * @param src The slot from which to make a copy.
301 Slot4& operator=(const parent_type& src)
302 { parent_type::operator=(src); return *this; }
305 /** Converts an arbitrary functor to a unified type which is opaque.
306 * Slot5 itself is a functor or to be more precise a closure. It contains
307 * a single, arbitrary functor (or closure) that is executed in operator()().
309 * The template arguments determine the function signature of operator()():
310 * - @e T_return The return type of operator()().
311 * - @e T_arg1 Argument type used in the definition of operator()().
312 * - @e T_arg2 Argument type used in the definition of operator()().
313 * - @e T_arg3 Argument type used in the definition of operator()().
314 * - @e T_arg4 Argument type used in the definition of operator()().
315 * - @e T_arg5 Argument type used in the definition of operator()().
317 * To use simply assign the slot to the desired functor. If the functor
318 * is not compatible with the parameter list defined with the template
319 * arguments compiler errors are triggered. When called the slot
320 * will invoke the functor with minimal copies.
321 * block() and unblock() can be used to block the functor's invocation
322 * from operator()() temporarily.
326 * #include <sigc++/slot.h>
328 * SigC::Slot1<void, long> s = SigC::slot(&foo);
332 * @deprecated Use the unnumbered template sigc::slot instead.
335 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
337 : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
340 typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> parent_type;
342 /// Constructs an empty slot.
345 /** Constructs a slot from an arbitrary functor.
346 * @param _A_func The desired functor the new slot should be assigned to.
348 template <class T_functor>
349 Slot5(const T_functor& _A_func)
350 : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func) {}
352 /** Constructs a slot, copying an existing one.
353 * @param src The existing slot to copy.
355 Slot5(const parent_type& src)
356 : parent_type(src) {}
358 /** Overrides this slot making a copy from another slot.
359 * @param src The slot from which to make a copy.
362 Slot5& operator=(const parent_type& src)
363 { parent_type::operator=(src); return *this; }
366 /** Converts an arbitrary functor to a unified type which is opaque.
367 * Slot6 itself is a functor or to be more precise a closure. It contains
368 * a single, arbitrary functor (or closure) that is executed in operator()().
370 * The template arguments determine the function signature of operator()():
371 * - @e T_return The return type of operator()().
372 * - @e T_arg1 Argument type used in the definition of operator()().
373 * - @e T_arg2 Argument type used in the definition of operator()().
374 * - @e T_arg3 Argument type used in the definition of operator()().
375 * - @e T_arg4 Argument type used in the definition of operator()().
376 * - @e T_arg5 Argument type used in the definition of operator()().
377 * - @e T_arg6 Argument type used in the definition of operator()().
379 * To use simply assign the slot to the desired functor. If the functor
380 * is not compatible with the parameter list defined with the template
381 * arguments compiler errors are triggered. When called the slot
382 * will invoke the functor with minimal copies.
383 * block() and unblock() can be used to block the functor's invocation
384 * from operator()() temporarily.
388 * #include <sigc++/slot.h>
390 * SigC::Slot1<void, long> s = SigC::slot(&foo);
394 * @deprecated Use the unnumbered template sigc::slot instead.
397 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
399 : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
402 typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> parent_type;
404 /// Constructs an empty slot.
407 /** Constructs a slot from an arbitrary functor.
408 * @param _A_func The desired functor the new slot should be assigned to.
410 template <class T_functor>
411 Slot6(const T_functor& _A_func)
412 : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func) {}
414 /** Constructs a slot, copying an existing one.
415 * @param src The existing slot to copy.
417 Slot6(const parent_type& src)
418 : parent_type(src) {}
420 /** Overrides this slot making a copy from another slot.
421 * @param src The slot from which to make a copy.
424 Slot6& operator=(const parent_type& src)
425 { parent_type::operator=(src); return *this; }
428 /** Converts an arbitrary functor to a unified type which is opaque.
429 * Slot7 itself is a functor or to be more precise a closure. It contains
430 * a single, arbitrary functor (or closure) that is executed in operator()().
432 * The template arguments determine the function signature of operator()():
433 * - @e T_return The return type of operator()().
434 * - @e T_arg1 Argument type used in the definition of operator()().
435 * - @e T_arg2 Argument type used in the definition of operator()().
436 * - @e T_arg3 Argument type used in the definition of operator()().
437 * - @e T_arg4 Argument type used in the definition of operator()().
438 * - @e T_arg5 Argument type used in the definition of operator()().
439 * - @e T_arg6 Argument type used in the definition of operator()().
440 * - @e T_arg7 Argument type used in the definition of operator()().
442 * To use simply assign the slot to the desired functor. If the functor
443 * is not compatible with the parameter list defined with the template
444 * arguments compiler errors are triggered. When called the slot
445 * will invoke the functor with minimal copies.
446 * block() and unblock() can be used to block the functor's invocation
447 * from operator()() temporarily.
451 * #include <sigc++/slot.h>
453 * SigC::Slot1<void, long> s = SigC::slot(&foo);
457 * @deprecated Use the unnumbered template sigc::slot instead.
460 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
462 : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
465 typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> parent_type;
467 /// Constructs an empty slot.
470 /** Constructs a slot from an arbitrary functor.
471 * @param _A_func The desired functor the new slot should be assigned to.
473 template <class T_functor>
474 Slot7(const T_functor& _A_func)
475 : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func) {}
477 /** Constructs a slot, copying an existing one.
478 * @param src The existing slot to copy.
480 Slot7(const parent_type& src)
481 : parent_type(src) {}
483 /** Overrides this slot making a copy from another slot.
484 * @param src The slot from which to make a copy.
487 Slot7& operator=(const parent_type& src)
488 { parent_type::operator=(src); return *this; }
493 #ifndef DOXYGEN_SHOULD_SKIP_THIS
494 /* gcc 3.2 reports a strange conflict between SigC::slot() and sigc::slot<>
495 * when "using namespace SigC" and later using a slot(obj,func) overload
496 * without the prefix "SigC::". Probably a compiler bug. I will investigate.
498 * This ugly hack avoids the error:
500 // #define slot(...) make_slot(__VA_ARGS__) /* only works for gcc */
505 /** Creates a functor of type SigC::Slot0 that wraps an existing non-member function.
507 * @param _A_func Pointer to function that should be wrapped.
508 * @return Functor that executes _A_func on invokation.
510 * @deprecated Use sigc::ptr_fun() instead.
513 template <class T_return>
514 inline Slot0<T_return>
515 slot(T_return (*_A_func)())
516 { return Slot0<T_return>(_A_func); }
518 /** Creates a functor of type SigC::Slot1 that wraps an existing non-member function.
520 * @param _A_func Pointer to function that should be wrapped.
521 * @return Functor that executes _A_func on invokation.
523 * @deprecated Use sigc::ptr_fun() instead.
526 template <class T_return, class T_arg1>
527 inline Slot1<T_return, T_arg1>
528 slot(T_return (*_A_func)(T_arg1))
529 { return Slot1<T_return, T_arg1>(_A_func); }
531 /** Creates a functor of type SigC::Slot2 that wraps an existing non-member function.
533 * @param _A_func Pointer to function that should be wrapped.
534 * @return Functor that executes _A_func on invokation.
536 * @deprecated Use sigc::ptr_fun() instead.
539 template <class T_return, class T_arg1,class T_arg2>
540 inline Slot2<T_return, T_arg1,T_arg2>
541 slot(T_return (*_A_func)(T_arg1,T_arg2))
542 { return Slot2<T_return, T_arg1,T_arg2>(_A_func); }
544 /** Creates a functor of type SigC::Slot3 that wraps an existing non-member function.
546 * @param _A_func Pointer to function that should be wrapped.
547 * @return Functor that executes _A_func on invokation.
549 * @deprecated Use sigc::ptr_fun() instead.
552 template <class T_return, class T_arg1,class T_arg2,class T_arg3>
553 inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
554 slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3))
555 { return Slot3<T_return, T_arg1,T_arg2,T_arg3>(_A_func); }
557 /** Creates a functor of type SigC::Slot4 that wraps an existing non-member function.
559 * @param _A_func Pointer to function that should be wrapped.
560 * @return Functor that executes _A_func on invokation.
562 * @deprecated Use sigc::ptr_fun() instead.
565 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
566 inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
567 slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4))
568 { return Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
570 /** Creates a functor of type SigC::Slot5 that wraps an existing non-member function.
572 * @param _A_func Pointer to function that should be wrapped.
573 * @return Functor that executes _A_func on invokation.
575 * @deprecated Use sigc::ptr_fun() instead.
578 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
579 inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
580 slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5))
581 { return Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
583 /** Creates a functor of type SigC::Slot6 that wraps an existing non-member function.
585 * @param _A_func Pointer to function that should be wrapped.
586 * @return Functor that executes _A_func on invokation.
588 * @deprecated Use sigc::ptr_fun() instead.
591 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
592 inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
593 slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6))
594 { return Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
596 /** Creates a functor of type SigC::Slot7 that wraps an existing non-member function.
598 * @param _A_func Pointer to function that should be wrapped.
599 * @return Functor that executes _A_func on invokation.
601 * @deprecated Use sigc::ptr_fun() instead.
604 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
605 inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
606 slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7))
607 { return Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
614 #endif /* _SIGC_MACROS_SLOTHM4_ */