2 /* Do not edit! -- generated file */
3 #ifndef _SIGC_FUNCTORS_MACROS_SLOTHM4_
4 #define _SIGC_FUNCTORS_MACROS_SLOTHM4_
5 #include <sigc++/trackable.h>
6 #include <sigc++/visit_each.h>
7 #include <sigc++/adaptors/adaptor_trait.h>
8 #include <sigc++/functors/slot_base.h>
15 * A typed slot_rep holds a functor that can be invoked from
16 * slot::operator()(). visit_each() is used to visit the functor's
17 * targets that inherit trackable recursively and register the
18 * notification callback. Consequently the slot_rep object will be
19 * notified when some referred object is destroyed or overwritten.
21 template <class T_functor>
22 struct typed_slot_rep : public slot_rep
24 typedef typed_slot_rep<T_functor> self;
26 /* Use an adaptor type so that arguments can be passed as const references
27 * through explicit template instantiation from slot_call#::call_it() */
28 typedef typename adaptor_trait<T_functor>::adaptor_type adaptor_type;
30 /** The functor contained by this slot_rep object. */
31 adaptor_type functor_;
33 /** Constructs an invalid typed slot_rep object.
34 * The notification callback is registered using visit_each().
35 * @param functor The functor contained by the new slot_rep object.
37 inline typed_slot_rep(const T_functor& functor)
38 : slot_rep(0, &destroy, &dup), functor_(functor)
39 { visit_each_type<trackable*>(slot_do_bind(this), functor_); }
41 inline typed_slot_rep(const typed_slot_rep& cl)
42 : slot_rep(cl.call_, &destroy, &dup), functor_(cl.functor_)
43 { visit_each_type<trackable*>(slot_do_bind(this), functor_); }
45 inline ~typed_slot_rep()
49 visit_each_type<trackable*>(slot_do_unbind(this), functor_);
52 /** Detaches the stored functor from the other referred trackables and destroys it.
53 * This does not destroy the base slot_rep object.
55 static void* destroy(void* data)
57 self* self_ = static_cast<self*>(reinterpret_cast<slot_rep*>(data));
60 visit_each_type<trackable*>(slot_do_unbind(self_), self_->functor_);
61 self_->functor_.~adaptor_type();
62 /* don't call disconnect() here: destroy() is either called
63 * a) from the parent itself (in which case disconnect() leads to a segfault) or
64 * b) from a parentless slot (in which case disconnect() does nothing)
69 /** Makes a deep copy of the slot_rep object.
70 * Deep copy means that the notification callback of the new
71 * slot_rep object is registered in the referred trackables.
72 * @return A deep copy of the slot_rep object.
74 static void* dup(void* data)
76 slot_rep* a_rep = reinterpret_cast<slot_rep*>(data);
77 return static_cast<slot_rep*>(new self(*static_cast<self*>(a_rep)));
82 /** Abstracts functor execution.
83 * call_it() invokes a functor of type @e T_functor with a list of
84 * parameters whose types are given by the template arguments.
85 * address() forms a function pointer from call_it().
87 * The following template arguments are used:
88 * - @e T_functor The functor type.
89 * - @e T_return The return type of call_it().
92 template<class T_functor, class T_return>
95 /** Invokes a functor of type @p T_functor.
96 * @param rep slot_rep object that holds a functor of type @p T_functor.
97 * @return The return values of the functor invocation.
99 static T_return call_it(slot_rep* rep)
101 typedef typed_slot_rep<T_functor> typed_slot;
102 typed_slot *typed_rep = static_cast<typed_slot*>(rep);
103 return (typed_rep->functor_)();
106 /** Forms a function pointer from call_it().
107 * @return A function pointer formed from call_it().
109 static hook address()
110 { return reinterpret_cast<hook>(&call_it); }
113 /** Abstracts functor execution.
114 * call_it() invokes a functor of type @e T_functor with a list of
115 * parameters whose types are given by the template arguments.
116 * address() forms a function pointer from call_it().
118 * The following template arguments are used:
119 * - @e T_functor The functor type.
120 * - @e T_return The return type of call_it().
121 * - @e T_arg1 Argument type used in the definition of call_it().
124 template<class T_functor, class T_return, class T_arg1>
127 /** Invokes a functor of type @p T_functor.
128 * @param rep slot_rep object that holds a functor of type @p T_functor.
129 * @param _A_a1 Argument to be passed on to the functor.
130 * @return The return values of the functor invocation.
132 static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1)
134 typedef typed_slot_rep<T_functor> typed_slot;
135 typed_slot *typed_rep = static_cast<typed_slot*>(rep);
136 return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take>
140 /** Forms a function pointer from call_it().
141 * @return A function pointer formed from call_it().
143 static hook address()
144 { return reinterpret_cast<hook>(&call_it); }
147 /** Abstracts functor execution.
148 * call_it() invokes a functor of type @e T_functor with a list of
149 * parameters whose types are given by the template arguments.
150 * address() forms a function pointer from call_it().
152 * The following template arguments are used:
153 * - @e T_functor The functor type.
154 * - @e T_return The return type of call_it().
155 * - @e T_arg1 Argument type used in the definition of call_it().
156 * - @e T_arg2 Argument type used in the definition of call_it().
159 template<class T_functor, class T_return, class T_arg1,class T_arg2>
162 /** Invokes a functor of type @p T_functor.
163 * @param rep slot_rep object that holds a functor of type @p T_functor.
164 * @param _A_a1 Argument to be passed on to the functor.
165 * @param _A_a2 Argument to be passed on to the functor.
166 * @return The return values of the functor invocation.
168 static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2)
170 typedef typed_slot_rep<T_functor> typed_slot;
171 typed_slot *typed_rep = static_cast<typed_slot*>(rep);
172 return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take>
176 /** Forms a function pointer from call_it().
177 * @return A function pointer formed from call_it().
179 static hook address()
180 { return reinterpret_cast<hook>(&call_it); }
183 /** Abstracts functor execution.
184 * call_it() invokes a functor of type @e T_functor with a list of
185 * parameters whose types are given by the template arguments.
186 * address() forms a function pointer from call_it().
188 * The following template arguments are used:
189 * - @e T_functor The functor type.
190 * - @e T_return The return type of call_it().
191 * - @e T_arg1 Argument type used in the definition of call_it().
192 * - @e T_arg2 Argument type used in the definition of call_it().
193 * - @e T_arg3 Argument type used in the definition of call_it().
196 template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3>
199 /** Invokes a functor of type @p T_functor.
200 * @param rep slot_rep object that holds a functor of type @p T_functor.
201 * @param _A_a1 Argument to be passed on to the functor.
202 * @param _A_a2 Argument to be passed on to the functor.
203 * @param _A_a3 Argument to be passed on to the functor.
204 * @return The return values of the functor invocation.
206 static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3)
208 typedef typed_slot_rep<T_functor> typed_slot;
209 typed_slot *typed_rep = static_cast<typed_slot*>(rep);
210 return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take>
214 /** Forms a function pointer from call_it().
215 * @return A function pointer formed from call_it().
217 static hook address()
218 { return reinterpret_cast<hook>(&call_it); }
221 /** Abstracts functor execution.
222 * call_it() invokes a functor of type @e T_functor with a list of
223 * parameters whose types are given by the template arguments.
224 * address() forms a function pointer from call_it().
226 * The following template arguments are used:
227 * - @e T_functor The functor type.
228 * - @e T_return The return type of call_it().
229 * - @e T_arg1 Argument type used in the definition of call_it().
230 * - @e T_arg2 Argument type used in the definition of call_it().
231 * - @e T_arg3 Argument type used in the definition of call_it().
232 * - @e T_arg4 Argument type used in the definition of call_it().
235 template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
238 /** Invokes a functor of type @p T_functor.
239 * @param rep slot_rep object that holds a functor of type @p T_functor.
240 * @param _A_a1 Argument to be passed on to the functor.
241 * @param _A_a2 Argument to be passed on to the functor.
242 * @param _A_a3 Argument to be passed on to the functor.
243 * @param _A_a4 Argument to be passed on to the functor.
244 * @return The return values of the functor invocation.
246 static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3,typename type_trait<T_arg4>::take a_4)
248 typedef typed_slot_rep<T_functor> typed_slot;
249 typed_slot *typed_rep = static_cast<typed_slot*>(rep);
250 return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take>
254 /** Forms a function pointer from call_it().
255 * @return A function pointer formed from call_it().
257 static hook address()
258 { return reinterpret_cast<hook>(&call_it); }
261 /** Abstracts functor execution.
262 * call_it() invokes a functor of type @e T_functor with a list of
263 * parameters whose types are given by the template arguments.
264 * address() forms a function pointer from call_it().
266 * The following template arguments are used:
267 * - @e T_functor The functor type.
268 * - @e T_return The return type of call_it().
269 * - @e T_arg1 Argument type used in the definition of call_it().
270 * - @e T_arg2 Argument type used in the definition of call_it().
271 * - @e T_arg3 Argument type used in the definition of call_it().
272 * - @e T_arg4 Argument type used in the definition of call_it().
273 * - @e T_arg5 Argument type used in the definition of call_it().
276 template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
279 /** Invokes a functor of type @p T_functor.
280 * @param rep slot_rep object that holds a functor of type @p T_functor.
281 * @param _A_a1 Argument to be passed on to the functor.
282 * @param _A_a2 Argument to be passed on to the functor.
283 * @param _A_a3 Argument to be passed on to the functor.
284 * @param _A_a4 Argument to be passed on to the functor.
285 * @param _A_a5 Argument to be passed on to the functor.
286 * @return The return values of the functor invocation.
288 static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3,typename type_trait<T_arg4>::take a_4,typename type_trait<T_arg5>::take a_5)
290 typedef typed_slot_rep<T_functor> typed_slot;
291 typed_slot *typed_rep = static_cast<typed_slot*>(rep);
292 return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take>
293 (a_1,a_2,a_3,a_4,a_5);
296 /** Forms a function pointer from call_it().
297 * @return A function pointer formed from call_it().
299 static hook address()
300 { return reinterpret_cast<hook>(&call_it); }
303 /** Abstracts functor execution.
304 * call_it() invokes a functor of type @e T_functor with a list of
305 * parameters whose types are given by the template arguments.
306 * address() forms a function pointer from call_it().
308 * The following template arguments are used:
309 * - @e T_functor The functor type.
310 * - @e T_return The return type of call_it().
311 * - @e T_arg1 Argument type used in the definition of call_it().
312 * - @e T_arg2 Argument type used in the definition of call_it().
313 * - @e T_arg3 Argument type used in the definition of call_it().
314 * - @e T_arg4 Argument type used in the definition of call_it().
315 * - @e T_arg5 Argument type used in the definition of call_it().
316 * - @e T_arg6 Argument type used in the definition of call_it().
319 template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
322 /** Invokes a functor of type @p T_functor.
323 * @param rep slot_rep object that holds a functor of type @p T_functor.
324 * @param _A_a1 Argument to be passed on to the functor.
325 * @param _A_a2 Argument to be passed on to the functor.
326 * @param _A_a3 Argument to be passed on to the functor.
327 * @param _A_a4 Argument to be passed on to the functor.
328 * @param _A_a5 Argument to be passed on to the functor.
329 * @param _A_a6 Argument to be passed on to the functor.
330 * @return The return values of the functor invocation.
332 static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3,typename type_trait<T_arg4>::take a_4,typename type_trait<T_arg5>::take a_5,typename type_trait<T_arg6>::take a_6)
334 typedef typed_slot_rep<T_functor> typed_slot;
335 typed_slot *typed_rep = static_cast<typed_slot*>(rep);
336 return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take,typename type_trait<T_arg6>::take>
337 (a_1,a_2,a_3,a_4,a_5,a_6);
340 /** Forms a function pointer from call_it().
341 * @return A function pointer formed from call_it().
343 static hook address()
344 { return reinterpret_cast<hook>(&call_it); }
347 /** Abstracts functor execution.
348 * call_it() invokes a functor of type @e T_functor with a list of
349 * parameters whose types are given by the template arguments.
350 * address() forms a function pointer from call_it().
352 * The following template arguments are used:
353 * - @e T_functor The functor type.
354 * - @e T_return The return type of call_it().
355 * - @e T_arg1 Argument type used in the definition of call_it().
356 * - @e T_arg2 Argument type used in the definition of call_it().
357 * - @e T_arg3 Argument type used in the definition of call_it().
358 * - @e T_arg4 Argument type used in the definition of call_it().
359 * - @e T_arg5 Argument type used in the definition of call_it().
360 * - @e T_arg6 Argument type used in the definition of call_it().
361 * - @e T_arg7 Argument type used in the definition of call_it().
364 template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
367 /** Invokes a functor of type @p T_functor.
368 * @param rep slot_rep object that holds a functor of type @p T_functor.
369 * @param _A_a1 Argument to be passed on to the functor.
370 * @param _A_a2 Argument to be passed on to the functor.
371 * @param _A_a3 Argument to be passed on to the functor.
372 * @param _A_a4 Argument to be passed on to the functor.
373 * @param _A_a5 Argument to be passed on to the functor.
374 * @param _A_a6 Argument to be passed on to the functor.
375 * @param _A_a7 Argument to be passed on to the functor.
376 * @return The return values of the functor invocation.
378 static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3,typename type_trait<T_arg4>::take a_4,typename type_trait<T_arg5>::take a_5,typename type_trait<T_arg6>::take a_6,typename type_trait<T_arg7>::take a_7)
380 typedef typed_slot_rep<T_functor> typed_slot;
381 typed_slot *typed_rep = static_cast<typed_slot*>(rep);
382 return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take,typename type_trait<T_arg6>::take,typename type_trait<T_arg7>::take>
383 (a_1,a_2,a_3,a_4,a_5,a_6,a_7);
386 /** Forms a function pointer from call_it().
387 * @return A function pointer formed from call_it().
389 static hook address()
390 { return reinterpret_cast<hook>(&call_it); }
393 } /* namespace internal */
396 /** Converts an arbitrary functor to a unified type which is opaque.
397 * sigc::slot itself is a functor or to be more precise a closure. It contains
398 * a single, arbitrary functor (or closure) that is executed in operator()().
400 * The template arguments determine the function signature of operator()():
401 * - @e T_return The return type of operator()().
403 * To use simply assign the slot to the desired functor. If the functor
404 * is not compatible with the parameter list defined with the template
405 * arguments compiler errors are triggered. When called the slot
406 * will invoke the functor with minimal copies.
407 * block() and unblock() can be used to block the functor's invocation
408 * from operator()() temporarily.
410 * You should use the more convenient unnumbered sigc::slot template.
414 /* TODO: Where put the following bit of information? I can't make any
415 * sense of the "because", by the way!
417 * Because slot is opaque, visit_each() will not visit its internal members.
419 template <class T_return>
424 typedef T_return result_type;
427 #ifndef DOXYGEN_SHOULD_SKIP_THIS
429 typedef internal::slot_rep rep_type;
431 typedef T_return (*call_type)(rep_type*);
434 /** Invoke the contained functor unless slot is in blocking state.
435 * @return The return value of the functor invocation.
437 inline T_return operator()() const
439 if (!empty() && !blocked())
440 return (reinterpret_cast<call_type>(slot_base::rep_->call_))(slot_base::rep_);
446 /** Constructs a slot from an arbitrary functor.
447 * @param _A_func The desirer functor the new slot should be assigned to.
449 template <class T_functor>
450 slot0(const T_functor& _A_func)
451 : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
453 //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
454 slot_base::rep_->call_ = internal::slot_call0<T_functor, T_return>::address();
457 slot0(const slot0& src)
460 /** Overrides this slot making a copy from another slot.
461 * @param src The slot from which to make a copy.
464 slot0& operator=(const slot0& src)
465 { slot_base::operator=(src); return *this; }
468 /** Converts an arbitrary functor to a unified type which is opaque.
469 * sigc::slot itself is a functor or to be more precise a closure. It contains
470 * a single, arbitrary functor (or closure) that is executed in operator()().
472 * The template arguments determine the function signature of operator()():
473 * - @e T_return The return type of operator()().
474 * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
476 * To use simply assign the slot to the desired functor. If the functor
477 * is not compatible with the parameter list defined with the template
478 * arguments compiler errors are triggered. When called the slot
479 * will invoke the functor with minimal copies.
480 * block() and unblock() can be used to block the functor's invocation
481 * from operator()() temporarily.
483 * You should use the more convenient unnumbered sigc::slot template.
487 /* TODO: Where put the following bit of information? I can't make any
488 * sense of the "because", by the way!
490 * Because slot is opaque, visit_each() will not visit its internal members.
492 template <class T_return, class T_arg1>
497 typedef T_return result_type;
498 typedef typename type_trait<T_arg1>::take arg1_type_;
501 #ifndef DOXYGEN_SHOULD_SKIP_THIS
503 typedef internal::slot_rep rep_type;
505 typedef T_return (*call_type)(rep_type*, arg1_type_);
508 /** Invoke the contained functor unless slot is in blocking state.
509 * @param _A_a1 Argument to be passed on to the functor.
510 * @return The return value of the functor invocation.
512 inline T_return operator()(arg1_type_ _A_a1) const
514 if (!empty() && !blocked())
515 return (reinterpret_cast<call_type>(slot_base::rep_->call_))(slot_base::rep_, _A_a1);
521 /** Constructs a slot from an arbitrary functor.
522 * @param _A_func The desirer functor the new slot should be assigned to.
524 template <class T_functor>
525 slot1(const T_functor& _A_func)
526 : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
528 //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
529 slot_base::rep_->call_ = internal::slot_call1<T_functor, T_return, T_arg1>::address();
532 slot1(const slot1& src)
535 /** Overrides this slot making a copy from another slot.
536 * @param src The slot from which to make a copy.
539 slot1& operator=(const slot1& src)
540 { slot_base::operator=(src); return *this; }
543 /** Converts an arbitrary functor to a unified type which is opaque.
544 * sigc::slot itself is a functor or to be more precise a closure. It contains
545 * a single, arbitrary functor (or closure) that is executed in operator()().
547 * The template arguments determine the function signature of operator()():
548 * - @e T_return The return type of operator()().
549 * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
550 * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
552 * To use simply assign the slot to the desired functor. If the functor
553 * is not compatible with the parameter list defined with the template
554 * arguments compiler errors are triggered. When called the slot
555 * will invoke the functor with minimal copies.
556 * block() and unblock() can be used to block the functor's invocation
557 * from operator()() temporarily.
559 * You should use the more convenient unnumbered sigc::slot template.
563 /* TODO: Where put the following bit of information? I can't make any
564 * sense of the "because", by the way!
566 * Because slot is opaque, visit_each() will not visit its internal members.
568 template <class T_return, class T_arg1,class T_arg2>
573 typedef T_return result_type;
574 typedef typename type_trait<T_arg1>::take arg1_type_;
575 typedef typename type_trait<T_arg2>::take arg2_type_;
578 #ifndef DOXYGEN_SHOULD_SKIP_THIS
580 typedef internal::slot_rep rep_type;
582 typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_);
585 /** Invoke the contained functor unless slot is in blocking state.
586 * @param _A_a1 Argument to be passed on to the functor.
587 * @param _A_a2 Argument to be passed on to the functor.
588 * @return The return value of the functor invocation.
590 inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2) const
592 if (!empty() && !blocked())
593 return (reinterpret_cast<call_type>(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2);
599 /** Constructs a slot from an arbitrary functor.
600 * @param _A_func The desirer functor the new slot should be assigned to.
602 template <class T_functor>
603 slot2(const T_functor& _A_func)
604 : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
606 //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
607 slot_base::rep_->call_ = internal::slot_call2<T_functor, T_return, T_arg1,T_arg2>::address();
610 slot2(const slot2& src)
613 /** Overrides this slot making a copy from another slot.
614 * @param src The slot from which to make a copy.
617 slot2& operator=(const slot2& src)
618 { slot_base::operator=(src); return *this; }
621 /** Converts an arbitrary functor to a unified type which is opaque.
622 * sigc::slot itself is a functor or to be more precise a closure. It contains
623 * a single, arbitrary functor (or closure) that is executed in operator()().
625 * The template arguments determine the function signature of operator()():
626 * - @e T_return The return type of operator()().
627 * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
628 * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
629 * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
631 * To use simply assign the slot to the desired functor. If the functor
632 * is not compatible with the parameter list defined with the template
633 * arguments compiler errors are triggered. When called the slot
634 * will invoke the functor with minimal copies.
635 * block() and unblock() can be used to block the functor's invocation
636 * from operator()() temporarily.
638 * You should use the more convenient unnumbered sigc::slot template.
642 /* TODO: Where put the following bit of information? I can't make any
643 * sense of the "because", by the way!
645 * Because slot is opaque, visit_each() will not visit its internal members.
647 template <class T_return, class T_arg1,class T_arg2,class T_arg3>
652 typedef T_return result_type;
653 typedef typename type_trait<T_arg1>::take arg1_type_;
654 typedef typename type_trait<T_arg2>::take arg2_type_;
655 typedef typename type_trait<T_arg3>::take arg3_type_;
658 #ifndef DOXYGEN_SHOULD_SKIP_THIS
660 typedef internal::slot_rep rep_type;
662 typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_);
665 /** Invoke the contained functor unless slot is in blocking state.
666 * @param _A_a1 Argument to be passed on to the functor.
667 * @param _A_a2 Argument to be passed on to the functor.
668 * @param _A_a3 Argument to be passed on to the functor.
669 * @return The return value of the functor invocation.
671 inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3) const
673 if (!empty() && !blocked())
674 return (reinterpret_cast<call_type>(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3);
680 /** Constructs a slot from an arbitrary functor.
681 * @param _A_func The desirer functor the new slot should be assigned to.
683 template <class T_functor>
684 slot3(const T_functor& _A_func)
685 : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
687 //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
688 slot_base::rep_->call_ = internal::slot_call3<T_functor, T_return, T_arg1,T_arg2,T_arg3>::address();
691 slot3(const slot3& src)
694 /** Overrides this slot making a copy from another slot.
695 * @param src The slot from which to make a copy.
698 slot3& operator=(const slot3& src)
699 { slot_base::operator=(src); return *this; }
702 /** Converts an arbitrary functor to a unified type which is opaque.
703 * sigc::slot itself is a functor or to be more precise a closure. It contains
704 * a single, arbitrary functor (or closure) that is executed in operator()().
706 * The template arguments determine the function signature of operator()():
707 * - @e T_return The return type of operator()().
708 * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
709 * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
710 * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
711 * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
713 * To use simply assign the slot to the desired functor. If the functor
714 * is not compatible with the parameter list defined with the template
715 * arguments compiler errors are triggered. When called the slot
716 * will invoke the functor with minimal copies.
717 * block() and unblock() can be used to block the functor's invocation
718 * from operator()() temporarily.
720 * You should use the more convenient unnumbered sigc::slot template.
724 /* TODO: Where put the following bit of information? I can't make any
725 * sense of the "because", by the way!
727 * Because slot is opaque, visit_each() will not visit its internal members.
729 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
734 typedef T_return result_type;
735 typedef typename type_trait<T_arg1>::take arg1_type_;
736 typedef typename type_trait<T_arg2>::take arg2_type_;
737 typedef typename type_trait<T_arg3>::take arg3_type_;
738 typedef typename type_trait<T_arg4>::take arg4_type_;
741 #ifndef DOXYGEN_SHOULD_SKIP_THIS
743 typedef internal::slot_rep rep_type;
745 typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_);
748 /** Invoke the contained functor unless slot is in blocking state.
749 * @param _A_a1 Argument to be passed on to the functor.
750 * @param _A_a2 Argument to be passed on to the functor.
751 * @param _A_a3 Argument to be passed on to the functor.
752 * @param _A_a4 Argument to be passed on to the functor.
753 * @return The return value of the functor invocation.
755 inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4) const
757 if (!empty() && !blocked())
758 return (reinterpret_cast<call_type>(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3,_A_a4);
764 /** Constructs a slot from an arbitrary functor.
765 * @param _A_func The desirer functor the new slot should be assigned to.
767 template <class T_functor>
768 slot4(const T_functor& _A_func)
769 : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
771 //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
772 slot_base::rep_->call_ = internal::slot_call4<T_functor, T_return, T_arg1,T_arg2,T_arg3,T_arg4>::address();
775 slot4(const slot4& src)
778 /** Overrides this slot making a copy from another slot.
779 * @param src The slot from which to make a copy.
782 slot4& operator=(const slot4& src)
783 { slot_base::operator=(src); return *this; }
786 /** Converts an arbitrary functor to a unified type which is opaque.
787 * sigc::slot itself is a functor or to be more precise a closure. It contains
788 * a single, arbitrary functor (or closure) that is executed in operator()().
790 * The template arguments determine the function signature of operator()():
791 * - @e T_return The return type of operator()().
792 * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
793 * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
794 * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
795 * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
796 * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
798 * To use simply assign the slot to the desired functor. If the functor
799 * is not compatible with the parameter list defined with the template
800 * arguments compiler errors are triggered. When called the slot
801 * will invoke the functor with minimal copies.
802 * block() and unblock() can be used to block the functor's invocation
803 * from operator()() temporarily.
805 * You should use the more convenient unnumbered sigc::slot template.
809 /* TODO: Where put the following bit of information? I can't make any
810 * sense of the "because", by the way!
812 * Because slot is opaque, visit_each() will not visit its internal members.
814 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
819 typedef T_return result_type;
820 typedef typename type_trait<T_arg1>::take arg1_type_;
821 typedef typename type_trait<T_arg2>::take arg2_type_;
822 typedef typename type_trait<T_arg3>::take arg3_type_;
823 typedef typename type_trait<T_arg4>::take arg4_type_;
824 typedef typename type_trait<T_arg5>::take arg5_type_;
827 #ifndef DOXYGEN_SHOULD_SKIP_THIS
829 typedef internal::slot_rep rep_type;
831 typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_);
834 /** Invoke the contained functor unless slot is in blocking state.
835 * @param _A_a1 Argument to be passed on to the functor.
836 * @param _A_a2 Argument to be passed on to the functor.
837 * @param _A_a3 Argument to be passed on to the functor.
838 * @param _A_a4 Argument to be passed on to the functor.
839 * @param _A_a5 Argument to be passed on to the functor.
840 * @return The return value of the functor invocation.
842 inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5) const
844 if (!empty() && !blocked())
845 return (reinterpret_cast<call_type>(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
851 /** Constructs a slot from an arbitrary functor.
852 * @param _A_func The desirer functor the new slot should be assigned to.
854 template <class T_functor>
855 slot5(const T_functor& _A_func)
856 : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
858 //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
859 slot_base::rep_->call_ = internal::slot_call5<T_functor, T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::address();
862 slot5(const slot5& src)
865 /** Overrides this slot making a copy from another slot.
866 * @param src The slot from which to make a copy.
869 slot5& operator=(const slot5& src)
870 { slot_base::operator=(src); return *this; }
873 /** Converts an arbitrary functor to a unified type which is opaque.
874 * sigc::slot itself is a functor or to be more precise a closure. It contains
875 * a single, arbitrary functor (or closure) that is executed in operator()().
877 * The template arguments determine the function signature of operator()():
878 * - @e T_return The return type of operator()().
879 * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
880 * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
881 * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
882 * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
883 * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
884 * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
886 * To use simply assign the slot to the desired functor. If the functor
887 * is not compatible with the parameter list defined with the template
888 * arguments compiler errors are triggered. When called the slot
889 * will invoke the functor with minimal copies.
890 * block() and unblock() can be used to block the functor's invocation
891 * from operator()() temporarily.
893 * You should use the more convenient unnumbered sigc::slot template.
897 /* TODO: Where put the following bit of information? I can't make any
898 * sense of the "because", by the way!
900 * Because slot is opaque, visit_each() will not visit its internal members.
902 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
907 typedef T_return result_type;
908 typedef typename type_trait<T_arg1>::take arg1_type_;
909 typedef typename type_trait<T_arg2>::take arg2_type_;
910 typedef typename type_trait<T_arg3>::take arg3_type_;
911 typedef typename type_trait<T_arg4>::take arg4_type_;
912 typedef typename type_trait<T_arg5>::take arg5_type_;
913 typedef typename type_trait<T_arg6>::take arg6_type_;
916 #ifndef DOXYGEN_SHOULD_SKIP_THIS
918 typedef internal::slot_rep rep_type;
920 typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_,arg6_type_);
923 /** Invoke the contained functor unless slot is in blocking state.
924 * @param _A_a1 Argument to be passed on to the functor.
925 * @param _A_a2 Argument to be passed on to the functor.
926 * @param _A_a3 Argument to be passed on to the functor.
927 * @param _A_a4 Argument to be passed on to the functor.
928 * @param _A_a5 Argument to be passed on to the functor.
929 * @param _A_a6 Argument to be passed on to the functor.
930 * @return The return value of the functor invocation.
932 inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5,arg6_type_ _A_a6) const
934 if (!empty() && !blocked())
935 return (reinterpret_cast<call_type>(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
941 /** Constructs a slot from an arbitrary functor.
942 * @param _A_func The desirer functor the new slot should be assigned to.
944 template <class T_functor>
945 slot6(const T_functor& _A_func)
946 : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
948 //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
949 slot_base::rep_->call_ = internal::slot_call6<T_functor, T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::address();
952 slot6(const slot6& src)
955 /** Overrides this slot making a copy from another slot.
956 * @param src The slot from which to make a copy.
959 slot6& operator=(const slot6& src)
960 { slot_base::operator=(src); return *this; }
963 /** Converts an arbitrary functor to a unified type which is opaque.
964 * sigc::slot itself is a functor or to be more precise a closure. It contains
965 * a single, arbitrary functor (or closure) that is executed in operator()().
967 * The template arguments determine the function signature of operator()():
968 * - @e T_return The return type of operator()().
969 * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
970 * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
971 * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
972 * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
973 * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
974 * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
975 * - @e T_arg7 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
977 * To use simply assign the slot to the desired functor. If the functor
978 * is not compatible with the parameter list defined with the template
979 * arguments compiler errors are triggered. When called the slot
980 * will invoke the functor with minimal copies.
981 * block() and unblock() can be used to block the functor's invocation
982 * from operator()() temporarily.
984 * You should use the more convenient unnumbered sigc::slot template.
988 /* TODO: Where put the following bit of information? I can't make any
989 * sense of the "because", by the way!
991 * Because slot is opaque, visit_each() will not visit its internal members.
993 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>
998 typedef T_return result_type;
999 typedef typename type_trait<T_arg1>::take arg1_type_;
1000 typedef typename type_trait<T_arg2>::take arg2_type_;
1001 typedef typename type_trait<T_arg3>::take arg3_type_;
1002 typedef typename type_trait<T_arg4>::take arg4_type_;
1003 typedef typename type_trait<T_arg5>::take arg5_type_;
1004 typedef typename type_trait<T_arg6>::take arg6_type_;
1005 typedef typename type_trait<T_arg7>::take arg7_type_;
1008 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1010 typedef internal::slot_rep rep_type;
1012 typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_,arg6_type_,arg7_type_);
1015 /** Invoke the contained functor unless slot is in blocking state.
1016 * @param _A_a1 Argument to be passed on to the functor.
1017 * @param _A_a2 Argument to be passed on to the functor.
1018 * @param _A_a3 Argument to be passed on to the functor.
1019 * @param _A_a4 Argument to be passed on to the functor.
1020 * @param _A_a5 Argument to be passed on to the functor.
1021 * @param _A_a6 Argument to be passed on to the functor.
1022 * @param _A_a7 Argument to be passed on to the functor.
1023 * @return The return value of the functor invocation.
1025 inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5,arg6_type_ _A_a6,arg7_type_ _A_a7) const
1027 if (!empty() && !blocked())
1028 return (reinterpret_cast<call_type>(slot_base::rep_->call_))(slot_base::rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
1034 /** Constructs a slot from an arbitrary functor.
1035 * @param _A_func The desirer functor the new slot should be assigned to.
1037 template <class T_functor>
1038 slot7(const T_functor& _A_func)
1039 : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
1041 //The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
1042 slot_base::rep_->call_ = internal::slot_call7<T_functor, T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::address();
1045 slot7(const slot7& src)
1048 /** Overrides this slot making a copy from another slot.
1049 * @param src The slot from which to make a copy.
1052 slot7& operator=(const slot7& src)
1053 { slot_base::operator=(src); return *this; }
1057 /** Convenience wrapper for the numbered sigc::slot# templates.
1058 * Slots convert arbitrary functors to unified types which are opaque.
1059 * sigc::slot itself is a functor or to be more precise a closure. It contains
1060 * a single, arbitrary functor (or closure) that is executed in operator()().
1062 * The template arguments determine the function signature of operator()():
1063 * - @e T_return The return type of operator()().
1064 * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
1065 * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
1066 * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
1067 * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
1068 * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
1069 * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
1070 * - @e T_arg7 Argument type used in the definition of operator()(). The default @p nil_ means no argument.
1072 * To use simply assign the slot to the desired functor. If the functor
1073 * is not compatible with the parameter list defined with the template
1074 * arguments compiler errors are triggered. When called the slot
1075 * will invoke the functor with minimal copies.
1076 * block() and unblock() can be used to block the functor's invocation
1077 * from operator()() temporarily.
1082 * sigc::slot<void, long> s = sigc::ptr_fun(&foo);
1088 template <class T_return, class T_arg1 = nil_,class T_arg2 = nil_,class T_arg3 = nil_,class T_arg4 = nil_,class T_arg5 = nil_,class T_arg6 = nil_,class T_arg7 = nil_>
1090 : public slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
1093 typedef slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> parent_type;
1097 /** Constructs a slot from an arbitrary functor.
1098 * @param _A_func The desirer functor the new slot should be assigned to.
1100 template <class T_functor>
1101 slot(const T_functor& _A_func)
1102 : parent_type(_A_func) {}
1104 slot(const slot& src)
1105 : parent_type(reinterpret_cast<const parent_type&>(src)) {}
1110 /** Convenience wrapper for the numbered sigc::slot0 template.
1111 * See the base class for useful methods.
1112 * This is the template specialization of the unnumbered sigc::slot
1113 * template for 0 argument(s), specialized for different numbers of arguments
1114 * This is possible because the template has default (nil_) template types.
1116 template <class T_return>
1117 class slot <T_return, nil_, nil_, nil_, nil_, nil_, nil_, nil_>
1118 : public slot0<T_return>
1121 typedef slot0<T_return> parent_type;
1125 /** Constructs a slot from an arbitrary functor.
1126 * @param _A_func The desirer functor the new slot should be assigned to.
1128 template <class T_functor>
1129 slot(const T_functor& _A_func)
1130 : parent_type(_A_func) {}
1132 slot(const slot& src)
1133 : parent_type(reinterpret_cast<const parent_type&>(src)) {}
1137 /** Convenience wrapper for the numbered sigc::slot1 template.
1138 * See the base class for useful methods.
1139 * This is the template specialization of the unnumbered sigc::slot
1140 * template for 1 argument(s), specialized for different numbers of arguments
1141 * This is possible because the template has default (nil_) template types.
1143 template <class T_return, class T_arg1>
1144 class slot <T_return, T_arg1, nil_, nil_, nil_, nil_, nil_, nil_>
1145 : public slot1<T_return, T_arg1>
1148 typedef slot1<T_return, T_arg1> parent_type;
1152 /** Constructs a slot from an arbitrary functor.
1153 * @param _A_func The desirer functor the new slot should be assigned to.
1155 template <class T_functor>
1156 slot(const T_functor& _A_func)
1157 : parent_type(_A_func) {}
1159 slot(const slot& src)
1160 : parent_type(reinterpret_cast<const parent_type&>(src)) {}
1164 /** Convenience wrapper for the numbered sigc::slot2 template.
1165 * See the base class for useful methods.
1166 * This is the template specialization of the unnumbered sigc::slot
1167 * template for 2 argument(s), specialized for different numbers of arguments
1168 * This is possible because the template has default (nil_) template types.
1170 template <class T_return, class T_arg1,class T_arg2>
1171 class slot <T_return, T_arg1, T_arg2, nil_, nil_, nil_, nil_, nil_>
1172 : public slot2<T_return, T_arg1,T_arg2>
1175 typedef slot2<T_return, T_arg1,T_arg2> parent_type;
1179 /** Constructs a slot from an arbitrary functor.
1180 * @param _A_func The desirer functor the new slot should be assigned to.
1182 template <class T_functor>
1183 slot(const T_functor& _A_func)
1184 : parent_type(_A_func) {}
1186 slot(const slot& src)
1187 : parent_type(reinterpret_cast<const parent_type&>(src)) {}
1191 /** Convenience wrapper for the numbered sigc::slot3 template.
1192 * See the base class for useful methods.
1193 * This is the template specialization of the unnumbered sigc::slot
1194 * template for 3 argument(s), specialized for different numbers of arguments
1195 * This is possible because the template has default (nil_) template types.
1197 template <class T_return, class T_arg1,class T_arg2,class T_arg3>
1198 class slot <T_return, T_arg1, T_arg2, T_arg3, nil_, nil_, nil_, nil_>
1199 : public slot3<T_return, T_arg1,T_arg2,T_arg3>
1202 typedef slot3<T_return, T_arg1,T_arg2,T_arg3> parent_type;
1206 /** Constructs a slot from an arbitrary functor.
1207 * @param _A_func The desirer functor the new slot should be assigned to.
1209 template <class T_functor>
1210 slot(const T_functor& _A_func)
1211 : parent_type(_A_func) {}
1213 slot(const slot& src)
1214 : parent_type(reinterpret_cast<const parent_type&>(src)) {}
1218 /** Convenience wrapper for the numbered sigc::slot4 template.
1219 * See the base class for useful methods.
1220 * This is the template specialization of the unnumbered sigc::slot
1221 * template for 4 argument(s), specialized for different numbers of arguments
1222 * This is possible because the template has default (nil_) template types.
1224 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
1225 class slot <T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil_, nil_, nil_>
1226 : public slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
1229 typedef slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4> parent_type;
1233 /** Constructs a slot from an arbitrary functor.
1234 * @param _A_func The desirer functor the new slot should be assigned to.
1236 template <class T_functor>
1237 slot(const T_functor& _A_func)
1238 : parent_type(_A_func) {}
1240 slot(const slot& src)
1241 : parent_type(reinterpret_cast<const parent_type&>(src)) {}
1245 /** Convenience wrapper for the numbered sigc::slot5 template.
1246 * See the base class for useful methods.
1247 * This is the template specialization of the unnumbered sigc::slot
1248 * template for 5 argument(s), specialized for different numbers of arguments
1249 * This is possible because the template has default (nil_) template types.
1251 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
1252 class slot <T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil_, nil_>
1253 : public slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
1256 typedef slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> parent_type;
1260 /** Constructs a slot from an arbitrary functor.
1261 * @param _A_func The desirer functor the new slot should be assigned to.
1263 template <class T_functor>
1264 slot(const T_functor& _A_func)
1265 : parent_type(_A_func) {}
1267 slot(const slot& src)
1268 : parent_type(reinterpret_cast<const parent_type&>(src)) {}
1272 /** Convenience wrapper for the numbered sigc::slot6 template.
1273 * See the base class for useful methods.
1274 * This is the template specialization of the unnumbered sigc::slot
1275 * template for 6 argument(s), specialized for different numbers of arguments
1276 * This is possible because the template has default (nil_) template types.
1278 template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
1279 class slot <T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil_>
1280 : public slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
1283 typedef slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> parent_type;
1287 /** Constructs a slot from an arbitrary functor.
1288 * @param _A_func The desirer functor the new slot should be assigned to.
1290 template <class T_functor>
1291 slot(const T_functor& _A_func)
1292 : parent_type(_A_func) {}
1294 slot(const slot& src)
1295 : parent_type(reinterpret_cast<const parent_type&>(src)) {}
1300 } /* namespace sigc */
1301 #endif /* _SIGC_FUNCTORS_MACROS_SLOTHM4_ */