2 /* Do not edit! -- generated file */
4 #ifndef _SIGC_SIGNAL_H_
5 #define _SIGC_SIGNAL_H_
8 #include <sigc++/signal_base.h>
9 #include <sigc++/type_traits.h>
10 #include <sigc++/trackable.h>
11 #include <sigc++/functors/slot.h>
12 #include <sigc++/functors/mem_fun.h>
14 //TODO: See comment in functor_trait.h.
15 #if defined(nil) && defined(SIGC_PRAGMA_PUSH_POP_MACRO)
16 #define SIGC_NIL_HAS_BEEN_PUSHED 1
17 #pragma push_macro("nil")
21 //SIGC_TYPEDEF_REDEFINE_ALLOWED:
22 // TODO: This should have its own test, but I can not create one that gives the error instead of just a warning. murrayc.
23 // I have just used this because there is a correlation between these two problems.
24 #ifdef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
25 //Compilers, such as older versions of SUN Forte C++, that do not allow this also often
26 //do not allow a typedef to have the same name as a class in the typedef's definition.
27 //For Sun Forte CC 5.7 (SUN Workshop 10), comment this out to fix the build.
28 #define SIGC_TYPEDEF_REDEFINE_ALLOWED 1
33 /** STL-style iterator for slot_list.
37 template <typename T_slot>
40 typedef std::size_t size_type;
41 typedef std::ptrdiff_t difference_type;
42 typedef std::bidirectional_iterator_tag iterator_category;
44 typedef T_slot slot_type;
46 typedef T_slot value_type;
47 typedef T_slot* pointer;
48 typedef T_slot& reference;
50 typedef typename internal::signal_impl::iterator_type iterator_type;
55 explicit slot_iterator(const iterator_type& i)
58 reference operator*() const
59 { return static_cast<reference>(*i_); }
61 pointer operator->() const
62 { return &(operator*()); }
64 slot_iterator& operator++()
70 slot_iterator operator++(int)
72 slot_iterator __tmp(*this);
77 slot_iterator& operator--()
83 slot_iterator operator--(int)
85 slot_iterator __tmp(*this);
90 bool operator == (const slot_iterator& other) const
91 { return i_ == other.i_; }
93 bool operator != (const slot_iterator& other) const
94 { return i_ != other.i_; }
99 /** STL-style const iterator for slot_list.
103 template <typename T_slot>
104 struct slot_const_iterator
106 typedef std::size_t size_type;
107 typedef std::ptrdiff_t difference_type;
108 typedef std::bidirectional_iterator_tag iterator_category;
110 typedef T_slot slot_type;
112 typedef T_slot value_type;
113 typedef const T_slot* pointer;
114 typedef const T_slot& reference;
116 typedef typename internal::signal_impl::const_iterator_type iterator_type;
118 slot_const_iterator()
121 explicit slot_const_iterator(const iterator_type& i)
124 reference operator*() const
125 { return static_cast<reference>(*i_); }
127 pointer operator->() const
128 { return &(operator*()); }
130 slot_const_iterator& operator++()
136 slot_const_iterator operator++(int)
138 slot_const_iterator __tmp(*this);
143 slot_const_iterator& operator--()
149 slot_const_iterator operator--(int)
151 slot_const_iterator __tmp(*this);
156 bool operator == (const slot_const_iterator& other) const
157 { return i_ == other.i_; }
159 bool operator != (const slot_const_iterator& other) const
160 { return i_ != other.i_; }
165 /** STL-style list interface for sigc::signal#.
166 * slot_list can be used to iterate over the list of slots that
167 * is managed by a signal. Slots can be added or removed from
168 * the list while existing iterators stay valid.
172 template <class T_slot>
175 typedef T_slot slot_type;
177 typedef slot_type& reference;
178 typedef const slot_type& const_reference;
180 typedef slot_iterator<slot_type> iterator;
181 typedef slot_const_iterator<slot_type> const_iterator;
183 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
184 typedef std::reverse_iterator<iterator> reverse_iterator;
185 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
187 typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
188 int, int&, int*, std::ptrdiff_t> reverse_iterator;
190 typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
191 int, const int&, const int*, std::ptrdiff_t> const_reverse_iterator;
192 #endif /* SIGC_HAVE_SUN_REVERSE_ITERATOR */
198 explicit slot_list(internal::signal_impl* __list)
202 { return iterator(list_->slots_.begin()); }
204 const_iterator begin() const
205 { return const_iterator(list_->slots_.begin()); }
208 { return iterator(list_->slots_.end()); }
210 const_iterator end() const
211 { return const_iterator(list_->slots_.end()); }
213 reverse_iterator rbegin()
214 { return reverse_iterator(end()); }
216 const_reverse_iterator rbegin() const
217 { return const_reverse_iterator(end()); }
219 reverse_iterator rend()
220 { return reverse_iterator(begin()); }
222 const_reverse_iterator rend() const
223 { return const_reverse_iterator(begin()); }
228 const_reference front() const
232 { return *(--end()); }
234 const_reference back() const
235 { return *(--end()); }
237 iterator insert(iterator i, const slot_type& slot_)
238 { return iterator(list_->insert(i.i_, static_cast<const slot_base&>(slot_))); }
240 iterator insert(iterator i, slot_type&& slot_)
241 { return iterator(list_->insert(i.i_, std::move(static_cast<slot_base&>(slot_)))); }
243 void push_front(const slot_type& c)
244 { insert(begin(), c); }
246 void push_front(slot_type&& c)
247 { insert(begin(), std::move(c)); }
249 void push_back(const slot_type& c)
250 { insert(end(), c); }
252 void push_back(slot_type&& c)
253 { insert(end(), std::move(c)); }
255 iterator erase(iterator i)
256 { return iterator(list_->erase(i.i_)); }
258 iterator erase(iterator first_, iterator last_)
260 while (first_ != last_)
261 first_ = erase(first_);
275 internal::signal_impl* list_;
281 /** Special iterator over sigc::internal::signal_impl's slot list that holds extra data.
282 * This iterators is for use in accumulators. operator*() executes
283 * the slot. The return value is buffered, so that in an expression
284 * like @code a = (*i) * (*i); @endcode the slot is executed only once.
286 template <class T_emitter, class T_result = typename T_emitter::result_type>
287 struct slot_iterator_buf
289 typedef std::size_t size_type;
290 typedef std::ptrdiff_t difference_type;
291 typedef std::bidirectional_iterator_tag iterator_category;
293 //These are needed just to make this a proper C++ iterator,
294 //that can be used with standard C++ algorithms.
295 typedef T_result value_type;
296 typedef T_result& reference;
297 typedef T_result* pointer;
299 typedef T_emitter emitter_type;
300 typedef T_result result_type;
301 typedef typename T_emitter::slot_type slot_type;
303 typedef signal_impl::const_iterator_type iterator_type;
306 : c_(nullptr), invoked_(false) {}
308 slot_iterator_buf(const iterator_type& i, const emitter_type* c)
309 : i_(i), c_(c), invoked_(false) {}
311 result_type operator*() const
313 if (!i_->empty() && !i_->blocked() && !invoked_)
315 r_ = (*c_)(static_cast<const slot_type&>(*i_));
321 slot_iterator_buf& operator++()
328 slot_iterator_buf operator++(int)
330 slot_iterator_buf __tmp(*this);
336 slot_iterator_buf& operator--()
343 slot_iterator_buf operator--(int)
345 slot_iterator_buf __tmp(*this);
351 bool operator == (const slot_iterator_buf& other) const
352 { return (!c_ || (i_ == other.i_)); } /* If '!c_' the iterators are empty.
353 * Unfortunately, empty stl iterators are not equal.
354 * We are forcing equality so that 'first==last'
355 * in the accumulator's emit function yields true. */
357 bool operator != (const slot_iterator_buf& other) const
358 { return (c_ && (i_ != other.i_)); }
362 const emitter_type* c_;
363 mutable result_type r_;
364 mutable bool invoked_;
367 /** Template specialization of slot_iterator_buf for void return signals.
369 template <class T_emitter>
370 struct slot_iterator_buf<T_emitter, void>
372 typedef std::size_t size_type;
373 typedef std::ptrdiff_t difference_type;
374 typedef std::bidirectional_iterator_tag iterator_category;
376 typedef T_emitter emitter_type;
377 typedef void result_type;
378 typedef typename T_emitter::slot_type slot_type;
380 typedef signal_impl::const_iterator_type iterator_type;
383 : c_(nullptr), invoked_(false) {}
385 slot_iterator_buf(const iterator_type& i, const emitter_type* c)
386 : i_(i), c_(c), invoked_(false) {}
388 void operator*() const
390 if (!i_->empty() && !i_->blocked() && !invoked_)
392 (*c_)(static_cast<const slot_type&>(*i_));
397 slot_iterator_buf& operator++()
404 slot_iterator_buf operator++(int)
406 slot_iterator_buf __tmp(*this);
412 slot_iterator_buf& operator--()
419 slot_iterator_buf operator--(int)
421 slot_iterator_buf __tmp(*this);
427 bool operator == (const slot_iterator_buf& other) const
428 { return i_ == other.i_; }
430 bool operator != (const slot_iterator_buf& other) const
431 { return i_ != other.i_; }
435 const emitter_type* c_;
436 mutable bool invoked_;
439 /** Reverse version of sigc::internal::slot_iterator_buf. */
440 template <class T_emitter, class T_result = typename T_emitter::result_type>
441 struct slot_reverse_iterator_buf
443 typedef std::size_t size_type;
444 typedef std::ptrdiff_t difference_type;
445 typedef std::bidirectional_iterator_tag iterator_category;
447 //These are needed just to make this a proper C++ iterator,
448 //that can be used with standard C++ algorithms.
449 typedef T_result value_type;
450 typedef T_result& reference;
451 typedef T_result* pointer;
453 typedef T_emitter emitter_type;
454 typedef T_result result_type;
455 typedef typename T_emitter::slot_type slot_type;
457 typedef signal_impl::const_iterator_type iterator_type;
459 slot_reverse_iterator_buf()
460 : c_(nullptr), invoked_(false) {}
462 slot_reverse_iterator_buf(const iterator_type& i, const emitter_type* c)
463 : i_(i), c_(c), invoked_(false) {}
465 result_type operator*() const
469 if (!__tmp->empty() && !__tmp->blocked() && !invoked_)
471 r_ = (*c_)(static_cast<const slot_type&>(*__tmp));
477 slot_reverse_iterator_buf& operator++()
484 slot_reverse_iterator_buf operator++(int)
486 slot_reverse_iterator_buf __tmp(*this);
492 slot_reverse_iterator_buf& operator--()
499 slot_reverse_iterator_buf operator--(int)
501 slot_reverse_iterator_buf __tmp(*this);
507 bool operator == (const slot_reverse_iterator_buf& other) const
508 { return (!c_ || (i_ == other.i_)); } /* If '!c_' the iterators are empty.
509 * Unfortunately, empty stl iterators are not equal.
510 * We are forcing equality so that 'first==last'
511 * in the accumulator's emit function yields true. */
513 bool operator != (const slot_reverse_iterator_buf& other) const
514 { return (c_ && (i_ != other.i_)); }
518 const emitter_type* c_;
519 mutable result_type r_;
520 mutable bool invoked_;
523 /** Template specialization of slot_reverse_iterator_buf for void return signals.
525 template <class T_emitter>
526 struct slot_reverse_iterator_buf<T_emitter, void>
528 typedef std::size_t size_type;
529 typedef std::ptrdiff_t difference_type;
530 typedef std::bidirectional_iterator_tag iterator_category;
532 typedef T_emitter emitter_type;
533 typedef void result_type;
534 typedef typename T_emitter::slot_type slot_type;
536 typedef signal_impl::const_iterator_type iterator_type;
538 slot_reverse_iterator_buf()
539 : c_(nullptr), invoked_(false) {}
541 slot_reverse_iterator_buf(const iterator_type& i, const emitter_type* c)
542 : i_(i), c_(c), invoked_(false) {}
544 void operator*() const
548 if (!__tmp->empty() && !__tmp->blocked() && !invoked_)
550 (*c_)(static_cast<const slot_type&>(*__tmp));
555 slot_reverse_iterator_buf& operator++()
562 slot_reverse_iterator_buf operator++(int)
564 slot_reverse_iterator_buf __tmp(*this);
570 slot_reverse_iterator_buf& operator--()
577 slot_reverse_iterator_buf operator--(int)
579 slot_reverse_iterator_buf __tmp(*this);
585 bool operator == (const slot_reverse_iterator_buf& other) const
586 { return i_ == other.i_; }
588 bool operator != (const slot_reverse_iterator_buf& other) const
589 { return i_ != other.i_; }
593 const emitter_type* c_;
594 mutable bool invoked_;
597 /** Abstracts signal emission.
598 * This template implements the emit() function of signal0.
599 * Template specializations are available to optimize signal
600 * emission when no accumulator is used, for example when the template
601 * argument @e T_accumulator is @p nil.
603 template <class T_return, class T_accumulator>
606 typedef signal_emit0<T_return, T_accumulator> self_type;
607 typedef typename T_accumulator::result_type result_type;
608 typedef slot<T_return()> slot_type;
609 typedef internal::slot_iterator_buf<self_type, T_return> slot_iterator_buf_type;
610 typedef internal::slot_reverse_iterator_buf<self_type, T_return> slot_reverse_iterator_buf_type;
611 typedef signal_impl::const_iterator_type iterator_type;
616 * @param _A_slot Some slot to invoke.
617 * @return The slot's return value.
619 T_return operator()(const slot_type& _A_slot) const
620 { return (sigc::internal::function_pointer_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_); }
622 /** Executes a list of slots using an accumulator of type @e T_accumulator.
624 * @return The accumulated return values of the slot invocations as processed by the accumulator.
626 static result_type emit(signal_impl* impl)
628 T_accumulator accumulator;
631 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
633 signal_exec exec(impl);
634 temp_slot_list slots(impl->slots_);
637 return accumulator(slot_iterator_buf_type(slots.begin(), &self),
638 slot_iterator_buf_type(slots.end(), &self));
641 #ifndef SIGCXX_DISABLE_DEPRECATED
642 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
644 * @return The accumulated return values of the slot invocations as processed by the accumulator.
646 * @deprecated This is apparently not useful, but please let us know if you need it.
648 static result_type emit_reverse(signal_impl* impl)
650 T_accumulator accumulator;
653 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
655 signal_exec exec(impl);
656 temp_slot_list slots(impl->slots_);
659 return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self),
660 slot_reverse_iterator_buf_type(slots.begin(), &self));
662 #endif // SIGCXX_DISABLE_DEPRECATED
667 /** Abstracts signal emission.
668 * This template specialization implements an optimized emit()
669 * function for the case that no accumulator is used.
671 template <class T_return>
672 struct signal_emit0<T_return, nil>
674 typedef signal_emit0<T_return, nil > self_type;
675 typedef T_return result_type;
676 typedef slot<T_return()> slot_type;
677 typedef signal_impl::const_iterator_type iterator_type;
678 typedef typename slot_type::call_type call_type;
680 /** Executes a list of slots using an accumulator of type @e T_accumulator.
681 * The return value of the last slot invoked is returned.
682 * @param first An iterator pointing to the first slot in the list.
683 * @param last An iterator pointing to the last slot in the list.
684 * @return The return value of the last slot invoked.
686 static result_type emit(signal_impl* impl)
688 if (!impl || impl->slots_.empty())
691 signal_exec exec(impl);
692 T_return r_ = T_return();
694 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
695 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
697 temp_slot_list slots(impl->slots_);
698 auto it = slots.begin();
699 for (; it != slots.end(); ++it)
700 if (!it->empty() && !it->blocked()) break;
702 if (it == slots.end())
703 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
705 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_);
706 for (++it; it != slots.end(); ++it)
708 if (it->empty() || it->blocked())
710 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_);
717 #ifndef SIGCXX_DISABLE_DEPRECATED
718 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
719 * The return value of the last slot invoked is returned.
720 * @param first An iterator pointing to the first slot in the list.
721 * @param last An iterator pointing to the last slot in the list.
722 * @return The return value of the last slot invoked.
724 * @deprecated This is apparently not useful, but please let us know if you need it.
726 static result_type emit_reverse(signal_impl* impl)
728 if (!impl || impl->slots_.empty())
731 signal_exec exec(impl);
732 T_return r_ = T_return();
734 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
735 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
737 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
738 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
740 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
741 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
744 temp_slot_list slots(impl->slots_);
745 reverse_iterator_type it(slots.end());
746 for (; it != reverse_iterator_type(slots.begin()); ++it)
747 if (!it->empty() && !it->blocked()) break;
749 if (it == reverse_iterator_type(slots.begin()))
750 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
752 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_);
753 for (++it; it != reverse_iterator_type(slots.begin()); ++it)
755 if (it->empty() || it->blocked())
757 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_);
763 #endif // SIGCXX_DISABLE_DEPRECATED
766 /** Abstracts signal emission.
767 * This template specialization implements an optimized emit()
768 * function for the case that no accumulator is used and the
769 * return type is @p void.
772 struct signal_emit0<void, nil>
774 typedef signal_emit0<void, nil> self_type;
775 typedef void result_type;
776 typedef slot<void()> slot_type;
777 typedef signal_impl::const_iterator_type iterator_type;
778 typedef void (*call_type)(slot_rep*);
780 /** Executes a list of slots using an accumulator of type @e T_accumulator.
781 * @param first An iterator pointing to the first slot in the list.
782 * @param last An iterator pointing to the last slot in the list.
784 static result_type emit(signal_impl* impl)
786 if (!impl || impl->slots_.empty()) return;
787 signal_exec exec(impl);
788 temp_slot_list slots(impl->slots_);
790 for (const auto& slot : slots)
792 if (slot.empty() || slot.blocked())
794 (sigc::internal::function_pointer_cast<call_type>(slot.rep_->call_))(slot.rep_);
798 #ifndef SIGCXX_DISABLE_DEPRECATED
799 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
800 * @param first An iterator pointing to the first slot in the list.
801 * @param last An iterator pointing to the last slot in the list.
803 * @deprecated This is apparently not useful, but please let us know if you need it.
805 static result_type emit_reverse(signal_impl* impl)
807 if (!impl || impl->slots_.empty()) return;
808 signal_exec exec(impl);
809 temp_slot_list slots(impl->slots_);
811 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
812 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
814 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
815 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
817 for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
819 if (it->empty() || it->blocked())
821 (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_);
824 #endif // SIGCXX_DISABLE_DEPRECATED
827 /** Abstracts signal emission.
828 * This template implements the emit() function of signal1.
829 * Template specializations are available to optimize signal
830 * emission when no accumulator is used, for example when the template
831 * argument @e T_accumulator is @p nil.
833 template <class T_return, class T_arg1, class T_accumulator>
836 typedef signal_emit1<T_return, T_arg1, T_accumulator> self_type;
837 typedef typename T_accumulator::result_type result_type;
838 typedef slot<T_return(T_arg1)> slot_type;
839 typedef internal::slot_iterator_buf<self_type, T_return> slot_iterator_buf_type;
840 typedef internal::slot_reverse_iterator_buf<self_type, T_return> slot_reverse_iterator_buf_type;
841 typedef signal_impl::const_iterator_type iterator_type;
843 /** Instantiates the class.
844 * The parameters are stored in member variables. operator()() passes
845 * the values on to some slot.
847 signal_emit1(type_trait_take_t<T_arg1> _A_a1)
851 /** Invokes a slot using the buffered parameter values.
852 * @param _A_slot Some slot to invoke.
853 * @return The slot's return value.
855 T_return operator()(const slot_type& _A_slot) const
856 { return (sigc::internal::function_pointer_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_); }
858 /** Executes a list of slots using an accumulator of type @e T_accumulator.
859 * The arguments are buffered in a temporary instance of signal_emit1.
861 * @param _A_a1 Argument to be passed on to the slots.
862 * @return The accumulated return values of the slot invocations as processed by the accumulator.
864 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1)
866 T_accumulator accumulator;
869 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
871 signal_exec exec(impl);
872 temp_slot_list slots(impl->slots_);
874 self_type self (_A_a1);
875 return accumulator(slot_iterator_buf_type(slots.begin(), &self),
876 slot_iterator_buf_type(slots.end(), &self));
879 #ifndef SIGCXX_DISABLE_DEPRECATED
880 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
881 * The arguments are buffered in a temporary instance of signal_emit1.
883 * @param _A_a1 Argument to be passed on to the slots.
884 * @return The accumulated return values of the slot invocations as processed by the accumulator.
886 * @deprecated This is apparently not useful, but please let us know if you need it.
888 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1)
890 T_accumulator accumulator;
893 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
895 signal_exec exec(impl);
896 temp_slot_list slots(impl->slots_);
898 self_type self (_A_a1);
899 return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self),
900 slot_reverse_iterator_buf_type(slots.begin(), &self));
902 #endif // SIGCXX_DISABLE_DEPRECATED
905 type_trait_take_t<T_arg1> _A_a1_;
908 /** Abstracts signal emission.
909 * This template specialization implements an optimized emit()
910 * function for the case that no accumulator is used.
912 template <class T_return, class T_arg1>
913 struct signal_emit1<T_return, T_arg1, nil>
915 typedef signal_emit1<T_return, T_arg1, nil > self_type;
916 typedef T_return result_type;
917 typedef slot<T_return(T_arg1)> slot_type;
918 typedef signal_impl::const_iterator_type iterator_type;
919 typedef typename slot_type::call_type call_type;
921 /** Executes a list of slots using an accumulator of type @e T_accumulator.
922 * The arguments are passed directly on to the slots.
923 * The return value of the last slot invoked is returned.
924 * @param first An iterator pointing to the first slot in the list.
925 * @param last An iterator pointing to the last slot in the list.
926 * @param _A_a1 Argument to be passed on to the slots.
927 * @return The return value of the last slot invoked.
929 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1)
931 if (!impl || impl->slots_.empty())
934 signal_exec exec(impl);
935 T_return r_ = T_return();
937 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
938 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
940 temp_slot_list slots(impl->slots_);
941 auto it = slots.begin();
942 for (; it != slots.end(); ++it)
943 if (!it->empty() && !it->blocked()) break;
945 if (it == slots.end())
946 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
948 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1);
949 for (++it; it != slots.end(); ++it)
951 if (it->empty() || it->blocked())
953 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1);
960 #ifndef SIGCXX_DISABLE_DEPRECATED
961 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
962 * The arguments are passed directly on to the slots.
963 * The return value of the last slot invoked is returned.
964 * @param first An iterator pointing to the first slot in the list.
965 * @param last An iterator pointing to the last slot in the list.
966 * @param _A_a1 Argument to be passed on to the slots.
967 * @return The return value of the last slot invoked.
969 * @deprecated This is apparently not useful, but please let us know if you need it.
971 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1)
973 if (!impl || impl->slots_.empty())
976 signal_exec exec(impl);
977 T_return r_ = T_return();
979 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
980 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
982 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
983 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
985 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
986 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
989 temp_slot_list slots(impl->slots_);
990 reverse_iterator_type it(slots.end());
991 for (; it != reverse_iterator_type(slots.begin()); ++it)
992 if (!it->empty() && !it->blocked()) break;
994 if (it == reverse_iterator_type(slots.begin()))
995 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
997 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1);
998 for (++it; it != reverse_iterator_type(slots.begin()); ++it)
1000 if (it->empty() || it->blocked())
1002 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1);
1008 #endif // SIGCXX_DISABLE_DEPRECATED
1011 /** Abstracts signal emission.
1012 * This template specialization implements an optimized emit()
1013 * function for the case that no accumulator is used and the
1014 * return type is @p void.
1016 template <class T_arg1>
1017 struct signal_emit1<void, T_arg1, nil>
1019 typedef signal_emit1<void, T_arg1, nil> self_type;
1020 typedef void result_type;
1021 typedef slot<void(T_arg1)> slot_type;
1022 typedef signal_impl::const_iterator_type iterator_type;
1023 typedef typename slot_type::call_type call_type;
1025 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1026 * The arguments are passed directly on to the slots.
1027 * @param first An iterator pointing to the first slot in the list.
1028 * @param last An iterator pointing to the last slot in the list.
1029 * @param _A_a1 Argument to be passed on to the slots.
1031 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1)
1033 if (!impl || impl->slots_.empty()) return;
1034 signal_exec exec(impl);
1035 temp_slot_list slots(impl->slots_);
1037 for (const auto& slot : slots)
1039 if (slot.empty() || slot.blocked())
1041 (sigc::internal::function_pointer_cast<call_type>(slot.rep_->call_))(slot.rep_, _A_a1);
1045 #ifndef SIGCXX_DISABLE_DEPRECATED
1046 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1047 * The arguments are passed directly on to the slots.
1048 * @param first An iterator pointing to the first slot in the list.
1049 * @param last An iterator pointing to the last slot in the list.
1050 * @param _A_a1 Argument to be passed on to the slots.
1052 * @deprecated This is apparently not useful, but please let us know if you need it.
1054 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1)
1056 if (!impl || impl->slots_.empty()) return;
1057 signal_exec exec(impl);
1058 temp_slot_list slots(impl->slots_);
1060 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
1061 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
1063 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
1064 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
1066 for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
1068 if (it->empty() || it->blocked())
1070 (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1);
1073 #endif // SIGCXX_DISABLE_DEPRECATED
1076 /** Abstracts signal emission.
1077 * This template implements the emit() function of signal2.
1078 * Template specializations are available to optimize signal
1079 * emission when no accumulator is used, for example when the template
1080 * argument @e T_accumulator is @p nil.
1082 template <class T_return, class T_arg1, class T_arg2, class T_accumulator>
1085 typedef signal_emit2<T_return, T_arg1, T_arg2, T_accumulator> self_type;
1086 typedef typename T_accumulator::result_type result_type;
1087 typedef slot<T_return(T_arg1, T_arg2)> slot_type;
1088 typedef internal::slot_iterator_buf<self_type, T_return> slot_iterator_buf_type;
1089 typedef internal::slot_reverse_iterator_buf<self_type, T_return> slot_reverse_iterator_buf_type;
1090 typedef signal_impl::const_iterator_type iterator_type;
1092 /** Instantiates the class.
1093 * The parameters are stored in member variables. operator()() passes
1094 * the values on to some slot.
1096 signal_emit2(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2)
1097 : _A_a1_(_A_a1), _A_a2_(_A_a2) {}
1100 /** Invokes a slot using the buffered parameter values.
1101 * @param _A_slot Some slot to invoke.
1102 * @return The slot's return value.
1104 T_return operator()(const slot_type& _A_slot) const
1105 { return (sigc::internal::function_pointer_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_, _A_a2_); }
1107 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1108 * The arguments are buffered in a temporary instance of signal_emit2.
1110 * @param _A_a1 Argument to be passed on to the slots.
1111 * @param _A_a2 Argument to be passed on to the slots.
1112 * @return The accumulated return values of the slot invocations as processed by the accumulator.
1114 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2)
1116 T_accumulator accumulator;
1119 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
1121 signal_exec exec(impl);
1122 temp_slot_list slots(impl->slots_);
1124 self_type self (_A_a1, _A_a2);
1125 return accumulator(slot_iterator_buf_type(slots.begin(), &self),
1126 slot_iterator_buf_type(slots.end(), &self));
1129 #ifndef SIGCXX_DISABLE_DEPRECATED
1130 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1131 * The arguments are buffered in a temporary instance of signal_emit2.
1133 * @param _A_a1 Argument to be passed on to the slots.
1134 * @param _A_a2 Argument to be passed on to the slots.
1135 * @return The accumulated return values of the slot invocations as processed by the accumulator.
1137 * @deprecated This is apparently not useful, but please let us know if you need it.
1139 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2)
1141 T_accumulator accumulator;
1144 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
1146 signal_exec exec(impl);
1147 temp_slot_list slots(impl->slots_);
1149 self_type self (_A_a1, _A_a2);
1150 return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self),
1151 slot_reverse_iterator_buf_type(slots.begin(), &self));
1153 #endif // SIGCXX_DISABLE_DEPRECATED
1156 type_trait_take_t<T_arg1> _A_a1_;
1157 type_trait_take_t<T_arg2> _A_a2_;
1160 /** Abstracts signal emission.
1161 * This template specialization implements an optimized emit()
1162 * function for the case that no accumulator is used.
1164 template <class T_return, class T_arg1, class T_arg2>
1165 struct signal_emit2<T_return, T_arg1, T_arg2, nil>
1167 typedef signal_emit2<T_return, T_arg1, T_arg2, nil > self_type;
1168 typedef T_return result_type;
1169 typedef slot<T_return(T_arg1, T_arg2)> slot_type;
1170 typedef signal_impl::const_iterator_type iterator_type;
1171 typedef typename slot_type::call_type call_type;
1173 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1174 * The arguments are passed directly on to the slots.
1175 * The return value of the last slot invoked is returned.
1176 * @param first An iterator pointing to the first slot in the list.
1177 * @param last An iterator pointing to the last slot in the list.
1178 * @param _A_a1 Argument to be passed on to the slots.
1179 * @param _A_a2 Argument to be passed on to the slots.
1180 * @return The return value of the last slot invoked.
1182 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2)
1184 if (!impl || impl->slots_.empty())
1187 signal_exec exec(impl);
1188 T_return r_ = T_return();
1190 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
1191 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
1193 temp_slot_list slots(impl->slots_);
1194 auto it = slots.begin();
1195 for (; it != slots.end(); ++it)
1196 if (!it->empty() && !it->blocked()) break;
1198 if (it == slots.end())
1199 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
1201 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2);
1202 for (++it; it != slots.end(); ++it)
1204 if (it->empty() || it->blocked())
1206 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2);
1213 #ifndef SIGCXX_DISABLE_DEPRECATED
1214 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1215 * The arguments are passed directly on to the slots.
1216 * The return value of the last slot invoked is returned.
1217 * @param first An iterator pointing to the first slot in the list.
1218 * @param last An iterator pointing to the last slot in the list.
1219 * @param _A_a1 Argument to be passed on to the slots.
1220 * @param _A_a2 Argument to be passed on to the slots.
1221 * @return The return value of the last slot invoked.
1223 * @deprecated This is apparently not useful, but please let us know if you need it.
1225 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2)
1227 if (!impl || impl->slots_.empty())
1230 signal_exec exec(impl);
1231 T_return r_ = T_return();
1233 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
1234 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
1236 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
1237 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
1239 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
1240 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
1243 temp_slot_list slots(impl->slots_);
1244 reverse_iterator_type it(slots.end());
1245 for (; it != reverse_iterator_type(slots.begin()); ++it)
1246 if (!it->empty() && !it->blocked()) break;
1248 if (it == reverse_iterator_type(slots.begin()))
1249 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
1251 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2);
1252 for (++it; it != reverse_iterator_type(slots.begin()); ++it)
1254 if (it->empty() || it->blocked())
1256 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2);
1262 #endif // SIGCXX_DISABLE_DEPRECATED
1265 /** Abstracts signal emission.
1266 * This template specialization implements an optimized emit()
1267 * function for the case that no accumulator is used and the
1268 * return type is @p void.
1270 template <class T_arg1, class T_arg2>
1271 struct signal_emit2<void, T_arg1, T_arg2, nil>
1273 typedef signal_emit2<void, T_arg1, T_arg2, nil> self_type;
1274 typedef void result_type;
1275 typedef slot<void(T_arg1, T_arg2)> slot_type;
1276 typedef signal_impl::const_iterator_type iterator_type;
1277 typedef typename slot_type::call_type call_type;
1279 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1280 * The arguments are passed directly on to the slots.
1281 * @param first An iterator pointing to the first slot in the list.
1282 * @param last An iterator pointing to the last slot in the list.
1283 * @param _A_a1 Argument to be passed on to the slots.
1284 * @param _A_a2 Argument to be passed on to the slots.
1286 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2)
1288 if (!impl || impl->slots_.empty()) return;
1289 signal_exec exec(impl);
1290 temp_slot_list slots(impl->slots_);
1292 for (const auto& slot : slots)
1294 if (slot.empty() || slot.blocked())
1296 (sigc::internal::function_pointer_cast<call_type>(slot.rep_->call_))(slot.rep_, _A_a1, _A_a2);
1300 #ifndef SIGCXX_DISABLE_DEPRECATED
1301 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1302 * The arguments are passed directly on to the slots.
1303 * @param first An iterator pointing to the first slot in the list.
1304 * @param last An iterator pointing to the last slot in the list.
1305 * @param _A_a1 Argument to be passed on to the slots.
1306 * @param _A_a2 Argument to be passed on to the slots.
1308 * @deprecated This is apparently not useful, but please let us know if you need it.
1310 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2)
1312 if (!impl || impl->slots_.empty()) return;
1313 signal_exec exec(impl);
1314 temp_slot_list slots(impl->slots_);
1316 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
1317 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
1319 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
1320 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
1322 for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
1324 if (it->empty() || it->blocked())
1326 (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2);
1329 #endif // SIGCXX_DISABLE_DEPRECATED
1332 /** Abstracts signal emission.
1333 * This template implements the emit() function of signal3.
1334 * Template specializations are available to optimize signal
1335 * emission when no accumulator is used, for example when the template
1336 * argument @e T_accumulator is @p nil.
1338 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_accumulator>
1341 typedef signal_emit3<T_return, T_arg1, T_arg2, T_arg3, T_accumulator> self_type;
1342 typedef typename T_accumulator::result_type result_type;
1343 typedef slot<T_return(T_arg1, T_arg2, T_arg3)> slot_type;
1344 typedef internal::slot_iterator_buf<self_type, T_return> slot_iterator_buf_type;
1345 typedef internal::slot_reverse_iterator_buf<self_type, T_return> slot_reverse_iterator_buf_type;
1346 typedef signal_impl::const_iterator_type iterator_type;
1348 /** Instantiates the class.
1349 * The parameters are stored in member variables. operator()() passes
1350 * the values on to some slot.
1352 signal_emit3(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3)
1353 : _A_a1_(_A_a1), _A_a2_(_A_a2), _A_a3_(_A_a3) {}
1356 /** Invokes a slot using the buffered parameter values.
1357 * @param _A_slot Some slot to invoke.
1358 * @return The slot's return value.
1360 T_return operator()(const slot_type& _A_slot) const
1361 { return (sigc::internal::function_pointer_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_, _A_a2_, _A_a3_); }
1363 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1364 * The arguments are buffered in a temporary instance of signal_emit3.
1366 * @param _A_a1 Argument to be passed on to the slots.
1367 * @param _A_a2 Argument to be passed on to the slots.
1368 * @param _A_a3 Argument to be passed on to the slots.
1369 * @return The accumulated return values of the slot invocations as processed by the accumulator.
1371 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3)
1373 T_accumulator accumulator;
1376 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
1378 signal_exec exec(impl);
1379 temp_slot_list slots(impl->slots_);
1381 self_type self (_A_a1, _A_a2, _A_a3);
1382 return accumulator(slot_iterator_buf_type(slots.begin(), &self),
1383 slot_iterator_buf_type(slots.end(), &self));
1386 #ifndef SIGCXX_DISABLE_DEPRECATED
1387 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1388 * The arguments are buffered in a temporary instance of signal_emit3.
1390 * @param _A_a1 Argument to be passed on to the slots.
1391 * @param _A_a2 Argument to be passed on to the slots.
1392 * @param _A_a3 Argument to be passed on to the slots.
1393 * @return The accumulated return values of the slot invocations as processed by the accumulator.
1395 * @deprecated This is apparently not useful, but please let us know if you need it.
1397 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3)
1399 T_accumulator accumulator;
1402 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
1404 signal_exec exec(impl);
1405 temp_slot_list slots(impl->slots_);
1407 self_type self (_A_a1, _A_a2, _A_a3);
1408 return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self),
1409 slot_reverse_iterator_buf_type(slots.begin(), &self));
1411 #endif // SIGCXX_DISABLE_DEPRECATED
1414 type_trait_take_t<T_arg1> _A_a1_;
1415 type_trait_take_t<T_arg2> _A_a2_;
1416 type_trait_take_t<T_arg3> _A_a3_;
1419 /** Abstracts signal emission.
1420 * This template specialization implements an optimized emit()
1421 * function for the case that no accumulator is used.
1423 template <class T_return, class T_arg1, class T_arg2, class T_arg3>
1424 struct signal_emit3<T_return, T_arg1, T_arg2, T_arg3, nil>
1426 typedef signal_emit3<T_return, T_arg1, T_arg2, T_arg3, nil > self_type;
1427 typedef T_return result_type;
1428 typedef slot<T_return(T_arg1, T_arg2, T_arg3)> slot_type;
1429 typedef signal_impl::const_iterator_type iterator_type;
1430 typedef typename slot_type::call_type call_type;
1432 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1433 * The arguments are passed directly on to the slots.
1434 * The return value of the last slot invoked is returned.
1435 * @param first An iterator pointing to the first slot in the list.
1436 * @param last An iterator pointing to the last slot in the list.
1437 * @param _A_a1 Argument to be passed on to the slots.
1438 * @param _A_a2 Argument to be passed on to the slots.
1439 * @param _A_a3 Argument to be passed on to the slots.
1440 * @return The return value of the last slot invoked.
1442 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3)
1444 if (!impl || impl->slots_.empty())
1447 signal_exec exec(impl);
1448 T_return r_ = T_return();
1450 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
1451 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
1453 temp_slot_list slots(impl->slots_);
1454 auto it = slots.begin();
1455 for (; it != slots.end(); ++it)
1456 if (!it->empty() && !it->blocked()) break;
1458 if (it == slots.end())
1459 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
1461 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3);
1462 for (++it; it != slots.end(); ++it)
1464 if (it->empty() || it->blocked())
1466 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3);
1473 #ifndef SIGCXX_DISABLE_DEPRECATED
1474 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1475 * The arguments are passed directly on to the slots.
1476 * The return value of the last slot invoked is returned.
1477 * @param first An iterator pointing to the first slot in the list.
1478 * @param last An iterator pointing to the last slot in the list.
1479 * @param _A_a1 Argument to be passed on to the slots.
1480 * @param _A_a2 Argument to be passed on to the slots.
1481 * @param _A_a3 Argument to be passed on to the slots.
1482 * @return The return value of the last slot invoked.
1484 * @deprecated This is apparently not useful, but please let us know if you need it.
1486 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3)
1488 if (!impl || impl->slots_.empty())
1491 signal_exec exec(impl);
1492 T_return r_ = T_return();
1494 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
1495 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
1497 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
1498 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
1500 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
1501 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
1504 temp_slot_list slots(impl->slots_);
1505 reverse_iterator_type it(slots.end());
1506 for (; it != reverse_iterator_type(slots.begin()); ++it)
1507 if (!it->empty() && !it->blocked()) break;
1509 if (it == reverse_iterator_type(slots.begin()))
1510 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
1512 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3);
1513 for (++it; it != reverse_iterator_type(slots.begin()); ++it)
1515 if (it->empty() || it->blocked())
1517 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3);
1523 #endif // SIGCXX_DISABLE_DEPRECATED
1526 /** Abstracts signal emission.
1527 * This template specialization implements an optimized emit()
1528 * function for the case that no accumulator is used and the
1529 * return type is @p void.
1531 template <class T_arg1, class T_arg2, class T_arg3>
1532 struct signal_emit3<void, T_arg1, T_arg2, T_arg3, nil>
1534 typedef signal_emit3<void, T_arg1, T_arg2, T_arg3, nil> self_type;
1535 typedef void result_type;
1536 typedef slot<void(T_arg1, T_arg2, T_arg3)> slot_type;
1537 typedef signal_impl::const_iterator_type iterator_type;
1538 typedef typename slot_type::call_type call_type;
1540 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1541 * The arguments are passed directly on to the slots.
1542 * @param first An iterator pointing to the first slot in the list.
1543 * @param last An iterator pointing to the last slot in the list.
1544 * @param _A_a1 Argument to be passed on to the slots.
1545 * @param _A_a2 Argument to be passed on to the slots.
1546 * @param _A_a3 Argument to be passed on to the slots.
1548 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3)
1550 if (!impl || impl->slots_.empty()) return;
1551 signal_exec exec(impl);
1552 temp_slot_list slots(impl->slots_);
1554 for (const auto& slot : slots)
1556 if (slot.empty() || slot.blocked())
1558 (sigc::internal::function_pointer_cast<call_type>(slot.rep_->call_))(slot.rep_, _A_a1, _A_a2, _A_a3);
1562 #ifndef SIGCXX_DISABLE_DEPRECATED
1563 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1564 * The arguments are passed directly on to the slots.
1565 * @param first An iterator pointing to the first slot in the list.
1566 * @param last An iterator pointing to the last slot in the list.
1567 * @param _A_a1 Argument to be passed on to the slots.
1568 * @param _A_a2 Argument to be passed on to the slots.
1569 * @param _A_a3 Argument to be passed on to the slots.
1571 * @deprecated This is apparently not useful, but please let us know if you need it.
1573 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3)
1575 if (!impl || impl->slots_.empty()) return;
1576 signal_exec exec(impl);
1577 temp_slot_list slots(impl->slots_);
1579 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
1580 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
1582 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
1583 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
1585 for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
1587 if (it->empty() || it->blocked())
1589 (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3);
1592 #endif // SIGCXX_DISABLE_DEPRECATED
1595 /** Abstracts signal emission.
1596 * This template implements the emit() function of signal4.
1597 * Template specializations are available to optimize signal
1598 * emission when no accumulator is used, for example when the template
1599 * argument @e T_accumulator is @p nil.
1601 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_accumulator>
1604 typedef signal_emit4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_accumulator> self_type;
1605 typedef typename T_accumulator::result_type result_type;
1606 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4)> slot_type;
1607 typedef internal::slot_iterator_buf<self_type, T_return> slot_iterator_buf_type;
1608 typedef internal::slot_reverse_iterator_buf<self_type, T_return> slot_reverse_iterator_buf_type;
1609 typedef signal_impl::const_iterator_type iterator_type;
1611 /** Instantiates the class.
1612 * The parameters are stored in member variables. operator()() passes
1613 * the values on to some slot.
1615 signal_emit4(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4)
1616 : _A_a1_(_A_a1), _A_a2_(_A_a2), _A_a3_(_A_a3), _A_a4_(_A_a4) {}
1619 /** Invokes a slot using the buffered parameter values.
1620 * @param _A_slot Some slot to invoke.
1621 * @return The slot's return value.
1623 T_return operator()(const slot_type& _A_slot) const
1624 { return (sigc::internal::function_pointer_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_, _A_a2_, _A_a3_, _A_a4_); }
1626 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1627 * The arguments are buffered in a temporary instance of signal_emit4.
1629 * @param _A_a1 Argument to be passed on to the slots.
1630 * @param _A_a2 Argument to be passed on to the slots.
1631 * @param _A_a3 Argument to be passed on to the slots.
1632 * @param _A_a4 Argument to be passed on to the slots.
1633 * @return The accumulated return values of the slot invocations as processed by the accumulator.
1635 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4)
1637 T_accumulator accumulator;
1640 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
1642 signal_exec exec(impl);
1643 temp_slot_list slots(impl->slots_);
1645 self_type self (_A_a1, _A_a2, _A_a3, _A_a4);
1646 return accumulator(slot_iterator_buf_type(slots.begin(), &self),
1647 slot_iterator_buf_type(slots.end(), &self));
1650 #ifndef SIGCXX_DISABLE_DEPRECATED
1651 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1652 * The arguments are buffered in a temporary instance of signal_emit4.
1654 * @param _A_a1 Argument to be passed on to the slots.
1655 * @param _A_a2 Argument to be passed on to the slots.
1656 * @param _A_a3 Argument to be passed on to the slots.
1657 * @param _A_a4 Argument to be passed on to the slots.
1658 * @return The accumulated return values of the slot invocations as processed by the accumulator.
1660 * @deprecated This is apparently not useful, but please let us know if you need it.
1662 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4)
1664 T_accumulator accumulator;
1667 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
1669 signal_exec exec(impl);
1670 temp_slot_list slots(impl->slots_);
1672 self_type self (_A_a1, _A_a2, _A_a3, _A_a4);
1673 return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self),
1674 slot_reverse_iterator_buf_type(slots.begin(), &self));
1676 #endif // SIGCXX_DISABLE_DEPRECATED
1679 type_trait_take_t<T_arg1> _A_a1_;
1680 type_trait_take_t<T_arg2> _A_a2_;
1681 type_trait_take_t<T_arg3> _A_a3_;
1682 type_trait_take_t<T_arg4> _A_a4_;
1685 /** Abstracts signal emission.
1686 * This template specialization implements an optimized emit()
1687 * function for the case that no accumulator is used.
1689 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4>
1690 struct signal_emit4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>
1692 typedef signal_emit4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil > self_type;
1693 typedef T_return result_type;
1694 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4)> slot_type;
1695 typedef signal_impl::const_iterator_type iterator_type;
1696 typedef typename slot_type::call_type call_type;
1698 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1699 * The arguments are passed directly on to the slots.
1700 * The return value of the last slot invoked is returned.
1701 * @param first An iterator pointing to the first slot in the list.
1702 * @param last An iterator pointing to the last slot in the list.
1703 * @param _A_a1 Argument to be passed on to the slots.
1704 * @param _A_a2 Argument to be passed on to the slots.
1705 * @param _A_a3 Argument to be passed on to the slots.
1706 * @param _A_a4 Argument to be passed on to the slots.
1707 * @return The return value of the last slot invoked.
1709 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4)
1711 if (!impl || impl->slots_.empty())
1714 signal_exec exec(impl);
1715 T_return r_ = T_return();
1717 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
1718 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
1720 temp_slot_list slots(impl->slots_);
1721 auto it = slots.begin();
1722 for (; it != slots.end(); ++it)
1723 if (!it->empty() && !it->blocked()) break;
1725 if (it == slots.end())
1726 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
1728 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4);
1729 for (++it; it != slots.end(); ++it)
1731 if (it->empty() || it->blocked())
1733 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4);
1740 #ifndef SIGCXX_DISABLE_DEPRECATED
1741 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1742 * The arguments are passed directly on to the slots.
1743 * The return value of the last slot invoked is returned.
1744 * @param first An iterator pointing to the first slot in the list.
1745 * @param last An iterator pointing to the last slot in the list.
1746 * @param _A_a1 Argument to be passed on to the slots.
1747 * @param _A_a2 Argument to be passed on to the slots.
1748 * @param _A_a3 Argument to be passed on to the slots.
1749 * @param _A_a4 Argument to be passed on to the slots.
1750 * @return The return value of the last slot invoked.
1752 * @deprecated This is apparently not useful, but please let us know if you need it.
1754 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4)
1756 if (!impl || impl->slots_.empty())
1759 signal_exec exec(impl);
1760 T_return r_ = T_return();
1762 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
1763 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
1765 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
1766 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
1768 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
1769 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
1772 temp_slot_list slots(impl->slots_);
1773 reverse_iterator_type it(slots.end());
1774 for (; it != reverse_iterator_type(slots.begin()); ++it)
1775 if (!it->empty() && !it->blocked()) break;
1777 if (it == reverse_iterator_type(slots.begin()))
1778 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
1780 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4);
1781 for (++it; it != reverse_iterator_type(slots.begin()); ++it)
1783 if (it->empty() || it->blocked())
1785 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4);
1791 #endif // SIGCXX_DISABLE_DEPRECATED
1794 /** Abstracts signal emission.
1795 * This template specialization implements an optimized emit()
1796 * function for the case that no accumulator is used and the
1797 * return type is @p void.
1799 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4>
1800 struct signal_emit4<void, T_arg1, T_arg2, T_arg3, T_arg4, nil>
1802 typedef signal_emit4<void, T_arg1, T_arg2, T_arg3, T_arg4, nil> self_type;
1803 typedef void result_type;
1804 typedef slot<void(T_arg1, T_arg2, T_arg3, T_arg4)> slot_type;
1805 typedef signal_impl::const_iterator_type iterator_type;
1806 typedef typename slot_type::call_type call_type;
1808 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1809 * The arguments are passed directly on to the slots.
1810 * @param first An iterator pointing to the first slot in the list.
1811 * @param last An iterator pointing to the last slot in the list.
1812 * @param _A_a1 Argument to be passed on to the slots.
1813 * @param _A_a2 Argument to be passed on to the slots.
1814 * @param _A_a3 Argument to be passed on to the slots.
1815 * @param _A_a4 Argument to be passed on to the slots.
1817 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4)
1819 if (!impl || impl->slots_.empty()) return;
1820 signal_exec exec(impl);
1821 temp_slot_list slots(impl->slots_);
1823 for (const auto& slot : slots)
1825 if (slot.empty() || slot.blocked())
1827 (sigc::internal::function_pointer_cast<call_type>(slot.rep_->call_))(slot.rep_, _A_a1, _A_a2, _A_a3, _A_a4);
1831 #ifndef SIGCXX_DISABLE_DEPRECATED
1832 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1833 * The arguments are passed directly on to the slots.
1834 * @param first An iterator pointing to the first slot in the list.
1835 * @param last An iterator pointing to the last slot in the list.
1836 * @param _A_a1 Argument to be passed on to the slots.
1837 * @param _A_a2 Argument to be passed on to the slots.
1838 * @param _A_a3 Argument to be passed on to the slots.
1839 * @param _A_a4 Argument to be passed on to the slots.
1841 * @deprecated This is apparently not useful, but please let us know if you need it.
1843 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4)
1845 if (!impl || impl->slots_.empty()) return;
1846 signal_exec exec(impl);
1847 temp_slot_list slots(impl->slots_);
1849 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
1850 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
1852 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
1853 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
1855 for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
1857 if (it->empty() || it->blocked())
1859 (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4);
1862 #endif // SIGCXX_DISABLE_DEPRECATED
1865 /** Abstracts signal emission.
1866 * This template implements the emit() function of signal5.
1867 * Template specializations are available to optimize signal
1868 * emission when no accumulator is used, for example when the template
1869 * argument @e T_accumulator is @p nil.
1871 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_accumulator>
1874 typedef signal_emit5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_accumulator> self_type;
1875 typedef typename T_accumulator::result_type result_type;
1876 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5)> slot_type;
1877 typedef internal::slot_iterator_buf<self_type, T_return> slot_iterator_buf_type;
1878 typedef internal::slot_reverse_iterator_buf<self_type, T_return> slot_reverse_iterator_buf_type;
1879 typedef signal_impl::const_iterator_type iterator_type;
1881 /** Instantiates the class.
1882 * The parameters are stored in member variables. operator()() passes
1883 * the values on to some slot.
1885 signal_emit5(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5)
1886 : _A_a1_(_A_a1), _A_a2_(_A_a2), _A_a3_(_A_a3), _A_a4_(_A_a4), _A_a5_(_A_a5) {}
1889 /** Invokes a slot using the buffered parameter values.
1890 * @param _A_slot Some slot to invoke.
1891 * @return The slot's return value.
1893 T_return operator()(const slot_type& _A_slot) const
1894 { return (sigc::internal::function_pointer_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_, _A_a2_, _A_a3_, _A_a4_, _A_a5_); }
1896 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1897 * The arguments are buffered in a temporary instance of signal_emit5.
1899 * @param _A_a1 Argument to be passed on to the slots.
1900 * @param _A_a2 Argument to be passed on to the slots.
1901 * @param _A_a3 Argument to be passed on to the slots.
1902 * @param _A_a4 Argument to be passed on to the slots.
1903 * @param _A_a5 Argument to be passed on to the slots.
1904 * @return The accumulated return values of the slot invocations as processed by the accumulator.
1906 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5)
1908 T_accumulator accumulator;
1911 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
1913 signal_exec exec(impl);
1914 temp_slot_list slots(impl->slots_);
1916 self_type self (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
1917 return accumulator(slot_iterator_buf_type(slots.begin(), &self),
1918 slot_iterator_buf_type(slots.end(), &self));
1921 #ifndef SIGCXX_DISABLE_DEPRECATED
1922 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
1923 * The arguments are buffered in a temporary instance of signal_emit5.
1925 * @param _A_a1 Argument to be passed on to the slots.
1926 * @param _A_a2 Argument to be passed on to the slots.
1927 * @param _A_a3 Argument to be passed on to the slots.
1928 * @param _A_a4 Argument to be passed on to the slots.
1929 * @param _A_a5 Argument to be passed on to the slots.
1930 * @return The accumulated return values of the slot invocations as processed by the accumulator.
1932 * @deprecated This is apparently not useful, but please let us know if you need it.
1934 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5)
1936 T_accumulator accumulator;
1939 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
1941 signal_exec exec(impl);
1942 temp_slot_list slots(impl->slots_);
1944 self_type self (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
1945 return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self),
1946 slot_reverse_iterator_buf_type(slots.begin(), &self));
1948 #endif // SIGCXX_DISABLE_DEPRECATED
1951 type_trait_take_t<T_arg1> _A_a1_;
1952 type_trait_take_t<T_arg2> _A_a2_;
1953 type_trait_take_t<T_arg3> _A_a3_;
1954 type_trait_take_t<T_arg4> _A_a4_;
1955 type_trait_take_t<T_arg5> _A_a5_;
1958 /** Abstracts signal emission.
1959 * This template specialization implements an optimized emit()
1960 * function for the case that no accumulator is used.
1962 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
1963 struct signal_emit5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>
1965 typedef signal_emit5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil > self_type;
1966 typedef T_return result_type;
1967 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5)> slot_type;
1968 typedef signal_impl::const_iterator_type iterator_type;
1969 typedef typename slot_type::call_type call_type;
1971 /** Executes a list of slots using an accumulator of type @e T_accumulator.
1972 * The arguments are passed directly on to the slots.
1973 * The return value of the last slot invoked is returned.
1974 * @param first An iterator pointing to the first slot in the list.
1975 * @param last An iterator pointing to the last slot in the list.
1976 * @param _A_a1 Argument to be passed on to the slots.
1977 * @param _A_a2 Argument to be passed on to the slots.
1978 * @param _A_a3 Argument to be passed on to the slots.
1979 * @param _A_a4 Argument to be passed on to the slots.
1980 * @param _A_a5 Argument to be passed on to the slots.
1981 * @return The return value of the last slot invoked.
1983 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5)
1985 if (!impl || impl->slots_.empty())
1988 signal_exec exec(impl);
1989 T_return r_ = T_return();
1991 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
1992 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
1994 temp_slot_list slots(impl->slots_);
1995 auto it = slots.begin();
1996 for (; it != slots.end(); ++it)
1997 if (!it->empty() && !it->blocked()) break;
1999 if (it == slots.end())
2000 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
2002 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
2003 for (++it; it != slots.end(); ++it)
2005 if (it->empty() || it->blocked())
2007 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
2014 #ifndef SIGCXX_DISABLE_DEPRECATED
2015 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
2016 * The arguments are passed directly on to the slots.
2017 * The return value of the last slot invoked is returned.
2018 * @param first An iterator pointing to the first slot in the list.
2019 * @param last An iterator pointing to the last slot in the list.
2020 * @param _A_a1 Argument to be passed on to the slots.
2021 * @param _A_a2 Argument to be passed on to the slots.
2022 * @param _A_a3 Argument to be passed on to the slots.
2023 * @param _A_a4 Argument to be passed on to the slots.
2024 * @param _A_a5 Argument to be passed on to the slots.
2025 * @return The return value of the last slot invoked.
2027 * @deprecated This is apparently not useful, but please let us know if you need it.
2029 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5)
2031 if (!impl || impl->slots_.empty())
2034 signal_exec exec(impl);
2035 T_return r_ = T_return();
2037 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
2038 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
2040 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
2041 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
2043 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
2044 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
2047 temp_slot_list slots(impl->slots_);
2048 reverse_iterator_type it(slots.end());
2049 for (; it != reverse_iterator_type(slots.begin()); ++it)
2050 if (!it->empty() && !it->blocked()) break;
2052 if (it == reverse_iterator_type(slots.begin()))
2053 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
2055 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
2056 for (++it; it != reverse_iterator_type(slots.begin()); ++it)
2058 if (it->empty() || it->blocked())
2060 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
2066 #endif // SIGCXX_DISABLE_DEPRECATED
2069 /** Abstracts signal emission.
2070 * This template specialization implements an optimized emit()
2071 * function for the case that no accumulator is used and the
2072 * return type is @p void.
2074 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
2075 struct signal_emit5<void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>
2077 typedef signal_emit5<void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil> self_type;
2078 typedef void result_type;
2079 typedef slot<void(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5)> slot_type;
2080 typedef signal_impl::const_iterator_type iterator_type;
2081 typedef typename slot_type::call_type call_type;
2083 /** Executes a list of slots using an accumulator of type @e T_accumulator.
2084 * The arguments are passed directly on to the slots.
2085 * @param first An iterator pointing to the first slot in the list.
2086 * @param last An iterator pointing to the last slot in the list.
2087 * @param _A_a1 Argument to be passed on to the slots.
2088 * @param _A_a2 Argument to be passed on to the slots.
2089 * @param _A_a3 Argument to be passed on to the slots.
2090 * @param _A_a4 Argument to be passed on to the slots.
2091 * @param _A_a5 Argument to be passed on to the slots.
2093 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5)
2095 if (!impl || impl->slots_.empty()) return;
2096 signal_exec exec(impl);
2097 temp_slot_list slots(impl->slots_);
2099 for (const auto& slot : slots)
2101 if (slot.empty() || slot.blocked())
2103 (sigc::internal::function_pointer_cast<call_type>(slot.rep_->call_))(slot.rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
2107 #ifndef SIGCXX_DISABLE_DEPRECATED
2108 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
2109 * The arguments are passed directly on to the slots.
2110 * @param first An iterator pointing to the first slot in the list.
2111 * @param last An iterator pointing to the last slot in the list.
2112 * @param _A_a1 Argument to be passed on to the slots.
2113 * @param _A_a2 Argument to be passed on to the slots.
2114 * @param _A_a3 Argument to be passed on to the slots.
2115 * @param _A_a4 Argument to be passed on to the slots.
2116 * @param _A_a5 Argument to be passed on to the slots.
2118 * @deprecated This is apparently not useful, but please let us know if you need it.
2120 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5)
2122 if (!impl || impl->slots_.empty()) return;
2123 signal_exec exec(impl);
2124 temp_slot_list slots(impl->slots_);
2126 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
2127 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
2129 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
2130 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
2132 for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
2134 if (it->empty() || it->blocked())
2136 (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5);
2139 #endif // SIGCXX_DISABLE_DEPRECATED
2142 /** Abstracts signal emission.
2143 * This template implements the emit() function of signal6.
2144 * Template specializations are available to optimize signal
2145 * emission when no accumulator is used, for example when the template
2146 * argument @e T_accumulator is @p nil.
2148 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_accumulator>
2151 typedef signal_emit6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_accumulator> self_type;
2152 typedef typename T_accumulator::result_type result_type;
2153 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6)> slot_type;
2154 typedef internal::slot_iterator_buf<self_type, T_return> slot_iterator_buf_type;
2155 typedef internal::slot_reverse_iterator_buf<self_type, T_return> slot_reverse_iterator_buf_type;
2156 typedef signal_impl::const_iterator_type iterator_type;
2158 /** Instantiates the class.
2159 * The parameters are stored in member variables. operator()() passes
2160 * the values on to some slot.
2162 signal_emit6(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6)
2163 : _A_a1_(_A_a1), _A_a2_(_A_a2), _A_a3_(_A_a3), _A_a4_(_A_a4), _A_a5_(_A_a5), _A_a6_(_A_a6) {}
2166 /** Invokes a slot using the buffered parameter values.
2167 * @param _A_slot Some slot to invoke.
2168 * @return The slot's return value.
2170 T_return operator()(const slot_type& _A_slot) const
2171 { return (sigc::internal::function_pointer_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_, _A_a2_, _A_a3_, _A_a4_, _A_a5_, _A_a6_); }
2173 /** Executes a list of slots using an accumulator of type @e T_accumulator.
2174 * The arguments are buffered in a temporary instance of signal_emit6.
2176 * @param _A_a1 Argument to be passed on to the slots.
2177 * @param _A_a2 Argument to be passed on to the slots.
2178 * @param _A_a3 Argument to be passed on to the slots.
2179 * @param _A_a4 Argument to be passed on to the slots.
2180 * @param _A_a5 Argument to be passed on to the slots.
2181 * @param _A_a6 Argument to be passed on to the slots.
2182 * @return The accumulated return values of the slot invocations as processed by the accumulator.
2184 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6)
2186 T_accumulator accumulator;
2189 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
2191 signal_exec exec(impl);
2192 temp_slot_list slots(impl->slots_);
2194 self_type self (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
2195 return accumulator(slot_iterator_buf_type(slots.begin(), &self),
2196 slot_iterator_buf_type(slots.end(), &self));
2199 #ifndef SIGCXX_DISABLE_DEPRECATED
2200 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
2201 * The arguments are buffered in a temporary instance of signal_emit6.
2203 * @param _A_a1 Argument to be passed on to the slots.
2204 * @param _A_a2 Argument to be passed on to the slots.
2205 * @param _A_a3 Argument to be passed on to the slots.
2206 * @param _A_a4 Argument to be passed on to the slots.
2207 * @param _A_a5 Argument to be passed on to the slots.
2208 * @param _A_a6 Argument to be passed on to the slots.
2209 * @return The accumulated return values of the slot invocations as processed by the accumulator.
2211 * @deprecated This is apparently not useful, but please let us know if you need it.
2213 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6)
2215 T_accumulator accumulator;
2218 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
2220 signal_exec exec(impl);
2221 temp_slot_list slots(impl->slots_);
2223 self_type self (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
2224 return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self),
2225 slot_reverse_iterator_buf_type(slots.begin(), &self));
2227 #endif // SIGCXX_DISABLE_DEPRECATED
2230 type_trait_take_t<T_arg1> _A_a1_;
2231 type_trait_take_t<T_arg2> _A_a2_;
2232 type_trait_take_t<T_arg3> _A_a3_;
2233 type_trait_take_t<T_arg4> _A_a4_;
2234 type_trait_take_t<T_arg5> _A_a5_;
2235 type_trait_take_t<T_arg6> _A_a6_;
2238 /** Abstracts signal emission.
2239 * This template specialization implements an optimized emit()
2240 * function for the case that no accumulator is used.
2242 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
2243 struct signal_emit6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>
2245 typedef signal_emit6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil > self_type;
2246 typedef T_return result_type;
2247 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6)> slot_type;
2248 typedef signal_impl::const_iterator_type iterator_type;
2249 typedef typename slot_type::call_type call_type;
2251 /** Executes a list of slots using an accumulator of type @e T_accumulator.
2252 * The arguments are passed directly on to the slots.
2253 * The return value of the last slot invoked is returned.
2254 * @param first An iterator pointing to the first slot in the list.
2255 * @param last An iterator pointing to the last slot in the list.
2256 * @param _A_a1 Argument to be passed on to the slots.
2257 * @param _A_a2 Argument to be passed on to the slots.
2258 * @param _A_a3 Argument to be passed on to the slots.
2259 * @param _A_a4 Argument to be passed on to the slots.
2260 * @param _A_a5 Argument to be passed on to the slots.
2261 * @param _A_a6 Argument to be passed on to the slots.
2262 * @return The return value of the last slot invoked.
2264 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6)
2266 if (!impl || impl->slots_.empty())
2269 signal_exec exec(impl);
2270 T_return r_ = T_return();
2272 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
2273 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
2275 temp_slot_list slots(impl->slots_);
2276 auto it = slots.begin();
2277 for (; it != slots.end(); ++it)
2278 if (!it->empty() && !it->blocked()) break;
2280 if (it == slots.end())
2281 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
2283 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
2284 for (++it; it != slots.end(); ++it)
2286 if (it->empty() || it->blocked())
2288 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
2295 #ifndef SIGCXX_DISABLE_DEPRECATED
2296 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
2297 * The arguments are passed directly on to the slots.
2298 * The return value of the last slot invoked is returned.
2299 * @param first An iterator pointing to the first slot in the list.
2300 * @param last An iterator pointing to the last slot in the list.
2301 * @param _A_a1 Argument to be passed on to the slots.
2302 * @param _A_a2 Argument to be passed on to the slots.
2303 * @param _A_a3 Argument to be passed on to the slots.
2304 * @param _A_a4 Argument to be passed on to the slots.
2305 * @param _A_a5 Argument to be passed on to the slots.
2306 * @param _A_a6 Argument to be passed on to the slots.
2307 * @return The return value of the last slot invoked.
2309 * @deprecated This is apparently not useful, but please let us know if you need it.
2311 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6)
2313 if (!impl || impl->slots_.empty())
2316 signal_exec exec(impl);
2317 T_return r_ = T_return();
2319 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
2320 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
2322 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
2323 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
2325 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
2326 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
2329 temp_slot_list slots(impl->slots_);
2330 reverse_iterator_type it(slots.end());
2331 for (; it != reverse_iterator_type(slots.begin()); ++it)
2332 if (!it->empty() && !it->blocked()) break;
2334 if (it == reverse_iterator_type(slots.begin()))
2335 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
2337 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
2338 for (++it; it != reverse_iterator_type(slots.begin()); ++it)
2340 if (it->empty() || it->blocked())
2342 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
2348 #endif // SIGCXX_DISABLE_DEPRECATED
2351 /** Abstracts signal emission.
2352 * This template specialization implements an optimized emit()
2353 * function for the case that no accumulator is used and the
2354 * return type is @p void.
2356 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
2357 struct signal_emit6<void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>
2359 typedef signal_emit6<void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil> self_type;
2360 typedef void result_type;
2361 typedef slot<void(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6)> slot_type;
2362 typedef signal_impl::const_iterator_type iterator_type;
2363 typedef typename slot_type::call_type call_type;
2365 /** Executes a list of slots using an accumulator of type @e T_accumulator.
2366 * The arguments are passed directly on to the slots.
2367 * @param first An iterator pointing to the first slot in the list.
2368 * @param last An iterator pointing to the last slot in the list.
2369 * @param _A_a1 Argument to be passed on to the slots.
2370 * @param _A_a2 Argument to be passed on to the slots.
2371 * @param _A_a3 Argument to be passed on to the slots.
2372 * @param _A_a4 Argument to be passed on to the slots.
2373 * @param _A_a5 Argument to be passed on to the slots.
2374 * @param _A_a6 Argument to be passed on to the slots.
2376 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6)
2378 if (!impl || impl->slots_.empty()) return;
2379 signal_exec exec(impl);
2380 temp_slot_list slots(impl->slots_);
2382 for (const auto& slot : slots)
2384 if (slot.empty() || slot.blocked())
2386 (sigc::internal::function_pointer_cast<call_type>(slot.rep_->call_))(slot.rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
2390 #ifndef SIGCXX_DISABLE_DEPRECATED
2391 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
2392 * The arguments are passed directly on to the slots.
2393 * @param first An iterator pointing to the first slot in the list.
2394 * @param last An iterator pointing to the last slot in the list.
2395 * @param _A_a1 Argument to be passed on to the slots.
2396 * @param _A_a2 Argument to be passed on to the slots.
2397 * @param _A_a3 Argument to be passed on to the slots.
2398 * @param _A_a4 Argument to be passed on to the slots.
2399 * @param _A_a5 Argument to be passed on to the slots.
2400 * @param _A_a6 Argument to be passed on to the slots.
2402 * @deprecated This is apparently not useful, but please let us know if you need it.
2404 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6)
2406 if (!impl || impl->slots_.empty()) return;
2407 signal_exec exec(impl);
2408 temp_slot_list slots(impl->slots_);
2410 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
2411 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
2413 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
2414 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
2416 for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
2418 if (it->empty() || it->blocked())
2420 (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6);
2423 #endif // SIGCXX_DISABLE_DEPRECATED
2426 /** Abstracts signal emission.
2427 * This template implements the emit() function of signal7.
2428 * Template specializations are available to optimize signal
2429 * emission when no accumulator is used, for example when the template
2430 * argument @e T_accumulator is @p nil.
2432 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, class T_accumulator>
2435 typedef signal_emit7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator> self_type;
2436 typedef typename T_accumulator::result_type result_type;
2437 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7)> slot_type;
2438 typedef internal::slot_iterator_buf<self_type, T_return> slot_iterator_buf_type;
2439 typedef internal::slot_reverse_iterator_buf<self_type, T_return> slot_reverse_iterator_buf_type;
2440 typedef signal_impl::const_iterator_type iterator_type;
2442 /** Instantiates the class.
2443 * The parameters are stored in member variables. operator()() passes
2444 * the values on to some slot.
2446 signal_emit7(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7)
2447 : _A_a1_(_A_a1), _A_a2_(_A_a2), _A_a3_(_A_a3), _A_a4_(_A_a4), _A_a5_(_A_a5), _A_a6_(_A_a6), _A_a7_(_A_a7) {}
2450 /** Invokes a slot using the buffered parameter values.
2451 * @param _A_slot Some slot to invoke.
2452 * @return The slot's return value.
2454 T_return operator()(const slot_type& _A_slot) const
2455 { return (sigc::internal::function_pointer_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_, _A_a2_, _A_a3_, _A_a4_, _A_a5_, _A_a6_, _A_a7_); }
2457 /** Executes a list of slots using an accumulator of type @e T_accumulator.
2458 * The arguments are buffered in a temporary instance of signal_emit7.
2460 * @param _A_a1 Argument to be passed on to the slots.
2461 * @param _A_a2 Argument to be passed on to the slots.
2462 * @param _A_a3 Argument to be passed on to the slots.
2463 * @param _A_a4 Argument to be passed on to the slots.
2464 * @param _A_a5 Argument to be passed on to the slots.
2465 * @param _A_a6 Argument to be passed on to the slots.
2466 * @param _A_a7 Argument to be passed on to the slots.
2467 * @return The accumulated return values of the slot invocations as processed by the accumulator.
2469 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7)
2471 T_accumulator accumulator;
2474 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
2476 signal_exec exec(impl);
2477 temp_slot_list slots(impl->slots_);
2479 self_type self (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
2480 return accumulator(slot_iterator_buf_type(slots.begin(), &self),
2481 slot_iterator_buf_type(slots.end(), &self));
2484 #ifndef SIGCXX_DISABLE_DEPRECATED
2485 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
2486 * The arguments are buffered in a temporary instance of signal_emit7.
2488 * @param _A_a1 Argument to be passed on to the slots.
2489 * @param _A_a2 Argument to be passed on to the slots.
2490 * @param _A_a3 Argument to be passed on to the slots.
2491 * @param _A_a4 Argument to be passed on to the slots.
2492 * @param _A_a5 Argument to be passed on to the slots.
2493 * @param _A_a6 Argument to be passed on to the slots.
2494 * @param _A_a7 Argument to be passed on to the slots.
2495 * @return The accumulated return values of the slot invocations as processed by the accumulator.
2497 * @deprecated This is apparently not useful, but please let us know if you need it.
2499 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7)
2501 T_accumulator accumulator;
2504 return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
2506 signal_exec exec(impl);
2507 temp_slot_list slots(impl->slots_);
2509 self_type self (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
2510 return accumulator(slot_reverse_iterator_buf_type(slots.end(), &self),
2511 slot_reverse_iterator_buf_type(slots.begin(), &self));
2513 #endif // SIGCXX_DISABLE_DEPRECATED
2516 type_trait_take_t<T_arg1> _A_a1_;
2517 type_trait_take_t<T_arg2> _A_a2_;
2518 type_trait_take_t<T_arg3> _A_a3_;
2519 type_trait_take_t<T_arg4> _A_a4_;
2520 type_trait_take_t<T_arg5> _A_a5_;
2521 type_trait_take_t<T_arg6> _A_a6_;
2522 type_trait_take_t<T_arg7> _A_a7_;
2525 /** Abstracts signal emission.
2526 * This template specialization implements an optimized emit()
2527 * function for the case that no accumulator is used.
2529 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>
2530 struct signal_emit7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>
2532 typedef signal_emit7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil > self_type;
2533 typedef T_return result_type;
2534 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7)> slot_type;
2535 typedef signal_impl::const_iterator_type iterator_type;
2536 typedef typename slot_type::call_type call_type;
2538 /** Executes a list of slots using an accumulator of type @e T_accumulator.
2539 * The arguments are passed directly on to the slots.
2540 * The return value of the last slot invoked is returned.
2541 * @param first An iterator pointing to the first slot in the list.
2542 * @param last An iterator pointing to the last slot in the list.
2543 * @param _A_a1 Argument to be passed on to the slots.
2544 * @param _A_a2 Argument to be passed on to the slots.
2545 * @param _A_a3 Argument to be passed on to the slots.
2546 * @param _A_a4 Argument to be passed on to the slots.
2547 * @param _A_a5 Argument to be passed on to the slots.
2548 * @param _A_a6 Argument to be passed on to the slots.
2549 * @param _A_a7 Argument to be passed on to the slots.
2550 * @return The return value of the last slot invoked.
2552 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7)
2554 if (!impl || impl->slots_.empty())
2557 signal_exec exec(impl);
2558 T_return r_ = T_return();
2560 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
2561 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
2563 temp_slot_list slots(impl->slots_);
2564 auto it = slots.begin();
2565 for (; it != slots.end(); ++it)
2566 if (!it->empty() && !it->blocked()) break;
2568 if (it == slots.end())
2569 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
2571 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
2572 for (++it; it != slots.end(); ++it)
2574 if (it->empty() || it->blocked())
2576 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
2583 #ifndef SIGCXX_DISABLE_DEPRECATED
2584 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
2585 * The arguments are passed directly on to the slots.
2586 * The return value of the last slot invoked is returned.
2587 * @param first An iterator pointing to the first slot in the list.
2588 * @param last An iterator pointing to the last slot in the list.
2589 * @param _A_a1 Argument to be passed on to the slots.
2590 * @param _A_a2 Argument to be passed on to the slots.
2591 * @param _A_a3 Argument to be passed on to the slots.
2592 * @param _A_a4 Argument to be passed on to the slots.
2593 * @param _A_a5 Argument to be passed on to the slots.
2594 * @param _A_a6 Argument to be passed on to the slots.
2595 * @param _A_a7 Argument to be passed on to the slots.
2596 * @return The return value of the last slot invoked.
2598 * @deprecated This is apparently not useful, but please let us know if you need it.
2600 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7)
2602 if (!impl || impl->slots_.empty())
2605 signal_exec exec(impl);
2606 T_return r_ = T_return();
2608 //Use this scope to make sure that "slots" is destroyed before "exec" is destroyed.
2609 //This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
2611 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
2612 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
2614 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
2615 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
2618 temp_slot_list slots(impl->slots_);
2619 reverse_iterator_type it(slots.end());
2620 for (; it != reverse_iterator_type(slots.begin()); ++it)
2621 if (!it->empty() && !it->blocked()) break;
2623 if (it == reverse_iterator_type(slots.begin()))
2624 return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
2626 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
2627 for (++it; it != reverse_iterator_type(slots.begin()); ++it)
2629 if (it->empty() || it->blocked())
2631 r_ = (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
2637 #endif // SIGCXX_DISABLE_DEPRECATED
2640 /** Abstracts signal emission.
2641 * This template specialization implements an optimized emit()
2642 * function for the case that no accumulator is used and the
2643 * return type is @p void.
2645 template <class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_arg7>
2646 struct signal_emit7<void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>
2648 typedef signal_emit7<void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil> self_type;
2649 typedef void result_type;
2650 typedef slot<void(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7)> slot_type;
2651 typedef signal_impl::const_iterator_type iterator_type;
2652 typedef typename slot_type::call_type call_type;
2654 /** Executes a list of slots using an accumulator of type @e T_accumulator.
2655 * The arguments are passed directly on to the slots.
2656 * @param first An iterator pointing to the first slot in the list.
2657 * @param last An iterator pointing to the last slot in the list.
2658 * @param _A_a1 Argument to be passed on to the slots.
2659 * @param _A_a2 Argument to be passed on to the slots.
2660 * @param _A_a3 Argument to be passed on to the slots.
2661 * @param _A_a4 Argument to be passed on to the slots.
2662 * @param _A_a5 Argument to be passed on to the slots.
2663 * @param _A_a6 Argument to be passed on to the slots.
2664 * @param _A_a7 Argument to be passed on to the slots.
2666 static result_type emit(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7)
2668 if (!impl || impl->slots_.empty()) return;
2669 signal_exec exec(impl);
2670 temp_slot_list slots(impl->slots_);
2672 for (const auto& slot : slots)
2674 if (slot.empty() || slot.blocked())
2676 (sigc::internal::function_pointer_cast<call_type>(slot.rep_->call_))(slot.rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
2680 #ifndef SIGCXX_DISABLE_DEPRECATED
2681 /** Executes a list of slots using an accumulator of type @e T_accumulator in reverse order.
2682 * The arguments are passed directly on to the slots.
2683 * @param first An iterator pointing to the first slot in the list.
2684 * @param last An iterator pointing to the last slot in the list.
2685 * @param _A_a1 Argument to be passed on to the slots.
2686 * @param _A_a2 Argument to be passed on to the slots.
2687 * @param _A_a3 Argument to be passed on to the slots.
2688 * @param _A_a4 Argument to be passed on to the slots.
2689 * @param _A_a5 Argument to be passed on to the slots.
2690 * @param _A_a6 Argument to be passed on to the slots.
2691 * @param _A_a7 Argument to be passed on to the slots.
2693 * @deprecated This is apparently not useful, but please let us know if you need it.
2695 static result_type emit_reverse(signal_impl* impl, type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7)
2697 if (!impl || impl->slots_.empty()) return;
2698 signal_exec exec(impl);
2699 temp_slot_list slots(impl->slots_);
2701 #ifndef SIGC_HAVE_SUN_REVERSE_ITERATOR
2702 typedef std::reverse_iterator<signal_impl::iterator_type> reverse_iterator_type;
2704 typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
2705 slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
2707 for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
2709 if (it->empty() || it->blocked())
2711 (sigc::internal::function_pointer_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7);
2714 #endif // SIGCXX_DISABLE_DEPRECATED
2718 } /* namespace internal */
2720 /** Signal declaration.
2721 * signal0 can be used to connect() slots that are invoked
2722 * during subsequent calls to emit(). Any functor or slot
2723 * can be passed into connect(). It is converted into a slot
2726 * If you want to connect one signal to another, use make_slot()
2727 * to retrieve a functor that emits the signal when invoked.
2729 * Be careful if you directly pass one signal into the connect()
2730 * method of another: a shallow copy of the signal is made and
2731 * the signal's slots are not disconnected until both the signal
2732 * and its clone are destroyed, which is probably not what you want.
2734 * The following template arguments are used:
2735 * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
2736 * - @e T_accumulator The accumulator type used for emission. The default
2737 * @p nil means that no accumulator should be used, for example if signal
2738 * emission returns the return value of the last slot invoked.
2740 * You should use the more convenient unnumbered sigc::signal template.
2744 template <class T_return, class T_accumulator=nil>
2746 : public signal_base
2749 typedef internal::signal_emit0<T_return, T_accumulator> emitter_type;
2750 typedef typename emitter_type::result_type result_type;
2751 typedef slot<T_return()> slot_type;
2752 typedef slot_list<slot_type> slot_list_type;
2753 typedef typename slot_list_type::iterator iterator;
2754 typedef typename slot_list_type::const_iterator const_iterator;
2755 typedef typename slot_list_type::reverse_iterator reverse_iterator;
2756 typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
2758 /** Add a slot to the list of slots.
2759 * Any functor or slot may be passed into connect().
2760 * It will be converted into a slot implicitly.
2761 * The returned iterator may be stored for disconnection
2762 * of the slot at some later point. It stays valid until
2763 * the slot is removed from the list of slots. The iterator
2764 * can also be implicitly converted into a sigc::connection object
2765 * that may be used safely beyond the life time of the slot.
2767 * std::function<> and C++11 lambda expressions are functors.
2768 * These are examples of functors that can be connected to a signal.
2770 * %std::bind() creates a functor, but this functor typically has an
2771 * %operator()() which is a variadic template.
2772 * Our functor_trait can't deduce the result type
2773 * of such a functor. If you first assign the return value of %std::bind()
2774 * to a std::function, you can connect the std::function to a signal.
2776 * @param slot_ The slot to add to the list of slots.
2777 * @return An iterator pointing to the new slot in the list.
2779 iterator connect(const slot_type& slot_)
2780 { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
2782 /** Add a slot to the list of slots.
2783 * @see connect(const slot_type& slot_).
2787 iterator connect(slot_type&& slot_)
2788 { return iterator(signal_base::connect(std::move(static_cast<slot_base&>(slot_)))); }
2790 /** Triggers the emission of the signal.
2791 * During signal emission all slots that have been connected
2792 * to the signal are invoked unless they are manually set into
2793 * a blocking state. The parameters are passed on to the slots.
2794 * If @e T_accumulated is not @p nil, an accumulator of this type
2795 * is used to process the return values of the slot invocations.
2796 * Otherwise, the return value of the last slot invoked is returned.
2797 * @return The accumulated return values of the slot invocations.
2799 result_type emit() const
2800 { return emitter_type::emit(impl_); }
2802 #ifndef SIGCXX_DISABLE_DEPRECATED
2803 /** Triggers the emission of the signal in reverse order (see emit()).
2805 * @deprecated This is apparently not useful, but please let us know if you need it.
2807 result_type emit_reverse() const
2808 { return emitter_type::emit_reverse(impl_); }
2809 #endif // SIGCXX_DISABLE_DEPRECATED
2811 /** Triggers the emission of the signal (see emit()).
2813 * @deprecated This is apparently not useful, but let us know if you need it.
2815 result_type operator()() const
2818 /** Creates a functor that calls emit() on this signal.
2820 * sigc::mem_fun(mysignal, &sigc::signal0::emit)
2822 * yields the same result.
2823 * @return A functor that calls emit() on this signal.
2825 bound_const_mem_functor0<result_type, signal0> make_slot() const
2826 { return bound_const_mem_functor0<result_type, signal0>(*this, &signal0::emit); }
2828 #ifndef SIGCXX_DISABLE_DEPRECATED
2829 /** Creates an STL-style interface for the signal's list of slots.
2830 * This interface supports iteration, insertion and removal of slots.
2831 * @return An STL-style interface for the signal's list of slots.
2833 * @deprecated This is apparently not useful, but please let us know if you need it.
2835 slot_list_type slots()
2836 { return slot_list_type(impl()); }
2838 /** Creates an STL-style interface for the signal's list of slots.
2839 * This interface supports iteration, insertion and removal of slots.
2840 * @return An STL-style interface for the signal's list of slots.
2842 * @deprecated This is apparently not useful, but please let us know if you need it.
2844 const slot_list_type slots() const
2845 { return slot_list_type(const_cast<signal0*>(this)->impl()); }
2846 #endif // SIGCXX_DISABLE_DEPRECATED
2850 signal0(const signal0& src)
2851 : signal_base(src) {}
2853 signal0(signal0&& src)
2854 : signal_base(std::move(src)) {}
2856 signal0& operator=(const signal0& src)
2858 signal_base::operator=(src);
2862 signal0& operator=(signal0&& src)
2864 signal_base::operator=(std::move(src));
2869 /** Signal declaration.
2870 * signal1 can be used to connect() slots that are invoked
2871 * during subsequent calls to emit(). Any functor or slot
2872 * can be passed into connect(). It is converted into a slot
2875 * If you want to connect one signal to another, use make_slot()
2876 * to retrieve a functor that emits the signal when invoked.
2878 * Be careful if you directly pass one signal into the connect()
2879 * method of another: a shallow copy of the signal is made and
2880 * the signal's slots are not disconnected until both the signal
2881 * and its clone are destroyed, which is probably not what you want.
2883 * The following template arguments are used:
2884 * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
2885 * - @e T_arg1 Argument type used in the definition of emit().
2886 * - @e T_accumulator The accumulator type used for emission. The default
2887 * @p nil means that no accumulator should be used, for example if signal
2888 * emission returns the return value of the last slot invoked.
2890 * You should use the more convenient unnumbered sigc::signal template.
2894 template <class T_return, class T_arg1, class T_accumulator=nil>
2896 : public signal_base
2899 typedef internal::signal_emit1<T_return, T_arg1, T_accumulator> emitter_type;
2900 typedef typename emitter_type::result_type result_type;
2901 typedef slot<T_return(T_arg1)> slot_type;
2902 typedef slot_list<slot_type> slot_list_type;
2903 typedef typename slot_list_type::iterator iterator;
2904 typedef typename slot_list_type::const_iterator const_iterator;
2905 typedef typename slot_list_type::reverse_iterator reverse_iterator;
2906 typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
2908 /** Add a slot to the list of slots.
2909 * Any functor or slot may be passed into connect().
2910 * It will be converted into a slot implicitly.
2911 * The returned iterator may be stored for disconnection
2912 * of the slot at some later point. It stays valid until
2913 * the slot is removed from the list of slots. The iterator
2914 * can also be implicitly converted into a sigc::connection object
2915 * that may be used safely beyond the life time of the slot.
2917 * std::function<> and C++11 lambda expressions are functors.
2918 * These are examples of functors that can be connected to a signal.
2920 * %std::bind() creates a functor, but this functor typically has an
2921 * %operator()() which is a variadic template.
2922 * Our functor_trait can't deduce the result type
2923 * of such a functor. If you first assign the return value of %std::bind()
2924 * to a std::function, you can connect the std::function to a signal.
2926 * @param slot_ The slot to add to the list of slots.
2927 * @return An iterator pointing to the new slot in the list.
2929 iterator connect(const slot_type& slot_)
2930 { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
2932 /** Add a slot to the list of slots.
2933 * @see connect(const slot_type& slot_).
2937 iterator connect(slot_type&& slot_)
2938 { return iterator(signal_base::connect(std::move(static_cast<slot_base&>(slot_)))); }
2940 /** Triggers the emission of the signal.
2941 * During signal emission all slots that have been connected
2942 * to the signal are invoked unless they are manually set into
2943 * a blocking state. The parameters are passed on to the slots.
2944 * If @e T_accumulated is not @p nil, an accumulator of this type
2945 * is used to process the return values of the slot invocations.
2946 * Otherwise, the return value of the last slot invoked is returned.
2947 * @param _A_a1 Argument to be passed on to the slots.
2948 * @return The accumulated return values of the slot invocations.
2950 result_type emit(type_trait_take_t<T_arg1> _A_a1) const
2951 { return emitter_type::emit(impl_, _A_a1); }
2953 #ifndef SIGCXX_DISABLE_DEPRECATED
2954 /** Triggers the emission of the signal in reverse order (see emit()).
2956 * @deprecated This is apparently not useful, but please let us know if you need it.
2958 result_type emit_reverse(type_trait_take_t<T_arg1> _A_a1) const
2959 { return emitter_type::emit_reverse(impl_, _A_a1); }
2960 #endif // SIGCXX_DISABLE_DEPRECATED
2962 /** Triggers the emission of the signal (see emit()).
2964 * @deprecated This is apparently not useful, but let us know if you need it.
2966 result_type operator()(type_trait_take_t<T_arg1> _A_a1) const
2967 { return emit(_A_a1); }
2969 /** Creates a functor that calls emit() on this signal.
2971 * sigc::mem_fun(mysignal, &sigc::signal1::emit)
2973 * yields the same result.
2974 * @return A functor that calls emit() on this signal.
2976 bound_const_mem_functor1<result_type, signal1, type_trait_take_t<T_arg1>> make_slot() const
2977 { return bound_const_mem_functor1<result_type, signal1, type_trait_take_t<T_arg1>>(*this, &signal1::emit); }
2979 #ifndef SIGCXX_DISABLE_DEPRECATED
2980 /** Creates an STL-style interface for the signal's list of slots.
2981 * This interface supports iteration, insertion and removal of slots.
2982 * @return An STL-style interface for the signal's list of slots.
2984 * @deprecated This is apparently not useful, but please let us know if you need it.
2986 slot_list_type slots()
2987 { return slot_list_type(impl()); }
2989 /** Creates an STL-style interface for the signal's list of slots.
2990 * This interface supports iteration, insertion and removal of slots.
2991 * @return An STL-style interface for the signal's list of slots.
2993 * @deprecated This is apparently not useful, but please let us know if you need it.
2995 const slot_list_type slots() const
2996 { return slot_list_type(const_cast<signal1*>(this)->impl()); }
2997 #endif // SIGCXX_DISABLE_DEPRECATED
3001 signal1(const signal1& src)
3002 : signal_base(src) {}
3004 signal1(signal1&& src)
3005 : signal_base(std::move(src)) {}
3007 signal1& operator=(const signal1& src)
3009 signal_base::operator=(src);
3013 signal1& operator=(signal1&& src)
3015 signal_base::operator=(std::move(src));
3020 /** Signal declaration.
3021 * signal2 can be used to connect() slots that are invoked
3022 * during subsequent calls to emit(). Any functor or slot
3023 * can be passed into connect(). It is converted into a slot
3026 * If you want to connect one signal to another, use make_slot()
3027 * to retrieve a functor that emits the signal when invoked.
3029 * Be careful if you directly pass one signal into the connect()
3030 * method of another: a shallow copy of the signal is made and
3031 * the signal's slots are not disconnected until both the signal
3032 * and its clone are destroyed, which is probably not what you want.
3034 * The following template arguments are used:
3035 * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
3036 * - @e T_arg1 Argument type used in the definition of emit().
3037 * - @e T_arg2 Argument type used in the definition of emit().
3038 * - @e T_accumulator The accumulator type used for emission. The default
3039 * @p nil means that no accumulator should be used, for example if signal
3040 * emission returns the return value of the last slot invoked.
3042 * You should use the more convenient unnumbered sigc::signal template.
3046 template <class T_return, class T_arg1, class T_arg2, class T_accumulator=nil>
3048 : public signal_base
3051 typedef internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator> emitter_type;
3052 typedef typename emitter_type::result_type result_type;
3053 typedef slot<T_return(T_arg1, T_arg2)> slot_type;
3054 typedef slot_list<slot_type> slot_list_type;
3055 typedef typename slot_list_type::iterator iterator;
3056 typedef typename slot_list_type::const_iterator const_iterator;
3057 typedef typename slot_list_type::reverse_iterator reverse_iterator;
3058 typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
3060 /** Add a slot to the list of slots.
3061 * Any functor or slot may be passed into connect().
3062 * It will be converted into a slot implicitly.
3063 * The returned iterator may be stored for disconnection
3064 * of the slot at some later point. It stays valid until
3065 * the slot is removed from the list of slots. The iterator
3066 * can also be implicitly converted into a sigc::connection object
3067 * that may be used safely beyond the life time of the slot.
3069 * std::function<> and C++11 lambda expressions are functors.
3070 * These are examples of functors that can be connected to a signal.
3072 * %std::bind() creates a functor, but this functor typically has an
3073 * %operator()() which is a variadic template.
3074 * Our functor_trait can't deduce the result type
3075 * of such a functor. If you first assign the return value of %std::bind()
3076 * to a std::function, you can connect the std::function to a signal.
3078 * @param slot_ The slot to add to the list of slots.
3079 * @return An iterator pointing to the new slot in the list.
3081 iterator connect(const slot_type& slot_)
3082 { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
3084 /** Add a slot to the list of slots.
3085 * @see connect(const slot_type& slot_).
3089 iterator connect(slot_type&& slot_)
3090 { return iterator(signal_base::connect(std::move(static_cast<slot_base&>(slot_)))); }
3092 /** Triggers the emission of the signal.
3093 * During signal emission all slots that have been connected
3094 * to the signal are invoked unless they are manually set into
3095 * a blocking state. The parameters are passed on to the slots.
3096 * If @e T_accumulated is not @p nil, an accumulator of this type
3097 * is used to process the return values of the slot invocations.
3098 * Otherwise, the return value of the last slot invoked is returned.
3099 * @param _A_a1 Argument to be passed on to the slots.
3100 * @param _A_a2 Argument to be passed on to the slots.
3101 * @return The accumulated return values of the slot invocations.
3103 result_type emit(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2) const
3104 { return emitter_type::emit(impl_, _A_a1, _A_a2); }
3106 #ifndef SIGCXX_DISABLE_DEPRECATED
3107 /** Triggers the emission of the signal in reverse order (see emit()).
3109 * @deprecated This is apparently not useful, but please let us know if you need it.
3111 result_type emit_reverse(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2) const
3112 { return emitter_type::emit_reverse(impl_, _A_a1, _A_a2); }
3113 #endif // SIGCXX_DISABLE_DEPRECATED
3115 /** Triggers the emission of the signal (see emit()).
3117 * @deprecated This is apparently not useful, but let us know if you need it.
3119 result_type operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2) const
3120 { return emit(_A_a1, _A_a2); }
3122 /** Creates a functor that calls emit() on this signal.
3124 * sigc::mem_fun(mysignal, &sigc::signal2::emit)
3126 * yields the same result.
3127 * @return A functor that calls emit() on this signal.
3129 bound_const_mem_functor2<result_type, signal2, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>> make_slot() const
3130 { return bound_const_mem_functor2<result_type, signal2, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>>(*this, &signal2::emit); }
3132 #ifndef SIGCXX_DISABLE_DEPRECATED
3133 /** Creates an STL-style interface for the signal's list of slots.
3134 * This interface supports iteration, insertion and removal of slots.
3135 * @return An STL-style interface for the signal's list of slots.
3137 * @deprecated This is apparently not useful, but please let us know if you need it.
3139 slot_list_type slots()
3140 { return slot_list_type(impl()); }
3142 /** Creates an STL-style interface for the signal's list of slots.
3143 * This interface supports iteration, insertion and removal of slots.
3144 * @return An STL-style interface for the signal's list of slots.
3146 * @deprecated This is apparently not useful, but please let us know if you need it.
3148 const slot_list_type slots() const
3149 { return slot_list_type(const_cast<signal2*>(this)->impl()); }
3150 #endif // SIGCXX_DISABLE_DEPRECATED
3154 signal2(const signal2& src)
3155 : signal_base(src) {}
3157 signal2(signal2&& src)
3158 : signal_base(std::move(src)) {}
3160 signal2& operator=(const signal2& src)
3162 signal_base::operator=(src);
3166 signal2& operator=(signal2&& src)
3168 signal_base::operator=(std::move(src));
3173 /** Signal declaration.
3174 * signal3 can be used to connect() slots that are invoked
3175 * during subsequent calls to emit(). Any functor or slot
3176 * can be passed into connect(). It is converted into a slot
3179 * If you want to connect one signal to another, use make_slot()
3180 * to retrieve a functor that emits the signal when invoked.
3182 * Be careful if you directly pass one signal into the connect()
3183 * method of another: a shallow copy of the signal is made and
3184 * the signal's slots are not disconnected until both the signal
3185 * and its clone are destroyed, which is probably not what you want.
3187 * The following template arguments are used:
3188 * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
3189 * - @e T_arg1 Argument type used in the definition of emit().
3190 * - @e T_arg2 Argument type used in the definition of emit().
3191 * - @e T_arg3 Argument type used in the definition of emit().
3192 * - @e T_accumulator The accumulator type used for emission. The default
3193 * @p nil means that no accumulator should be used, for example if signal
3194 * emission returns the return value of the last slot invoked.
3196 * You should use the more convenient unnumbered sigc::signal template.
3200 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_accumulator=nil>
3202 : public signal_base
3205 typedef internal::signal_emit3<T_return, T_arg1, T_arg2, T_arg3, T_accumulator> emitter_type;
3206 typedef typename emitter_type::result_type result_type;
3207 typedef slot<T_return(T_arg1, T_arg2, T_arg3)> slot_type;
3208 typedef slot_list<slot_type> slot_list_type;
3209 typedef typename slot_list_type::iterator iterator;
3210 typedef typename slot_list_type::const_iterator const_iterator;
3211 typedef typename slot_list_type::reverse_iterator reverse_iterator;
3212 typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
3214 /** Add a slot to the list of slots.
3215 * Any functor or slot may be passed into connect().
3216 * It will be converted into a slot implicitly.
3217 * The returned iterator may be stored for disconnection
3218 * of the slot at some later point. It stays valid until
3219 * the slot is removed from the list of slots. The iterator
3220 * can also be implicitly converted into a sigc::connection object
3221 * that may be used safely beyond the life time of the slot.
3223 * std::function<> and C++11 lambda expressions are functors.
3224 * These are examples of functors that can be connected to a signal.
3226 * %std::bind() creates a functor, but this functor typically has an
3227 * %operator()() which is a variadic template.
3228 * Our functor_trait can't deduce the result type
3229 * of such a functor. If you first assign the return value of %std::bind()
3230 * to a std::function, you can connect the std::function to a signal.
3232 * @param slot_ The slot to add to the list of slots.
3233 * @return An iterator pointing to the new slot in the list.
3235 iterator connect(const slot_type& slot_)
3236 { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
3238 /** Add a slot to the list of slots.
3239 * @see connect(const slot_type& slot_).
3243 iterator connect(slot_type&& slot_)
3244 { return iterator(signal_base::connect(std::move(static_cast<slot_base&>(slot_)))); }
3246 /** Triggers the emission of the signal.
3247 * During signal emission all slots that have been connected
3248 * to the signal are invoked unless they are manually set into
3249 * a blocking state. The parameters are passed on to the slots.
3250 * If @e T_accumulated is not @p nil, an accumulator of this type
3251 * is used to process the return values of the slot invocations.
3252 * Otherwise, the return value of the last slot invoked is returned.
3253 * @param _A_a1 Argument to be passed on to the slots.
3254 * @param _A_a2 Argument to be passed on to the slots.
3255 * @param _A_a3 Argument to be passed on to the slots.
3256 * @return The accumulated return values of the slot invocations.
3258 result_type emit(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3) const
3259 { return emitter_type::emit(impl_, _A_a1, _A_a2, _A_a3); }
3261 #ifndef SIGCXX_DISABLE_DEPRECATED
3262 /** Triggers the emission of the signal in reverse order (see emit()).
3264 * @deprecated This is apparently not useful, but please let us know if you need it.
3266 result_type emit_reverse(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3) const
3267 { return emitter_type::emit_reverse(impl_, _A_a1, _A_a2, _A_a3); }
3268 #endif // SIGCXX_DISABLE_DEPRECATED
3270 /** Triggers the emission of the signal (see emit()).
3272 * @deprecated This is apparently not useful, but let us know if you need it.
3274 result_type operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3) const
3275 { return emit(_A_a1, _A_a2, _A_a3); }
3277 /** Creates a functor that calls emit() on this signal.
3279 * sigc::mem_fun(mysignal, &sigc::signal3::emit)
3281 * yields the same result.
3282 * @return A functor that calls emit() on this signal.
3284 bound_const_mem_functor3<result_type, signal3, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>> make_slot() const
3285 { return bound_const_mem_functor3<result_type, signal3, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>>(*this, &signal3::emit); }
3287 #ifndef SIGCXX_DISABLE_DEPRECATED
3288 /** Creates an STL-style interface for the signal's list of slots.
3289 * This interface supports iteration, insertion and removal of slots.
3290 * @return An STL-style interface for the signal's list of slots.
3292 * @deprecated This is apparently not useful, but please let us know if you need it.
3294 slot_list_type slots()
3295 { return slot_list_type(impl()); }
3297 /** Creates an STL-style interface for the signal's list of slots.
3298 * This interface supports iteration, insertion and removal of slots.
3299 * @return An STL-style interface for the signal's list of slots.
3301 * @deprecated This is apparently not useful, but please let us know if you need it.
3303 const slot_list_type slots() const
3304 { return slot_list_type(const_cast<signal3*>(this)->impl()); }
3305 #endif // SIGCXX_DISABLE_DEPRECATED
3309 signal3(const signal3& src)
3310 : signal_base(src) {}
3312 signal3(signal3&& src)
3313 : signal_base(std::move(src)) {}
3315 signal3& operator=(const signal3& src)
3317 signal_base::operator=(src);
3321 signal3& operator=(signal3&& src)
3323 signal_base::operator=(std::move(src));
3328 /** Signal declaration.
3329 * signal4 can be used to connect() slots that are invoked
3330 * during subsequent calls to emit(). Any functor or slot
3331 * can be passed into connect(). It is converted into a slot
3334 * If you want to connect one signal to another, use make_slot()
3335 * to retrieve a functor that emits the signal when invoked.
3337 * Be careful if you directly pass one signal into the connect()
3338 * method of another: a shallow copy of the signal is made and
3339 * the signal's slots are not disconnected until both the signal
3340 * and its clone are destroyed, which is probably not what you want.
3342 * The following template arguments are used:
3343 * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
3344 * - @e T_arg1 Argument type used in the definition of emit().
3345 * - @e T_arg2 Argument type used in the definition of emit().
3346 * - @e T_arg3 Argument type used in the definition of emit().
3347 * - @e T_arg4 Argument type used in the definition of emit().
3348 * - @e T_accumulator The accumulator type used for emission. The default
3349 * @p nil means that no accumulator should be used, for example if signal
3350 * emission returns the return value of the last slot invoked.
3352 * You should use the more convenient unnumbered sigc::signal template.
3356 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_accumulator=nil>
3358 : public signal_base
3361 typedef internal::signal_emit4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_accumulator> emitter_type;
3362 typedef typename emitter_type::result_type result_type;
3363 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4)> slot_type;
3364 typedef slot_list<slot_type> slot_list_type;
3365 typedef typename slot_list_type::iterator iterator;
3366 typedef typename slot_list_type::const_iterator const_iterator;
3367 typedef typename slot_list_type::reverse_iterator reverse_iterator;
3368 typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
3370 /** Add a slot to the list of slots.
3371 * Any functor or slot may be passed into connect().
3372 * It will be converted into a slot implicitly.
3373 * The returned iterator may be stored for disconnection
3374 * of the slot at some later point. It stays valid until
3375 * the slot is removed from the list of slots. The iterator
3376 * can also be implicitly converted into a sigc::connection object
3377 * that may be used safely beyond the life time of the slot.
3379 * std::function<> and C++11 lambda expressions are functors.
3380 * These are examples of functors that can be connected to a signal.
3382 * %std::bind() creates a functor, but this functor typically has an
3383 * %operator()() which is a variadic template.
3384 * Our functor_trait can't deduce the result type
3385 * of such a functor. If you first assign the return value of %std::bind()
3386 * to a std::function, you can connect the std::function to a signal.
3388 * @param slot_ The slot to add to the list of slots.
3389 * @return An iterator pointing to the new slot in the list.
3391 iterator connect(const slot_type& slot_)
3392 { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
3394 /** Add a slot to the list of slots.
3395 * @see connect(const slot_type& slot_).
3399 iterator connect(slot_type&& slot_)
3400 { return iterator(signal_base::connect(std::move(static_cast<slot_base&>(slot_)))); }
3402 /** Triggers the emission of the signal.
3403 * During signal emission all slots that have been connected
3404 * to the signal are invoked unless they are manually set into
3405 * a blocking state. The parameters are passed on to the slots.
3406 * If @e T_accumulated is not @p nil, an accumulator of this type
3407 * is used to process the return values of the slot invocations.
3408 * Otherwise, the return value of the last slot invoked is returned.
3409 * @param _A_a1 Argument to be passed on to the slots.
3410 * @param _A_a2 Argument to be passed on to the slots.
3411 * @param _A_a3 Argument to be passed on to the slots.
3412 * @param _A_a4 Argument to be passed on to the slots.
3413 * @return The accumulated return values of the slot invocations.
3415 result_type emit(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4) const
3416 { return emitter_type::emit(impl_, _A_a1, _A_a2, _A_a3, _A_a4); }
3418 #ifndef SIGCXX_DISABLE_DEPRECATED
3419 /** Triggers the emission of the signal in reverse order (see emit()).
3421 * @deprecated This is apparently not useful, but please let us know if you need it.
3423 result_type emit_reverse(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4) const
3424 { return emitter_type::emit_reverse(impl_, _A_a1, _A_a2, _A_a3, _A_a4); }
3425 #endif // SIGCXX_DISABLE_DEPRECATED
3427 /** Triggers the emission of the signal (see emit()).
3429 * @deprecated This is apparently not useful, but let us know if you need it.
3431 result_type operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4) const
3432 { return emit(_A_a1, _A_a2, _A_a3, _A_a4); }
3434 /** Creates a functor that calls emit() on this signal.
3436 * sigc::mem_fun(mysignal, &sigc::signal4::emit)
3438 * yields the same result.
3439 * @return A functor that calls emit() on this signal.
3441 bound_const_mem_functor4<result_type, signal4, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>, type_trait_take_t<T_arg4>> make_slot() const
3442 { return bound_const_mem_functor4<result_type, signal4, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>, type_trait_take_t<T_arg4>>(*this, &signal4::emit); }
3444 #ifndef SIGCXX_DISABLE_DEPRECATED
3445 /** Creates an STL-style interface for the signal's list of slots.
3446 * This interface supports iteration, insertion and removal of slots.
3447 * @return An STL-style interface for the signal's list of slots.
3449 * @deprecated This is apparently not useful, but please let us know if you need it.
3451 slot_list_type slots()
3452 { return slot_list_type(impl()); }
3454 /** Creates an STL-style interface for the signal's list of slots.
3455 * This interface supports iteration, insertion and removal of slots.
3456 * @return An STL-style interface for the signal's list of slots.
3458 * @deprecated This is apparently not useful, but please let us know if you need it.
3460 const slot_list_type slots() const
3461 { return slot_list_type(const_cast<signal4*>(this)->impl()); }
3462 #endif // SIGCXX_DISABLE_DEPRECATED
3466 signal4(const signal4& src)
3467 : signal_base(src) {}
3469 signal4(signal4&& src)
3470 : signal_base(std::move(src)) {}
3472 signal4& operator=(const signal4& src)
3474 signal_base::operator=(src);
3478 signal4& operator=(signal4&& src)
3480 signal_base::operator=(std::move(src));
3485 /** Signal declaration.
3486 * signal5 can be used to connect() slots that are invoked
3487 * during subsequent calls to emit(). Any functor or slot
3488 * can be passed into connect(). It is converted into a slot
3491 * If you want to connect one signal to another, use make_slot()
3492 * to retrieve a functor that emits the signal when invoked.
3494 * Be careful if you directly pass one signal into the connect()
3495 * method of another: a shallow copy of the signal is made and
3496 * the signal's slots are not disconnected until both the signal
3497 * and its clone are destroyed, which is probably not what you want.
3499 * The following template arguments are used:
3500 * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
3501 * - @e T_arg1 Argument type used in the definition of emit().
3502 * - @e T_arg2 Argument type used in the definition of emit().
3503 * - @e T_arg3 Argument type used in the definition of emit().
3504 * - @e T_arg4 Argument type used in the definition of emit().
3505 * - @e T_arg5 Argument type used in the definition of emit().
3506 * - @e T_accumulator The accumulator type used for emission. The default
3507 * @p nil means that no accumulator should be used, for example if signal
3508 * emission returns the return value of the last slot invoked.
3510 * You should use the more convenient unnumbered sigc::signal template.
3514 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_accumulator=nil>
3516 : public signal_base
3519 typedef internal::signal_emit5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_accumulator> emitter_type;
3520 typedef typename emitter_type::result_type result_type;
3521 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5)> slot_type;
3522 typedef slot_list<slot_type> slot_list_type;
3523 typedef typename slot_list_type::iterator iterator;
3524 typedef typename slot_list_type::const_iterator const_iterator;
3525 typedef typename slot_list_type::reverse_iterator reverse_iterator;
3526 typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
3528 /** Add a slot to the list of slots.
3529 * Any functor or slot may be passed into connect().
3530 * It will be converted into a slot implicitly.
3531 * The returned iterator may be stored for disconnection
3532 * of the slot at some later point. It stays valid until
3533 * the slot is removed from the list of slots. The iterator
3534 * can also be implicitly converted into a sigc::connection object
3535 * that may be used safely beyond the life time of the slot.
3537 * std::function<> and C++11 lambda expressions are functors.
3538 * These are examples of functors that can be connected to a signal.
3540 * %std::bind() creates a functor, but this functor typically has an
3541 * %operator()() which is a variadic template.
3542 * Our functor_trait can't deduce the result type
3543 * of such a functor. If you first assign the return value of %std::bind()
3544 * to a std::function, you can connect the std::function to a signal.
3546 * @param slot_ The slot to add to the list of slots.
3547 * @return An iterator pointing to the new slot in the list.
3549 iterator connect(const slot_type& slot_)
3550 { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
3552 /** Add a slot to the list of slots.
3553 * @see connect(const slot_type& slot_).
3557 iterator connect(slot_type&& slot_)
3558 { return iterator(signal_base::connect(std::move(static_cast<slot_base&>(slot_)))); }
3560 /** Triggers the emission of the signal.
3561 * During signal emission all slots that have been connected
3562 * to the signal are invoked unless they are manually set into
3563 * a blocking state. The parameters are passed on to the slots.
3564 * If @e T_accumulated is not @p nil, an accumulator of this type
3565 * is used to process the return values of the slot invocations.
3566 * Otherwise, the return value of the last slot invoked is returned.
3567 * @param _A_a1 Argument to be passed on to the slots.
3568 * @param _A_a2 Argument to be passed on to the slots.
3569 * @param _A_a3 Argument to be passed on to the slots.
3570 * @param _A_a4 Argument to be passed on to the slots.
3571 * @param _A_a5 Argument to be passed on to the slots.
3572 * @return The accumulated return values of the slot invocations.
3574 result_type emit(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5) const
3575 { return emitter_type::emit(impl_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5); }
3577 #ifndef SIGCXX_DISABLE_DEPRECATED
3578 /** Triggers the emission of the signal in reverse order (see emit()).
3580 * @deprecated This is apparently not useful, but please let us know if you need it.
3582 result_type emit_reverse(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5) const
3583 { return emitter_type::emit_reverse(impl_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5); }
3584 #endif // SIGCXX_DISABLE_DEPRECATED
3586 /** Triggers the emission of the signal (see emit()).
3588 * @deprecated This is apparently not useful, but let us know if you need it.
3590 result_type operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5) const
3591 { return emit(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); }
3593 /** Creates a functor that calls emit() on this signal.
3595 * sigc::mem_fun(mysignal, &sigc::signal5::emit)
3597 * yields the same result.
3598 * @return A functor that calls emit() on this signal.
3600 bound_const_mem_functor5<result_type, signal5, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>, type_trait_take_t<T_arg4>, type_trait_take_t<T_arg5>> make_slot() const
3601 { return bound_const_mem_functor5<result_type, signal5, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>, type_trait_take_t<T_arg4>, type_trait_take_t<T_arg5>>(*this, &signal5::emit); }
3603 #ifndef SIGCXX_DISABLE_DEPRECATED
3604 /** Creates an STL-style interface for the signal's list of slots.
3605 * This interface supports iteration, insertion and removal of slots.
3606 * @return An STL-style interface for the signal's list of slots.
3608 * @deprecated This is apparently not useful, but please let us know if you need it.
3610 slot_list_type slots()
3611 { return slot_list_type(impl()); }
3613 /** Creates an STL-style interface for the signal's list of slots.
3614 * This interface supports iteration, insertion and removal of slots.
3615 * @return An STL-style interface for the signal's list of slots.
3617 * @deprecated This is apparently not useful, but please let us know if you need it.
3619 const slot_list_type slots() const
3620 { return slot_list_type(const_cast<signal5*>(this)->impl()); }
3621 #endif // SIGCXX_DISABLE_DEPRECATED
3625 signal5(const signal5& src)
3626 : signal_base(src) {}
3628 signal5(signal5&& src)
3629 : signal_base(std::move(src)) {}
3631 signal5& operator=(const signal5& src)
3633 signal_base::operator=(src);
3637 signal5& operator=(signal5&& src)
3639 signal_base::operator=(std::move(src));
3644 /** Signal declaration.
3645 * signal6 can be used to connect() slots that are invoked
3646 * during subsequent calls to emit(). Any functor or slot
3647 * can be passed into connect(). It is converted into a slot
3650 * If you want to connect one signal to another, use make_slot()
3651 * to retrieve a functor that emits the signal when invoked.
3653 * Be careful if you directly pass one signal into the connect()
3654 * method of another: a shallow copy of the signal is made and
3655 * the signal's slots are not disconnected until both the signal
3656 * and its clone are destroyed, which is probably not what you want.
3658 * The following template arguments are used:
3659 * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
3660 * - @e T_arg1 Argument type used in the definition of emit().
3661 * - @e T_arg2 Argument type used in the definition of emit().
3662 * - @e T_arg3 Argument type used in the definition of emit().
3663 * - @e T_arg4 Argument type used in the definition of emit().
3664 * - @e T_arg5 Argument type used in the definition of emit().
3665 * - @e T_arg6 Argument type used in the definition of emit().
3666 * - @e T_accumulator The accumulator type used for emission. The default
3667 * @p nil means that no accumulator should be used, for example if signal
3668 * emission returns the return value of the last slot invoked.
3670 * You should use the more convenient unnumbered sigc::signal template.
3674 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6, class T_accumulator=nil>
3676 : public signal_base
3679 typedef internal::signal_emit6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_accumulator> emitter_type;
3680 typedef typename emitter_type::result_type result_type;
3681 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6)> slot_type;
3682 typedef slot_list<slot_type> slot_list_type;
3683 typedef typename slot_list_type::iterator iterator;
3684 typedef typename slot_list_type::const_iterator const_iterator;
3685 typedef typename slot_list_type::reverse_iterator reverse_iterator;
3686 typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
3688 /** Add a slot to the list of slots.
3689 * Any functor or slot may be passed into connect().
3690 * It will be converted into a slot implicitly.
3691 * The returned iterator may be stored for disconnection
3692 * of the slot at some later point. It stays valid until
3693 * the slot is removed from the list of slots. The iterator
3694 * can also be implicitly converted into a sigc::connection object
3695 * that may be used safely beyond the life time of the slot.
3697 * std::function<> and C++11 lambda expressions are functors.
3698 * These are examples of functors that can be connected to a signal.
3700 * %std::bind() creates a functor, but this functor typically has an
3701 * %operator()() which is a variadic template.
3702 * Our functor_trait can't deduce the result type
3703 * of such a functor. If you first assign the return value of %std::bind()
3704 * to a std::function, you can connect the std::function to a signal.
3706 * @param slot_ The slot to add to the list of slots.
3707 * @return An iterator pointing to the new slot in the list.
3709 iterator connect(const slot_type& slot_)
3710 { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
3712 /** Add a slot to the list of slots.
3713 * @see connect(const slot_type& slot_).
3717 iterator connect(slot_type&& slot_)
3718 { return iterator(signal_base::connect(std::move(static_cast<slot_base&>(slot_)))); }
3720 /** Triggers the emission of the signal.
3721 * During signal emission all slots that have been connected
3722 * to the signal are invoked unless they are manually set into
3723 * a blocking state. The parameters are passed on to the slots.
3724 * If @e T_accumulated is not @p nil, an accumulator of this type
3725 * is used to process the return values of the slot invocations.
3726 * Otherwise, the return value of the last slot invoked is returned.
3727 * @param _A_a1 Argument to be passed on to the slots.
3728 * @param _A_a2 Argument to be passed on to the slots.
3729 * @param _A_a3 Argument to be passed on to the slots.
3730 * @param _A_a4 Argument to be passed on to the slots.
3731 * @param _A_a5 Argument to be passed on to the slots.
3732 * @param _A_a6 Argument to be passed on to the slots.
3733 * @return The accumulated return values of the slot invocations.
3735 result_type emit(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6) const
3736 { return emitter_type::emit(impl_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
3738 #ifndef SIGCXX_DISABLE_DEPRECATED
3739 /** Triggers the emission of the signal in reverse order (see emit()).
3741 * @deprecated This is apparently not useful, but please let us know if you need it.
3743 result_type emit_reverse(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6) const
3744 { return emitter_type::emit_reverse(impl_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
3745 #endif // SIGCXX_DISABLE_DEPRECATED
3747 /** Triggers the emission of the signal (see emit()).
3749 * @deprecated This is apparently not useful, but let us know if you need it.
3751 result_type operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6) const
3752 { return emit(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
3754 /** Creates a functor that calls emit() on this signal.
3756 * sigc::mem_fun(mysignal, &sigc::signal6::emit)
3758 * yields the same result.
3759 * @return A functor that calls emit() on this signal.
3761 bound_const_mem_functor6<result_type, signal6, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>, type_trait_take_t<T_arg4>, type_trait_take_t<T_arg5>, type_trait_take_t<T_arg6>> make_slot() const
3762 { return bound_const_mem_functor6<result_type, signal6, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>, type_trait_take_t<T_arg4>, type_trait_take_t<T_arg5>, type_trait_take_t<T_arg6>>(*this, &signal6::emit); }
3764 #ifndef SIGCXX_DISABLE_DEPRECATED
3765 /** Creates an STL-style interface for the signal's list of slots.
3766 * This interface supports iteration, insertion and removal of slots.
3767 * @return An STL-style interface for the signal's list of slots.
3769 * @deprecated This is apparently not useful, but please let us know if you need it.
3771 slot_list_type slots()
3772 { return slot_list_type(impl()); }
3774 /** Creates an STL-style interface for the signal's list of slots.
3775 * This interface supports iteration, insertion and removal of slots.
3776 * @return An STL-style interface for the signal's list of slots.
3778 * @deprecated This is apparently not useful, but please let us know if you need it.
3780 const slot_list_type slots() const
3781 { return slot_list_type(const_cast<signal6*>(this)->impl()); }
3782 #endif // SIGCXX_DISABLE_DEPRECATED
3786 signal6(const signal6& src)
3787 : signal_base(src) {}
3789 signal6(signal6&& src)
3790 : signal_base(std::move(src)) {}
3792 signal6& operator=(const signal6& src)
3794 signal_base::operator=(src);
3798 signal6& operator=(signal6&& src)
3800 signal_base::operator=(std::move(src));
3805 /** Signal declaration.
3806 * signal7 can be used to connect() slots that are invoked
3807 * during subsequent calls to emit(). Any functor or slot
3808 * can be passed into connect(). It is converted into a slot
3811 * If you want to connect one signal to another, use make_slot()
3812 * to retrieve a functor that emits the signal when invoked.
3814 * Be careful if you directly pass one signal into the connect()
3815 * method of another: a shallow copy of the signal is made and
3816 * the signal's slots are not disconnected until both the signal
3817 * and its clone are destroyed, which is probably not what you want.
3819 * The following template arguments are used:
3820 * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
3821 * - @e T_arg1 Argument type used in the definition of emit().
3822 * - @e T_arg2 Argument type used in the definition of emit().
3823 * - @e T_arg3 Argument type used in the definition of emit().
3824 * - @e T_arg4 Argument type used in the definition of emit().
3825 * - @e T_arg5 Argument type used in the definition of emit().
3826 * - @e T_arg6 Argument type used in the definition of emit().
3827 * - @e T_arg7 Argument type used in the definition of emit().
3828 * - @e T_accumulator The accumulator type used for emission. The default
3829 * @p nil means that no accumulator should be used, for example if signal
3830 * emission returns the return value of the last slot invoked.
3832 * You should use the more convenient unnumbered sigc::signal template.
3836 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, class T_accumulator=nil>
3838 : public signal_base
3841 typedef internal::signal_emit7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator> emitter_type;
3842 typedef typename emitter_type::result_type result_type;
3843 typedef slot<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7)> slot_type;
3844 typedef slot_list<slot_type> slot_list_type;
3845 typedef typename slot_list_type::iterator iterator;
3846 typedef typename slot_list_type::const_iterator const_iterator;
3847 typedef typename slot_list_type::reverse_iterator reverse_iterator;
3848 typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
3850 /** Add a slot to the list of slots.
3851 * Any functor or slot may be passed into connect().
3852 * It will be converted into a slot implicitly.
3853 * The returned iterator may be stored for disconnection
3854 * of the slot at some later point. It stays valid until
3855 * the slot is removed from the list of slots. The iterator
3856 * can also be implicitly converted into a sigc::connection object
3857 * that may be used safely beyond the life time of the slot.
3859 * std::function<> and C++11 lambda expressions are functors.
3860 * These are examples of functors that can be connected to a signal.
3862 * %std::bind() creates a functor, but this functor typically has an
3863 * %operator()() which is a variadic template.
3864 * Our functor_trait can't deduce the result type
3865 * of such a functor. If you first assign the return value of %std::bind()
3866 * to a std::function, you can connect the std::function to a signal.
3868 * @param slot_ The slot to add to the list of slots.
3869 * @return An iterator pointing to the new slot in the list.
3871 iterator connect(const slot_type& slot_)
3872 { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
3874 /** Add a slot to the list of slots.
3875 * @see connect(const slot_type& slot_).
3879 iterator connect(slot_type&& slot_)
3880 { return iterator(signal_base::connect(std::move(static_cast<slot_base&>(slot_)))); }
3882 /** Triggers the emission of the signal.
3883 * During signal emission all slots that have been connected
3884 * to the signal are invoked unless they are manually set into
3885 * a blocking state. The parameters are passed on to the slots.
3886 * If @e T_accumulated is not @p nil, an accumulator of this type
3887 * is used to process the return values of the slot invocations.
3888 * Otherwise, the return value of the last slot invoked is returned.
3889 * @param _A_a1 Argument to be passed on to the slots.
3890 * @param _A_a2 Argument to be passed on to the slots.
3891 * @param _A_a3 Argument to be passed on to the slots.
3892 * @param _A_a4 Argument to be passed on to the slots.
3893 * @param _A_a5 Argument to be passed on to the slots.
3894 * @param _A_a6 Argument to be passed on to the slots.
3895 * @param _A_a7 Argument to be passed on to the slots.
3896 * @return The accumulated return values of the slot invocations.
3898 result_type emit(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7) const
3899 { return emitter_type::emit(impl_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); }
3901 #ifndef SIGCXX_DISABLE_DEPRECATED
3902 /** Triggers the emission of the signal in reverse order (see emit()).
3904 * @deprecated This is apparently not useful, but please let us know if you need it.
3906 result_type emit_reverse(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7) const
3907 { return emitter_type::emit_reverse(impl_, _A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); }
3908 #endif // SIGCXX_DISABLE_DEPRECATED
3910 /** Triggers the emission of the signal (see emit()).
3912 * @deprecated This is apparently not useful, but let us know if you need it.
3914 result_type operator()(type_trait_take_t<T_arg1> _A_a1, type_trait_take_t<T_arg2> _A_a2, type_trait_take_t<T_arg3> _A_a3, type_trait_take_t<T_arg4> _A_a4, type_trait_take_t<T_arg5> _A_a5, type_trait_take_t<T_arg6> _A_a6, type_trait_take_t<T_arg7> _A_a7) const
3915 { return emit(_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); }
3917 /** Creates a functor that calls emit() on this signal.
3919 * sigc::mem_fun(mysignal, &sigc::signal7::emit)
3921 * yields the same result.
3922 * @return A functor that calls emit() on this signal.
3924 bound_const_mem_functor7<result_type, signal7, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>, type_trait_take_t<T_arg4>, type_trait_take_t<T_arg5>, type_trait_take_t<T_arg6>, type_trait_take_t<T_arg7>> make_slot() const
3925 { return bound_const_mem_functor7<result_type, signal7, type_trait_take_t<T_arg1>, type_trait_take_t<T_arg2>, type_trait_take_t<T_arg3>, type_trait_take_t<T_arg4>, type_trait_take_t<T_arg5>, type_trait_take_t<T_arg6>, type_trait_take_t<T_arg7>>(*this, &signal7::emit); }
3927 #ifndef SIGCXX_DISABLE_DEPRECATED
3928 /** Creates an STL-style interface for the signal's list of slots.
3929 * This interface supports iteration, insertion and removal of slots.
3930 * @return An STL-style interface for the signal's list of slots.
3932 * @deprecated This is apparently not useful, but please let us know if you need it.
3934 slot_list_type slots()
3935 { return slot_list_type(impl()); }
3937 /** Creates an STL-style interface for the signal's list of slots.
3938 * This interface supports iteration, insertion and removal of slots.
3939 * @return An STL-style interface for the signal's list of slots.
3941 * @deprecated This is apparently not useful, but please let us know if you need it.
3943 const slot_list_type slots() const
3944 { return slot_list_type(const_cast<signal7*>(this)->impl()); }
3945 #endif // SIGCXX_DISABLE_DEPRECATED
3949 signal7(const signal7& src)
3950 : signal_base(src) {}
3952 signal7(signal7&& src)
3953 : signal_base(std::move(src)) {}
3955 signal7& operator=(const signal7& src)
3957 signal_base::operator=(src);
3961 signal7& operator=(signal7&& src)
3963 signal_base::operator=(std::move(src));
3970 /** Convenience wrapper for the numbered sigc::signal# templates.
3971 * signal can be used to connect() slots that are invoked
3972 * during subsequent calls to emit(). Any functor or slot
3973 * can be passed into connect(). It is converted into a slot
3976 * If you want to connect one signal to another, use make_slot()
3977 * to retrieve a functor that emits the signal when invoked.
3979 * Be careful if you directly pass one signal into the connect()
3980 * method of another: a shallow copy of the signal is made and
3981 * the signal's slots are not disconnected until both the signal
3982 * and its clone are destroyed, which is probably not what you want!
3984 * The template arguments determine the function signature of
3985 * the emit() function:
3986 * - @e T_return The desired return type of the emit() function.
3987 * - @e T_arg1 Argument type used in the definition of emit(). The default @p nil means no argument.
3988 * - @e T_arg2 Argument type used in the definition of emit(). The default @p nil means no argument.
3989 * - @e T_arg3 Argument type used in the definition of emit(). The default @p nil means no argument.
3990 * - @e T_arg4 Argument type used in the definition of emit(). The default @p nil means no argument.
3991 * - @e T_arg5 Argument type used in the definition of emit(). The default @p nil means no argument.
3992 * - @e T_arg6 Argument type used in the definition of emit(). The default @p nil means no argument.
3993 * - @e T_arg7 Argument type used in the definition of emit(). The default @p nil means no argument.
3995 * To specify an accumulator type the nested class signal::accumulated can be used.
4000 * sigc::signal<void, long> sig;
4001 * sig.connect(sigc::ptr_fun(&foo));
4005 * @deprecated Please use the syntax similar to that used by std::function<>:
4007 * sigc::slot<void(bool, int)> some_slot;
4012 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>
4014 : public signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>
4017 /** Convenience wrapper for the numbered sigc::signal# templates.
4018 * Like sigc::signal but the additional template parameter @e T_accumulator
4019 * defines the accumulator type that should be used.
4021 * An accumulator is a functor that uses a pair of special iterators
4022 * to step through a list of slots and calculate a return value
4023 * from the results of the slot invokations. The iterators' operator*()
4024 * executes the slot. The return value is buffered, so that in an expression
4025 * like @code a = (*i) * (*i); @endcode the slot is executed only once.
4026 * The accumulator must define its return value as @p result_type.
4029 * This accumulator calculates the arithmetic mean value:
4031 * struct arithmetic_mean_accumulator
4033 * typedef double result_type;
4034 * template<typename T_iterator>
4035 * result_type operator()(T_iterator first, T_iterator last) const
4037 * result_type value_ = 0;
4039 * for (; first != last; ++first, ++n_)
4041 * return value_ / n_;
4047 * This accumulator stops signal emission when a slot returns zero:
4049 * struct interruptable_accumulator
4051 * typedef bool result_type;
4052 * template<typename T_iterator>
4053 * result_type operator()(T_iterator first, T_iterator last) const
4055 * for (; first != last; ++first, ++n_)
4056 * if (!*first) return false;
4064 template <class T_accumulator>
4066 : public signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator>
4070 accumulated(const accumulated& src)
4071 : signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator>(src) {}
4076 signal(const signal& src)
4077 : signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>(src) {}
4079 signal(signal&& src)
4080 : signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>(std::move(src)) {}
4082 signal& operator=(const signal& src)
4084 signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>::operator=(src);
4088 signal& operator=(signal&& src)
4090 signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>::operator=(std::move(src));
4096 * This specialization allow use of the sigc::signal<R(Args...)> syntax,
4098 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>
4099 class signal<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7)>
4100 : public signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>
4103 /** Convenience wrapper for the numbered sigc::signal# templates.
4104 * Like sigc::signal but the additional template parameter @e T_accumulator
4105 * defines the accumulator type that should be used.
4107 * An accumulator is a functor that uses a pair of special iterators
4108 * to step through a list of slots and calculate a return value
4109 * from the results of the slot invokations. The iterators' operator*()
4110 * executes the slot. The return value is buffered, so that in an expression
4111 * like @code a = (*i) * (*i); @endcode the slot is executed only once.
4112 * The accumulator must define its return value as @p result_type.
4115 * This accumulator calculates the arithmetic mean value:
4117 * struct arithmetic_mean_accumulator
4119 * typedef double result_type;
4120 * template<typename T_iterator>
4121 * result_type operator()(T_iterator first, T_iterator last) const
4123 * result_type value_ = 0;
4125 * for (; first != last; ++first, ++n_)
4127 * return value_ / n_;
4133 * This accumulator stops signal emission when a slot returns zero:
4135 * struct interruptable_accumulator
4137 * typedef bool result_type;
4138 * template<typename T_iterator>
4139 * result_type operator()(T_iterator first, T_iterator last) const
4141 * for (; first != last; ++first, ++n_)
4142 * if (!*first) return false;
4150 template <class T_accumulator>
4152 : public signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator>
4156 accumulated(const accumulated& src)
4157 : signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_accumulator>(src) {}
4162 signal(const signal& src)
4163 : signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>(src) {}
4165 signal(signal&& src)
4166 : signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>(std::move(src)) {}
4168 signal& operator=(const signal& src)
4170 signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>::operator=(src);
4174 signal& operator=(signal&& src)
4176 signal7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil>::operator=(std::move(src));
4184 /** Convenience wrapper for the numbered sigc::signal0 template.
4185 * See the base class for useful methods.
4186 * This is the template specialization of the unnumbered sigc::signal
4187 * template for 0 argument(s).
4189 * @deprecated Please use the syntax similar to that used by std::function<>:
4191 * sigc::slot<void(bool, int)> some_slot;
4194 template <class T_return>
4195 class signal <T_return, nil, nil, nil, nil, nil, nil, nil>
4196 : public signal0<T_return, nil>
4200 /** Convenience wrapper for the numbered sigc::signal0 template.
4201 * Like sigc::signal but the additional template parameter @e T_accumulator
4202 * defines the accumulator type that should be used.
4204 template <class T_accumulator>
4206 : public signal0<T_return, T_accumulator>
4210 accumulated(const accumulated& src)
4211 : signal0<T_return, T_accumulator>(src) {}
4216 signal(const signal& src)
4217 : signal0<T_return, nil>(src) {}
4219 signal(signal&& src)
4220 : signal0<T_return, nil>(std::move(src)) {}
4222 signal& operator=(const signal& src)
4224 signal0<T_return, nil>::operator=(src);
4228 signal& operator=(signal&& src)
4230 signal0<T_return, nil>::operator=(std::move(src));
4236 * This specialization allow use of the sigc::signal<R(Args...)> syntax,
4238 template <class T_return>
4239 class signal<T_return()>
4240 : public signal0<T_return, nil>
4244 /** Convenience wrapper for the numbered sigc::signal0 template.
4245 * Like sigc::signal but the additional template parameter @e T_accumulator
4246 * defines the accumulator type that should be used.
4248 template <class T_accumulator>
4250 : public signal0<T_return, T_accumulator>
4254 accumulated(const accumulated& src)
4255 : signal0<T_return, T_accumulator>(src) {}
4260 signal(const signal& src)
4261 : signal0<T_return, nil>(src) {}
4263 signal(signal&& src)
4264 : signal0<T_return, nil>(std::move(src)) {}
4266 signal& operator=(const signal& src)
4268 signal0<T_return, nil>::operator=(src);
4272 signal& operator=(signal&& src)
4274 signal0<T_return, nil>::operator=(std::move(src));
4281 /** Convenience wrapper for the numbered sigc::signal1 template.
4282 * See the base class for useful methods.
4283 * This is the template specialization of the unnumbered sigc::signal
4284 * template for 1 argument(s).
4286 * @deprecated Please use the syntax similar to that used by std::function<>:
4288 * sigc::slot<void(bool, int)> some_slot;
4291 template <class T_return, class T_arg1>
4292 class signal <T_return, T_arg1, nil, nil, nil, nil, nil, nil>
4293 : public signal1<T_return, T_arg1, nil>
4297 /** Convenience wrapper for the numbered sigc::signal1 template.
4298 * Like sigc::signal but the additional template parameter @e T_accumulator
4299 * defines the accumulator type that should be used.
4301 template <class T_accumulator>
4303 : public signal1<T_return, T_arg1, T_accumulator>
4307 accumulated(const accumulated& src)
4308 : signal1<T_return, T_arg1, T_accumulator>(src) {}
4313 signal(const signal& src)
4314 : signal1<T_return, T_arg1, nil>(src) {}
4316 signal(signal&& src)
4317 : signal1<T_return, T_arg1, nil>(std::move(src)) {}
4319 signal& operator=(const signal& src)
4321 signal1<T_return, T_arg1, nil>::operator=(src);
4325 signal& operator=(signal&& src)
4327 signal1<T_return, T_arg1, nil>::operator=(std::move(src));
4333 * This specialization allow use of the sigc::signal<R(Args...)> syntax,
4335 template <class T_return, class T_arg1>
4336 class signal<T_return(T_arg1)>
4337 : public signal1<T_return, T_arg1, nil>
4341 /** Convenience wrapper for the numbered sigc::signal1 template.
4342 * Like sigc::signal but the additional template parameter @e T_accumulator
4343 * defines the accumulator type that should be used.
4345 template <class T_accumulator>
4347 : public signal1<T_return, T_arg1, T_accumulator>
4351 accumulated(const accumulated& src)
4352 : signal1<T_return, T_arg1, T_accumulator>(src) {}
4357 signal(const signal& src)
4358 : signal1<T_return, T_arg1, nil>(src) {}
4360 signal(signal&& src)
4361 : signal1<T_return, T_arg1, nil>(std::move(src)) {}
4363 signal& operator=(const signal& src)
4365 signal1<T_return, T_arg1, nil>::operator=(src);
4369 signal& operator=(signal&& src)
4371 signal1<T_return, T_arg1, nil>::operator=(std::move(src));
4378 /** Convenience wrapper for the numbered sigc::signal2 template.
4379 * See the base class for useful methods.
4380 * This is the template specialization of the unnumbered sigc::signal
4381 * template for 2 argument(s).
4383 * @deprecated Please use the syntax similar to that used by std::function<>:
4385 * sigc::slot<void(bool, int)> some_slot;
4388 template <class T_return, class T_arg1, class T_arg2>
4389 class signal <T_return, T_arg1, T_arg2, nil, nil, nil, nil, nil>
4390 : public signal2<T_return, T_arg1, T_arg2, nil>
4394 /** Convenience wrapper for the numbered sigc::signal2 template.
4395 * Like sigc::signal but the additional template parameter @e T_accumulator
4396 * defines the accumulator type that should be used.
4398 template <class T_accumulator>
4400 : public signal2<T_return, T_arg1, T_arg2, T_accumulator>
4404 accumulated(const accumulated& src)
4405 : signal2<T_return, T_arg1, T_arg2, T_accumulator>(src) {}
4410 signal(const signal& src)
4411 : signal2<T_return, T_arg1, T_arg2, nil>(src) {}
4413 signal(signal&& src)
4414 : signal2<T_return, T_arg1, T_arg2, nil>(std::move(src)) {}
4416 signal& operator=(const signal& src)
4418 signal2<T_return, T_arg1, T_arg2, nil>::operator=(src);
4422 signal& operator=(signal&& src)
4424 signal2<T_return, T_arg1, T_arg2, nil>::operator=(std::move(src));
4430 * This specialization allow use of the sigc::signal<R(Args...)> syntax,
4432 template <class T_return, class T_arg1, class T_arg2>
4433 class signal<T_return(T_arg1, T_arg2)>
4434 : public signal2<T_return, T_arg1, T_arg2, nil>
4438 /** Convenience wrapper for the numbered sigc::signal2 template.
4439 * Like sigc::signal but the additional template parameter @e T_accumulator
4440 * defines the accumulator type that should be used.
4442 template <class T_accumulator>
4444 : public signal2<T_return, T_arg1, T_arg2, T_accumulator>
4448 accumulated(const accumulated& src)
4449 : signal2<T_return, T_arg1, T_arg2, T_accumulator>(src) {}
4454 signal(const signal& src)
4455 : signal2<T_return, T_arg1, T_arg2, nil>(src) {}
4457 signal(signal&& src)
4458 : signal2<T_return, T_arg1, T_arg2, nil>(std::move(src)) {}
4460 signal& operator=(const signal& src)
4462 signal2<T_return, T_arg1, T_arg2, nil>::operator=(src);
4466 signal& operator=(signal&& src)
4468 signal2<T_return, T_arg1, T_arg2, nil>::operator=(std::move(src));
4475 /** Convenience wrapper for the numbered sigc::signal3 template.
4476 * See the base class for useful methods.
4477 * This is the template specialization of the unnumbered sigc::signal
4478 * template for 3 argument(s).
4480 * @deprecated Please use the syntax similar to that used by std::function<>:
4482 * sigc::slot<void(bool, int)> some_slot;
4485 template <class T_return, class T_arg1, class T_arg2, class T_arg3>
4486 class signal <T_return, T_arg1, T_arg2, T_arg3, nil, nil, nil, nil>
4487 : public signal3<T_return, T_arg1, T_arg2, T_arg3, nil>
4491 /** Convenience wrapper for the numbered sigc::signal3 template.
4492 * Like sigc::signal but the additional template parameter @e T_accumulator
4493 * defines the accumulator type that should be used.
4495 template <class T_accumulator>
4497 : public signal3<T_return, T_arg1, T_arg2, T_arg3, T_accumulator>
4501 accumulated(const accumulated& src)
4502 : signal3<T_return, T_arg1, T_arg2, T_arg3, T_accumulator>(src) {}
4507 signal(const signal& src)
4508 : signal3<T_return, T_arg1, T_arg2, T_arg3, nil>(src) {}
4510 signal(signal&& src)
4511 : signal3<T_return, T_arg1, T_arg2, T_arg3, nil>(std::move(src)) {}
4513 signal& operator=(const signal& src)
4515 signal3<T_return, T_arg1, T_arg2, T_arg3, nil>::operator=(src);
4519 signal& operator=(signal&& src)
4521 signal3<T_return, T_arg1, T_arg2, T_arg3, nil>::operator=(std::move(src));
4527 * This specialization allow use of the sigc::signal<R(Args...)> syntax,
4529 template <class T_return, class T_arg1, class T_arg2, class T_arg3>
4530 class signal<T_return(T_arg1, T_arg2, T_arg3)>
4531 : public signal3<T_return, T_arg1, T_arg2, T_arg3, nil>
4535 /** Convenience wrapper for the numbered sigc::signal3 template.
4536 * Like sigc::signal but the additional template parameter @e T_accumulator
4537 * defines the accumulator type that should be used.
4539 template <class T_accumulator>
4541 : public signal3<T_return, T_arg1, T_arg2, T_arg3, T_accumulator>
4545 accumulated(const accumulated& src)
4546 : signal3<T_return, T_arg1, T_arg2, T_arg3, T_accumulator>(src) {}
4551 signal(const signal& src)
4552 : signal3<T_return, T_arg1, T_arg2, T_arg3, nil>(src) {}
4554 signal(signal&& src)
4555 : signal3<T_return, T_arg1, T_arg2, T_arg3, nil>(std::move(src)) {}
4557 signal& operator=(const signal& src)
4559 signal3<T_return, T_arg1, T_arg2, T_arg3, nil>::operator=(src);
4563 signal& operator=(signal&& src)
4565 signal3<T_return, T_arg1, T_arg2, T_arg3, nil>::operator=(std::move(src));
4572 /** Convenience wrapper for the numbered sigc::signal4 template.
4573 * See the base class for useful methods.
4574 * This is the template specialization of the unnumbered sigc::signal
4575 * template for 4 argument(s).
4577 * @deprecated Please use the syntax similar to that used by std::function<>:
4579 * sigc::slot<void(bool, int)> some_slot;
4582 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4>
4583 class signal <T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil, nil, nil>
4584 : public signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>
4588 /** Convenience wrapper for the numbered sigc::signal4 template.
4589 * Like sigc::signal but the additional template parameter @e T_accumulator
4590 * defines the accumulator type that should be used.
4592 template <class T_accumulator>
4594 : public signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_accumulator>
4598 accumulated(const accumulated& src)
4599 : signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_accumulator>(src) {}
4604 signal(const signal& src)
4605 : signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>(src) {}
4607 signal(signal&& src)
4608 : signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>(std::move(src)) {}
4610 signal& operator=(const signal& src)
4612 signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>::operator=(src);
4616 signal& operator=(signal&& src)
4618 signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>::operator=(std::move(src));
4624 * This specialization allow use of the sigc::signal<R(Args...)> syntax,
4626 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4>
4627 class signal<T_return(T_arg1, T_arg2, T_arg3, T_arg4)>
4628 : public signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>
4632 /** Convenience wrapper for the numbered sigc::signal4 template.
4633 * Like sigc::signal but the additional template parameter @e T_accumulator
4634 * defines the accumulator type that should be used.
4636 template <class T_accumulator>
4638 : public signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_accumulator>
4642 accumulated(const accumulated& src)
4643 : signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_accumulator>(src) {}
4648 signal(const signal& src)
4649 : signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>(src) {}
4651 signal(signal&& src)
4652 : signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>(std::move(src)) {}
4654 signal& operator=(const signal& src)
4656 signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>::operator=(src);
4660 signal& operator=(signal&& src)
4662 signal4<T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil>::operator=(std::move(src));
4669 /** Convenience wrapper for the numbered sigc::signal5 template.
4670 * See the base class for useful methods.
4671 * This is the template specialization of the unnumbered sigc::signal
4672 * template for 5 argument(s).
4674 * @deprecated Please use the syntax similar to that used by std::function<>:
4676 * sigc::slot<void(bool, int)> some_slot;
4679 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
4680 class signal <T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil, nil>
4681 : public signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>
4685 /** Convenience wrapper for the numbered sigc::signal5 template.
4686 * Like sigc::signal but the additional template parameter @e T_accumulator
4687 * defines the accumulator type that should be used.
4689 template <class T_accumulator>
4691 : public signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_accumulator>
4695 accumulated(const accumulated& src)
4696 : signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_accumulator>(src) {}
4701 signal(const signal& src)
4702 : signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>(src) {}
4704 signal(signal&& src)
4705 : signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>(std::move(src)) {}
4707 signal& operator=(const signal& src)
4709 signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>::operator=(src);
4713 signal& operator=(signal&& src)
4715 signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>::operator=(std::move(src));
4721 * This specialization allow use of the sigc::signal<R(Args...)> syntax,
4723 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5>
4724 class signal<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5)>
4725 : public signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>
4729 /** Convenience wrapper for the numbered sigc::signal5 template.
4730 * Like sigc::signal but the additional template parameter @e T_accumulator
4731 * defines the accumulator type that should be used.
4733 template <class T_accumulator>
4735 : public signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_accumulator>
4739 accumulated(const accumulated& src)
4740 : signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_accumulator>(src) {}
4745 signal(const signal& src)
4746 : signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>(src) {}
4748 signal(signal&& src)
4749 : signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>(std::move(src)) {}
4751 signal& operator=(const signal& src)
4753 signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>::operator=(src);
4757 signal& operator=(signal&& src)
4759 signal5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil>::operator=(std::move(src));
4766 /** Convenience wrapper for the numbered sigc::signal6 template.
4767 * See the base class for useful methods.
4768 * This is the template specialization of the unnumbered sigc::signal
4769 * template for 6 argument(s).
4771 * @deprecated Please use the syntax similar to that used by std::function<>:
4773 * sigc::slot<void(bool, int)> some_slot;
4776 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
4777 class signal <T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>
4778 : public signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>
4782 /** Convenience wrapper for the numbered sigc::signal6 template.
4783 * Like sigc::signal but the additional template parameter @e T_accumulator
4784 * defines the accumulator type that should be used.
4786 template <class T_accumulator>
4788 : public signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_accumulator>
4792 accumulated(const accumulated& src)
4793 : signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_accumulator>(src) {}
4798 signal(const signal& src)
4799 : signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>(src) {}
4801 signal(signal&& src)
4802 : signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>(std::move(src)) {}
4804 signal& operator=(const signal& src)
4806 signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>::operator=(src);
4810 signal& operator=(signal&& src)
4812 signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>::operator=(std::move(src));
4818 * This specialization allow use of the sigc::signal<R(Args...)> syntax,
4820 template <class T_return, class T_arg1, class T_arg2, class T_arg3, class T_arg4, class T_arg5, class T_arg6>
4821 class signal<T_return(T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6)>
4822 : public signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>
4826 /** Convenience wrapper for the numbered sigc::signal6 template.
4827 * Like sigc::signal but the additional template parameter @e T_accumulator
4828 * defines the accumulator type that should be used.
4830 template <class T_accumulator>
4832 : public signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_accumulator>
4836 accumulated(const accumulated& src)
4837 : signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_accumulator>(src) {}
4842 signal(const signal& src)
4843 : signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>(src) {}
4845 signal(signal&& src)
4846 : signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>(std::move(src)) {}
4848 signal& operator=(const signal& src)
4850 signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>::operator=(src);
4854 signal& operator=(signal&& src)
4856 signal6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil>::operator=(std::move(src));
4864 } /* namespace sigc */
4866 #ifdef SIGC_NIL_HAS_BEEN_PUSHED
4867 #undef SIGC_NIL_HAS_BEEN_PUSHED
4868 #pragma pop_macro("nil")
4871 #endif /* _SIGC_SIGNAL_H_ */