Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sigslot.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file sigslot.h
1 // sigslot.h: Signal/Slot classes
2 //
3 // Written by Sarah Thompson (sarah@telergy.com) 2002.
4 //
5 // License: Public domain. You are free to use this code however you like, with the proviso that
6 // the author takes on no responsibility or liability for any use.
7 //
8 // QUICK DOCUMENTATION
9 //
10 // (see also the full documentation at http://sigslot.sourceforge.net/)
11 //
12 // #define switches
13 // SIGSLOT_PURE_ISO - Define this to force ISO C++ compliance. This also disables
14 // all of the thread safety support on platforms where it is
15 // available.
16 //
17 // SIGSLOT_USE_POSIX_THREADS - Force use of Posix threads when using a C++ compiler other than
18 // gcc on a platform that supports Posix threads. (When using gcc,
19 // this is the default - use SIGSLOT_PURE_ISO to disable this if
20 // necessary)
21 //
22 // SIGSLOT_DEFAULT_MT_POLICY - Where thread support is enabled, this defaults to multi_threaded_global.
23 // Otherwise, the default is single_threaded. #define this yourself to
24 // override the default. In pure ISO mode, anything other than
25 // single_threaded will cause a compiler error.
26 //
27 // PLATFORM NOTES
28 //
29 // Win32 - On Win32, the WIN32 symbol must be #defined. Most mainstream
30 // compilers do this by default, but you may need to define it
31 // yourself if your build environment is less standard. This causes
32 // the Win32 thread support to be compiled in and used automatically.
33 //
34 // Unix/Linux/BSD, etc. - If you're using gcc, it is assumed that you have Posix threads
35 // available, so they are used automatically. You can override this
36 // (as under Windows) with the SIGSLOT_PURE_ISO switch. If you're using
37 // something other than gcc but still want to use Posix threads, you
38 // need to #define SIGSLOT_USE_POSIX_THREADS.
39 //
40 // ISO C++ - If none of the supported platforms are detected, or if
41 // SIGSLOT_PURE_ISO is defined, all multithreading support is turned off,
42 // along with any code that might cause a pure ISO C++ environment to
43 // complain. Before you ask, gcc -ansi -pedantic won't compile this
44 // library, but gcc -ansi is fine. Pedantic mode seems to throw a lot of
45 // errors that aren't really there. If you feel like investigating this,
46 // please contact the author.
47 //
48 //
49 // THREADING MODES
50 //
51 // single_threaded - Your program is assumed to be single threaded from the point of view
52 // of signal/slot usage (i.e. all objects using signals and slots are
53 // created and destroyed from a single thread). Behaviour if objects are
54 // destroyed concurrently is undefined (i.e. you'll get the occasional
55 // segmentation fault/memory exception).
56 //
57 // multi_threaded_global - Your program is assumed to be multi threaded. Objects using signals and
58 // slots can be safely created and destroyed from any thread, even when
59 // connections exist. In multi_threaded_global mode, this is achieved by a
60 // single global mutex (actually a critical section on Windows because they
61 // are faster). This option uses less OS resources, but results in more
62 // opportunities for contention, possibly resulting in more context switches
63 // than are strictly necessary.
64 //
65 // multi_threaded_local - Behaviour in this mode is essentially the same as multi_threaded_global,
66 // except that each signal, and each object that inherits has_slots, all
67 // have their own mutex/critical section. In practice, this means that
68 // mutex collisions (and hence context switches) only happen if they are
69 // absolutely essential. However, on some platforms, creating a lot of
70 // mutexes can slow down the whole OS, so use this option with care.
71 //
72 // USING THE LIBRARY
73 //
74 // See the full documentation at http://sigslot.sourceforge.net/
75 //
76 //
77 
78 #ifndef SIGSLOT_H__
79 #define SIGSLOT_H__
80 
81 #include <set>
82 #include <list>
83 
84 #if defined(SIGSLOT_PURE_ISO) || (!defined(WIN32) && !defined(__GNUG__) && !defined(SIGSLOT_USE_POSIX_THREADS))
85 # define _SIGSLOT_SINGLE_THREADED
86 #elif defined(WIN32)
87 # define _SIGSLOT_HAS_WIN32_THREADS
88 # include <windows.h>
89 #elif defined(__GNUG__) || defined(SIGSLOT_USE_POSIX_THREADS)
90 # define _SIGSLOT_HAS_POSIX_THREADS
91 # include <pthread.h>
92 #else
93 # define _SIGSLOT_SINGLE_THREADED
94 #endif
95 
96 #ifndef SIGSLOT_DEFAULT_MT_POLICY
97 # ifdef _SIGSLOT_SINGLE_THREADED
98 # define SIGSLOT_DEFAULT_MT_POLICY single_threaded
99 # else
100 # define SIGSLOT_DEFAULT_MT_POLICY multi_threaded_local
101 # endif
102 #endif
103 
104 
105 namespace sigslot {
106 
108  {
109  public:
111  {
112  ;
113  }
114 
116  {
117  ;
118  }
119 
120  void lock()
121  {
122  ;
123  }
124 
125  void unlock()
126  {
127  ;
128  }
129  };
130 
131 #ifdef _SIGSLOT_HAS_WIN32_THREADS
132  // The multi threading policies only get compiled in if they are enabled.
133  class multi_threaded_global
134  {
135  public:
136  multi_threaded_global()
137  {
138  static bool isinitialised = false;
139 
140  if(!isinitialised)
141  {
142  InitializeCriticalSection(get_critsec());
143  isinitialised = true;
144  }
145  }
146 
147  multi_threaded_global(const multi_threaded_global&)
148  {
149  ;
150  }
151 
152  virtual ~multi_threaded_global()
153  {
154  ;
155  }
156 
157  void lock()
158  {
159  EnterCriticalSection(get_critsec());
160  }
161 
162  void unlock()
163  {
164  LeaveCriticalSection(get_critsec());
165  }
166 
167  private:
168  CRITICAL_SECTION* get_critsec()
169  {
170  static CRITICAL_SECTION g_critsec;
171  return &g_critsec;
172  }
173  };
174 
176  {
177  public:
179  {
180  InitializeCriticalSection(&m_critsec);
181  }
182 
184  {
185  InitializeCriticalSection(&m_critsec);
186  }
187 
188  virtual ~multi_threaded_local()
189  {
190  DeleteCriticalSection(&m_critsec);
191  }
192 
193  void lock()
194  {
195  EnterCriticalSection(&m_critsec);
196  }
197 
198  void unlock()
199  {
200  LeaveCriticalSection(&m_critsec);
201  }
202 
203  private:
204  CRITICAL_SECTION m_critsec;
205  };
206 #endif // _SIGSLOT_HAS_WIN32_THREADS
207 
208 #ifdef _SIGSLOT_HAS_POSIX_THREADS
209  // The multi threading policies only get compiled in if they are enabled.
210  class multi_threaded_global
211  {
212  public:
213  multi_threaded_global()
214  {
215  pthread_mutex_init(get_mutex(), NULL);
216  }
217 
218  multi_threaded_global(const multi_threaded_global&)
219  {
220  ;
221  }
222 
223  virtual ~multi_threaded_global()
224  {
225  ;
226  }
227 
228  void lock()
229  {
230  pthread_mutex_lock(get_mutex());
231  }
232 
233  void unlock()
234  {
235  pthread_mutex_unlock(get_mutex());
236  }
237 
238  private:
239  pthread_mutex_t* get_mutex()
240  {
241  static pthread_mutex_t g_mutex;
242  return &g_mutex;
243  }
244  };
245 
247  {
248  public:
250  {
251  pthread_mutex_init(&m_mutex, NULL);
252  }
253 
255  {
256  pthread_mutex_init(&m_mutex, NULL);
257  }
258 
259  virtual ~multi_threaded_local()
260  {
261  pthread_mutex_destroy(&m_mutex);
262  }
263 
264  void lock()
265  {
266  pthread_mutex_lock(&m_mutex);
267  }
268 
269  void unlock()
270  {
271  pthread_mutex_unlock(&m_mutex);
272  }
273 
274  private:
275  pthread_mutex_t m_mutex;
276  };
277 #endif // _SIGSLOT_HAS_POSIX_THREADS
278 
279  template<class mt_policy>
281  {
282  public:
283  mt_policy *m_mutex;
284 
285  lock_block(mt_policy *mtx)
286  : m_mutex(mtx)
287  {
288  m_mutex->lock();
289  }
290 
292  {
293  m_mutex->unlock();
294  }
295  };
296 
297  template<class mt_policy>
298  class has_slots;
299 
300  template<class mt_policy>
302  {
303  public:
304  virtual ~_connection_base0() { }
305  virtual has_slots<mt_policy>* getdest() const = 0;
306  virtual void emit() = 0;
307  virtual _connection_base0* clone() = 0;
308  virtual _connection_base0* duplicate(has_slots<mt_policy>* pnewdest) = 0;
309  };
310 
311  template<class arg1_type, class mt_policy>
313  {
314  public:
315  virtual ~_connection_base1() { }
316  virtual has_slots<mt_policy>* getdest() const = 0;
317  virtual void emit(arg1_type) = 0;
320  };
321 
322  template<class arg1_type, class arg2_type, class mt_policy>
324  {
325  public:
326  virtual ~_connection_base2() { }
327  virtual has_slots<mt_policy>* getdest() const = 0;
328  virtual void emit(arg1_type, arg2_type) = 0;
331  };
332 
333  template<class arg1_type, class arg2_type, class arg3_type, class mt_policy>
335  {
336  public:
337  virtual ~_connection_base3() { }
338  virtual has_slots<mt_policy>* getdest() const = 0;
339  virtual void emit(arg1_type, arg2_type, arg3_type) = 0;
342  };
343 
344  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type, class mt_policy>
346  {
347  public:
348  virtual ~_connection_base4() { }
349  virtual has_slots<mt_policy>* getdest() const = 0;
350  virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type) = 0;
353  };
354 
355  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
356  class arg5_type, class mt_policy>
358  {
359  public:
360  virtual ~_connection_base5() { }
361  virtual has_slots<mt_policy>* getdest() const = 0;
362  virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type,
363  arg5_type) = 0;
364  virtual _connection_base5<arg1_type, arg2_type, arg3_type, arg4_type,
365  arg5_type, mt_policy>* clone() = 0;
366  virtual _connection_base5<arg1_type, arg2_type, arg3_type, arg4_type,
367  arg5_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) = 0;
368  };
369 
370  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
371  class arg5_type, class arg6_type, class mt_policy>
373  {
374  public:
375  virtual ~_connection_base6() { }
376  virtual has_slots<mt_policy>* getdest() const = 0;
377  virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type,
378  arg6_type) = 0;
379  virtual _connection_base6<arg1_type, arg2_type, arg3_type, arg4_type,
380  arg5_type, arg6_type, mt_policy>* clone() = 0;
381  virtual _connection_base6<arg1_type, arg2_type, arg3_type, arg4_type,
382  arg5_type, arg6_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) = 0;
383  };
384 
385  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
386  class arg5_type, class arg6_type, class arg7_type, class mt_policy>
388  {
389  public:
390  virtual ~_connection_base7() { }
391  virtual has_slots<mt_policy>* getdest() const = 0;
392  virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type,
393  arg6_type, arg7_type) = 0;
394  virtual _connection_base7<arg1_type, arg2_type, arg3_type, arg4_type,
395  arg5_type, arg6_type, arg7_type, mt_policy>* clone() = 0;
396  virtual _connection_base7<arg1_type, arg2_type, arg3_type, arg4_type,
397  arg5_type, arg6_type, arg7_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) = 0;
398  };
399 
400  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
401  class arg5_type, class arg6_type, class arg7_type, class arg8_type, class mt_policy>
403  {
404  public:
405  virtual ~_connection_base8() { }
406  virtual has_slots<mt_policy>* getdest() const = 0;
407  virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type,
408  arg6_type, arg7_type, arg8_type) = 0;
409  virtual _connection_base8<arg1_type, arg2_type, arg3_type, arg4_type,
410  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>* clone() = 0;
411  virtual _connection_base8<arg1_type, arg2_type, arg3_type, arg4_type,
412  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) = 0;
413  };
414 
415  template<class mt_policy>
416  class _signal_base : public mt_policy
417  {
418  public:
419  virtual void slot_disconnect(has_slots<mt_policy>* pslot) = 0;
420  virtual void slot_duplicate(const has_slots<mt_policy>* poldslot, has_slots<mt_policy>* pnewslot) = 0;
421  };
422 
423  template<class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
424  class has_slots : public mt_policy
425  {
426  private:
427  typedef typename std::set<_signal_base<mt_policy> *> sender_set;
428  typedef typename sender_set::const_iterator const_iterator;
429 
430  public:
432  {
433  ;
434  }
435 
436  has_slots(const has_slots& hs)
437  : mt_policy(hs)
438  {
439  lock_block<mt_policy> lock(this);
440  const_iterator it = hs.m_senders.begin();
441  const_iterator itEnd = hs.m_senders.end();
442 
443  while(it != itEnd)
444  {
445  (*it)->slot_duplicate(&hs, this);
446  m_senders.insert(*it);
447  ++it;
448  }
449  }
450 
452  {
453  lock_block<mt_policy> lock(this);
454  m_senders.insert(sender);
455  }
456 
458  {
459  lock_block<mt_policy> lock(this);
460  m_senders.erase(sender);
461  }
462 
463  virtual ~has_slots()
464  {
465  disconnect_all();
466  }
467 
469  {
470  lock_block<mt_policy> lock(this);
471  const_iterator it = m_senders.begin();
472  const_iterator itEnd = m_senders.end();
473 
474  while(it != itEnd)
475  {
476  (*it)->slot_disconnect(this);
477  ++it;
478  }
479 
480  m_senders.erase(m_senders.begin(), m_senders.end());
481  }
482 
483  private:
485  };
486 
487  template<class mt_policy>
488  class _signal_base0 : public _signal_base<mt_policy>
489  {
490  public:
491  typedef typename std::list<_connection_base0<mt_policy> *> connections_list;
492  typedef typename connections_list::const_iterator const_iterator;
493  typedef typename connections_list::iterator iterator;
494 
496  {
497  ;
498  }
499 
501  : _signal_base<mt_policy>(s)
502  {
503  lock_block<mt_policy> lock(this);
504  const_iterator it = s.m_connected_slots.begin();
505  const_iterator itEnd = s.m_connected_slots.end();
506 
507  while(it != itEnd)
508  {
509  (*it)->getdest()->signal_connect(this);
510  m_connected_slots.push_back((*it)->clone());
511 
512  ++it;
513  }
514  }
515 
517  {
518  disconnect_all();
519  }
520 
522  {
523  lock_block<mt_policy> lock(this);
525  const_iterator itEnd = m_connected_slots.end();
526 
527  while(it != itEnd)
528  {
529  (*it)->getdest()->signal_disconnect(this);
530  delete *it;
531 
532  ++it;
533  }
534 
536  }
537 
539  {
540  lock_block<mt_policy> lock(this);
541  iterator it = m_connected_slots.begin();
542  iterator itEnd = m_connected_slots.end();
543 
544  while(it != itEnd)
545  {
546  if((*it)->getdest() == pclass)
547  {
548  delete *it;
549  m_connected_slots.erase(it);
550  pclass->signal_disconnect(this);
551  return;
552  }
553 
554  ++it;
555  }
556  }
557 
559  {
560  lock_block<mt_policy> lock(this);
561  iterator it = m_connected_slots.begin();
562  iterator itEnd = m_connected_slots.end();
563 
564  while(it != itEnd)
565  {
566  iterator itNext = it;
567  ++itNext;
568 
569  if((*it)->getdest() == pslot)
570  {
571  delete *it;
572  m_connected_slots.erase(it);
573  }
574 
575  it = itNext;
576  }
577  }
578 
579  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
580  {
581  lock_block<mt_policy> lock(this);
582  iterator it = m_connected_slots.begin();
583  iterator itEnd = m_connected_slots.end();
584 
585  while(it != itEnd)
586  {
587  if((*it)->getdest() == oldtarget)
588  {
589  m_connected_slots.push_back((*it)->duplicate(newtarget));
590  }
591 
592  ++it;
593  }
594  }
595 
596  protected:
598  };
599 
600  template<class arg1_type, class mt_policy>
601  class _signal_base1 : public _signal_base<mt_policy>
602  {
603  public:
604  typedef typename std::list<_connection_base1<arg1_type, mt_policy> *> connections_list;
605  typedef typename connections_list::const_iterator const_iterator;
606  typedef typename connections_list::iterator iterator;
607 
609  {
610  ;
611  }
612 
614  : _signal_base<mt_policy>(s)
615  {
616  lock_block<mt_policy> lock(this);
617  const_iterator it = s.m_connected_slots.begin();
618  const_iterator itEnd = s.m_connected_slots.end();
619 
620  while(it != itEnd)
621  {
622  (*it)->getdest()->signal_connect(this);
623  m_connected_slots.push_back((*it)->clone());
624 
625  ++it;
626  }
627  }
628 
629  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
630  {
631  lock_block<mt_policy> lock(this);
632  iterator it = m_connected_slots.begin();
633  iterator itEnd = m_connected_slots.end();
634 
635  while(it != itEnd)
636  {
637  if((*it)->getdest() == oldtarget)
638  {
639  m_connected_slots.push_back((*it)->duplicate(newtarget));
640  }
641 
642  ++it;
643  }
644  }
645 
647  {
648  disconnect_all();
649  }
650 
652  {
653  lock_block<mt_policy> lock(this);
655  const_iterator itEnd = m_connected_slots.end();
656 
657  while(it != itEnd)
658  {
659  (*it)->getdest()->signal_disconnect(this);
660  delete *it;
661 
662  ++it;
663  }
664 
666  }
667 
669  {
670  lock_block<mt_policy> lock(this);
671  iterator it = m_connected_slots.begin();
672  iterator itEnd = m_connected_slots.end();
673 
674  while(it != itEnd)
675  {
676  if((*it)->getdest() == pclass)
677  {
678  delete *it;
679  m_connected_slots.erase(it);
680  pclass->signal_disconnect(this);
681  return;
682  }
683 
684  ++it;
685  }
686  }
687 
689  {
690  lock_block<mt_policy> lock(this);
691  iterator it = m_connected_slots.begin();
692  iterator itEnd = m_connected_slots.end();
693 
694  while(it != itEnd)
695  {
696  iterator itNext = it;
697  ++itNext;
698 
699  if((*it)->getdest() == pslot)
700  {
701  delete *it;
702  m_connected_slots.erase(it);
703  }
704 
705  it = itNext;
706  }
707  }
708 
709 
710  protected:
712  };
713 
714  template<class arg1_type, class arg2_type, class mt_policy>
715  class _signal_base2 : public _signal_base<mt_policy>
716  {
717  public:
718  typedef typename std::list<_connection_base2<arg1_type, arg2_type, mt_policy> *>
720  typedef typename connections_list::const_iterator const_iterator;
721  typedef typename connections_list::iterator iterator;
722 
724  {
725  ;
726  }
727 
729  : _signal_base<mt_policy>(s)
730  {
731  lock_block<mt_policy> lock(this);
732  const_iterator it = s.m_connected_slots.begin();
733  const_iterator itEnd = s.m_connected_slots.end();
734 
735  while(it != itEnd)
736  {
737  (*it)->getdest()->signal_connect(this);
738  m_connected_slots.push_back((*it)->clone());
739 
740  ++it;
741  }
742  }
743 
744  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
745  {
746  lock_block<mt_policy> lock(this);
747  iterator it = m_connected_slots.begin();
748  iterator itEnd = m_connected_slots.end();
749 
750  while(it != itEnd)
751  {
752  if((*it)->getdest() == oldtarget)
753  {
754  m_connected_slots.push_back((*it)->duplicate(newtarget));
755  }
756 
757  ++it;
758  }
759  }
760 
762  {
763  disconnect_all();
764  }
765 
767  {
768  lock_block<mt_policy> lock(this);
770  const_iterator itEnd = m_connected_slots.end();
771 
772  while(it != itEnd)
773  {
774  (*it)->getdest()->signal_disconnect(this);
775  delete *it;
776 
777  ++it;
778  }
779 
781  }
782 
784  {
785  lock_block<mt_policy> lock(this);
786  iterator it = m_connected_slots.begin();
787  iterator itEnd = m_connected_slots.end();
788 
789  while(it != itEnd)
790  {
791  if((*it)->getdest() == pclass)
792  {
793  delete *it;
794  m_connected_slots.erase(it);
795  pclass->signal_disconnect(this);
796  return;
797  }
798 
799  ++it;
800  }
801  }
802 
804  {
805  lock_block<mt_policy> lock(this);
806  iterator it = m_connected_slots.begin();
807  iterator itEnd = m_connected_slots.end();
808 
809  while(it != itEnd)
810  {
811  iterator itNext = it;
812  ++itNext;
813 
814  if((*it)->getdest() == pslot)
815  {
816  delete *it;
817  m_connected_slots.erase(it);
818  }
819 
820  it = itNext;
821  }
822  }
823 
824  protected:
826  };
827 
828  template<class arg1_type, class arg2_type, class arg3_type, class mt_policy>
829  class _signal_base3 : public _signal_base<mt_policy>
830  {
831  public:
832  typedef std::list<_connection_base3<arg1_type, arg2_type, arg3_type, mt_policy> *>
834 
835  typedef typename connections_list::const_iterator const_iterator;
836  typedef typename connections_list::iterator iterator;
838  {
839  ;
840  }
841 
843  : _signal_base<mt_policy>(s)
844  {
845  lock_block<mt_policy> lock(this);
846  const_iterator it = s.m_connected_slots.begin();
847  const_iterator itEnd = s.m_connected_slots.end();
848 
849  while(it != itEnd)
850  {
851  (*it)->getdest()->signal_connect(this);
852  m_connected_slots.push_back((*it)->clone());
853 
854  ++it;
855  }
856  }
857 
858  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
859  {
860  lock_block<mt_policy> lock(this);
861  iterator it = m_connected_slots.begin();
862  iterator itEnd = m_connected_slots.end();
863 
864  while(it != itEnd)
865  {
866  if((*it)->getdest() == oldtarget)
867  {
868  m_connected_slots.push_back((*it)->duplicate(newtarget));
869  }
870 
871  ++it;
872  }
873  }
874 
876  {
877  disconnect_all();
878  }
879 
881  {
882  lock_block<mt_policy> lock(this);
884  const_iterator itEnd = m_connected_slots.end();
885 
886  while(it != itEnd)
887  {
888  (*it)->getdest()->signal_disconnect(this);
889  delete *it;
890 
891  ++it;
892  }
893 
895  }
896 
898  {
899  lock_block<mt_policy> lock(this);
900  iterator it = m_connected_slots.begin();
901  iterator itEnd = m_connected_slots.end();
902 
903  while(it != itEnd)
904  {
905  if((*it)->getdest() == pclass)
906  {
907  delete *it;
908  m_connected_slots.erase(it);
909  pclass->signal_disconnect(this);
910  return;
911  }
912 
913  ++it;
914  }
915  }
916 
918  {
919  lock_block<mt_policy> lock(this);
920  iterator it = m_connected_slots.begin();
921  iterator itEnd = m_connected_slots.end();
922 
923  while(it != itEnd)
924  {
925  iterator itNext = it;
926  ++itNext;
927 
928  if((*it)->getdest() == pslot)
929  {
930  delete *it;
931  m_connected_slots.erase(it);
932  }
933 
934  it = itNext;
935  }
936  }
937 
938  protected:
940  };
941 
942  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type, class mt_policy>
943  class _signal_base4 : public _signal_base<mt_policy>
944  {
945  public:
946  typedef std::list<_connection_base4<arg1_type, arg2_type, arg3_type,
947  arg4_type, mt_policy> *> connections_list;
948  typedef typename connections_list::const_iterator const_iterator;
949  typedef typename connections_list::iterator iterator;
950 
952  {
953  ;
954  }
955 
957  : _signal_base<mt_policy>(s)
958  {
959  lock_block<mt_policy> lock(this);
960  const_iterator it = s.m_connected_slots.begin();
961  const_iterator itEnd = s.m_connected_slots.end();
962 
963  while(it != itEnd)
964  {
965  (*it)->getdest()->signal_connect(this);
966  m_connected_slots.push_back((*it)->clone());
967 
968  ++it;
969  }
970  }
971 
972  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
973  {
974  lock_block<mt_policy> lock(this);
975  iterator it = m_connected_slots.begin();
976  iterator itEnd = m_connected_slots.end();
977 
978  while(it != itEnd)
979  {
980  if((*it)->getdest() == oldtarget)
981  {
982  m_connected_slots.push_back((*it)->duplicate(newtarget));
983  }
984 
985  ++it;
986  }
987  }
988 
990  {
991  disconnect_all();
992  }
993 
995  {
996  lock_block<mt_policy> lock(this);
998  const_iterator itEnd = m_connected_slots.end();
999 
1000  while(it != itEnd)
1001  {
1002  (*it)->getdest()->signal_disconnect(this);
1003  delete *it;
1004 
1005  ++it;
1006  }
1007 
1009  }
1010 
1012  {
1013  lock_block<mt_policy> lock(this);
1014  iterator it = m_connected_slots.begin();
1015  iterator itEnd = m_connected_slots.end();
1016 
1017  while(it != itEnd)
1018  {
1019  if((*it)->getdest() == pclass)
1020  {
1021  delete *it;
1022  this->m_connected_slots.erase(it);
1023  pclass->signal_disconnect(this);
1024  return;
1025  }
1026 
1027  ++it;
1028  }
1029  }
1030 
1032  {
1033  lock_block<mt_policy> lock(this);
1034  iterator it = m_connected_slots.begin();
1035  iterator itEnd = m_connected_slots.end();
1036 
1037  while(it != itEnd)
1038  {
1039  iterator itNext = it;
1040  ++itNext;
1041 
1042  if((*it)->getdest() == pslot)
1043  {
1044  delete *it;
1045  m_connected_slots.erase(it);
1046  }
1047 
1048  it = itNext;
1049  }
1050  }
1051 
1052  protected:
1054  };
1055 
1056  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
1057  class arg5_type, class mt_policy>
1058  class _signal_base5 : public _signal_base<mt_policy>
1059  {
1060  public:
1061  typedef std::list<_connection_base5<arg1_type, arg2_type, arg3_type,
1062  arg4_type, arg5_type, mt_policy> *> connections_list;
1063  typedef typename connections_list::const_iterator const_iterator;
1064  typedef typename connections_list::iterator iterator;
1065 
1067  {
1068  ;
1069  }
1070 
1071  _signal_base5(const _signal_base5<arg1_type, arg2_type, arg3_type, arg4_type,
1072  arg5_type, mt_policy>& s)
1073  : _signal_base<mt_policy>(s)
1074  {
1075  lock_block<mt_policy> lock(this);
1076  const_iterator it = s.m_connected_slots.begin();
1077  const_iterator itEnd = s.m_connected_slots.end();
1078 
1079  while(it != itEnd)
1080  {
1081  (*it)->getdest()->signal_connect(this);
1082  m_connected_slots.push_back((*it)->clone());
1083 
1084  ++it;
1085  }
1086  }
1087 
1088  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
1089  {
1090  lock_block<mt_policy> lock(this);
1091  iterator it = m_connected_slots.begin();
1092  iterator itEnd = m_connected_slots.end();
1093 
1094  while(it != itEnd)
1095  {
1096  if((*it)->getdest() == oldtarget)
1097  {
1098  m_connected_slots.push_back((*it)->duplicate(newtarget));
1099  }
1100 
1101  ++it;
1102  }
1103  }
1104 
1106  {
1107  disconnect_all();
1108  }
1109 
1111  {
1112  lock_block<mt_policy> lock(this);
1114  const_iterator itEnd = m_connected_slots.end();
1115 
1116  while(it != itEnd)
1117  {
1118  (*it)->getdest()->signal_disconnect(this);
1119  delete *it;
1120 
1121  ++it;
1122  }
1123 
1125  }
1126 
1128  {
1129  lock_block<mt_policy> lock(this);
1130  iterator it = m_connected_slots.begin();
1131  iterator itEnd = m_connected_slots.end();
1132 
1133  while(it != itEnd)
1134  {
1135  if((*it)->getdest() == pclass)
1136  {
1137  delete *it;
1138  m_connected_slots.erase(it);
1139  pclass->signal_disconnect(this);
1140  return;
1141  }
1142 
1143  ++it;
1144  }
1145  }
1146 
1148  {
1149  lock_block<mt_policy> lock(this);
1150  iterator it = m_connected_slots.begin();
1151  iterator itEnd = m_connected_slots.end();
1152 
1153  while(it != itEnd)
1154  {
1155  iterator itNext = it;
1156  ++itNext;
1157 
1158  if((*it)->getdest() == pslot)
1159  {
1160  delete *it;
1161  m_connected_slots.erase(it);
1162  }
1163 
1164  it = itNext;
1165  }
1166  }
1167 
1168  protected:
1170  };
1171 
1172  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
1173  class arg5_type, class arg6_type, class mt_policy>
1174  class _signal_base6 : public _signal_base<mt_policy>
1175  {
1176  public:
1177  typedef std::list<_connection_base6<arg1_type, arg2_type, arg3_type,
1178  arg4_type, arg5_type, arg6_type, mt_policy> *> connections_list;
1179  typedef typename connections_list::const_iterator const_iterator;
1180  typedef typename connections_list::iterator iterator;
1181 
1183  {
1184  ;
1185  }
1186 
1187  _signal_base6(const _signal_base6<arg1_type, arg2_type, arg3_type, arg4_type,
1188  arg5_type, arg6_type, mt_policy>& s)
1189  : _signal_base<mt_policy>(s)
1190  {
1191  lock_block<mt_policy> lock(this);
1192  const_iterator it = s.m_connected_slots.begin();
1193  const_iterator itEnd = s.m_connected_slots.end();
1194 
1195  while(it != itEnd)
1196  {
1197  (*it)->getdest()->signal_connect(this);
1198  m_connected_slots.push_back((*it)->clone());
1199 
1200  ++it;
1201  }
1202  }
1203 
1204  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
1205  {
1206  lock_block<mt_policy> lock(this);
1207  iterator it = m_connected_slots.begin();
1208  iterator itEnd = m_connected_slots.end();
1209 
1210  while(it != itEnd)
1211  {
1212  if((*it)->getdest() == oldtarget)
1213  {
1214  m_connected_slots.push_back((*it)->duplicate(newtarget));
1215  }
1216 
1217  ++it;
1218  }
1219  }
1220 
1222  {
1223  disconnect_all();
1224  }
1225 
1227  {
1228  lock_block<mt_policy> lock(this);
1230  const_iterator itEnd = m_connected_slots.end();
1231 
1232  while(it != itEnd)
1233  {
1234  (*it)->getdest()->signal_disconnect(this);
1235  delete *it;
1236 
1237  ++it;
1238  }
1239 
1241  }
1242 
1244  {
1245  lock_block<mt_policy> lock(this);
1246  iterator it = m_connected_slots.begin();
1247  iterator itEnd = m_connected_slots.end();
1248 
1249  while(it != itEnd)
1250  {
1251  if((*it)->getdest() == pclass)
1252  {
1253  delete *it;
1254  m_connected_slots.erase(it);
1255  pclass->signal_disconnect(this);
1256  return;
1257  }
1258 
1259  ++it;
1260  }
1261  }
1262 
1264  {
1265  lock_block<mt_policy> lock(this);
1266  iterator it = m_connected_slots.begin();
1267  iterator itEnd = m_connected_slots.end();
1268 
1269  while(it != itEnd)
1270  {
1271  iterator itNext = it;
1272  ++itNext;
1273 
1274  if((*it)->getdest() == pslot)
1275  {
1276  delete *it;
1277  m_connected_slots.erase(it);
1278  }
1279 
1280  it = itNext;
1281  }
1282  }
1283 
1284  protected:
1286  };
1287 
1288  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
1289  class arg5_type, class arg6_type, class arg7_type, class mt_policy>
1290  class _signal_base7 : public _signal_base<mt_policy>
1291  {
1292  public:
1293  typedef std::list<_connection_base7<arg1_type, arg2_type, arg3_type,
1294  arg4_type, arg5_type, arg6_type, arg7_type, mt_policy> *> connections_list;
1295  typedef typename connections_list::const_iterator const_iterator;
1296  typedef typename connections_list::iterator iterator;
1297 
1299  {
1300  ;
1301  }
1302 
1303  _signal_base7(const _signal_base7<arg1_type, arg2_type, arg3_type, arg4_type,
1304  arg5_type, arg6_type, arg7_type, mt_policy>& s)
1305  : _signal_base<mt_policy>(s)
1306  {
1307  lock_block<mt_policy> lock(this);
1308  const_iterator it = s.m_connected_slots.begin();
1309  const_iterator itEnd = s.m_connected_slots.end();
1310 
1311  while(it != itEnd)
1312  {
1313  (*it)->getdest()->signal_connect(this);
1314  m_connected_slots.push_back((*it)->clone());
1315 
1316  ++it;
1317  }
1318  }
1319 
1320  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
1321  {
1322  lock_block<mt_policy> lock(this);
1323  iterator it = m_connected_slots.begin();
1324  iterator itEnd = m_connected_slots.end();
1325 
1326  while(it != itEnd)
1327  {
1328  if((*it)->getdest() == oldtarget)
1329  {
1330  m_connected_slots.push_back((*it)->duplicate(newtarget));
1331  }
1332 
1333  ++it;
1334  }
1335  }
1336 
1338  {
1339  disconnect_all();
1340  }
1341 
1343  {
1344  lock_block<mt_policy> lock(this);
1346  const_iterator itEnd = m_connected_slots.end();
1347 
1348  while(it != itEnd)
1349  {
1350  (*it)->getdest()->signal_disconnect(this);
1351  delete *it;
1352 
1353  ++it;
1354  }
1355 
1357  }
1358 
1360  {
1361  lock_block<mt_policy> lock(this);
1362  iterator it = m_connected_slots.begin();
1363  iterator itEnd = m_connected_slots.end();
1364 
1365  while(it != itEnd)
1366  {
1367  if((*it)->getdest() == pclass)
1368  {
1369  delete *it;
1370  m_connected_slots.erase(it);
1371  pclass->signal_disconnect(this);
1372  return;
1373  }
1374 
1375  ++it;
1376  }
1377  }
1378 
1380  {
1381  lock_block<mt_policy> lock(this);
1382  iterator it = m_connected_slots.begin();
1383  iterator itEnd = m_connected_slots.end();
1384 
1385  while(it != itEnd)
1386  {
1387  iterator itNext = it;
1388  ++itNext;
1389 
1390  if((*it)->getdest() == pslot)
1391  {
1392  delete *it;
1393  m_connected_slots.erase(it);
1394  }
1395 
1396  it = itNext;
1397  }
1398  }
1399 
1400  protected:
1402  };
1403 
1404  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
1405  class arg5_type, class arg6_type, class arg7_type, class arg8_type, class mt_policy>
1406  class _signal_base8 : public _signal_base<mt_policy>
1407  {
1408  public:
1409  typedef std::list<_connection_base8<arg1_type, arg2_type, arg3_type,
1410  arg4_type, arg5_type, arg6_type, arg7_type, arg8_type, mt_policy> *>
1412  typedef typename connections_list::const_iterator const_iterator;
1413  typedef typename connections_list::iterator iterator;
1414 
1416  {
1417  ;
1418  }
1419 
1420  _signal_base8(const _signal_base8<arg1_type, arg2_type, arg3_type, arg4_type,
1421  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>& s)
1422  : _signal_base<mt_policy>(s)
1423  {
1424  lock_block<mt_policy> lock(this);
1425  const_iterator it = s.m_connected_slots.begin();
1426  const_iterator itEnd = s.m_connected_slots.end();
1427 
1428  while(it != itEnd)
1429  {
1430  (*it)->getdest()->signal_connect(this);
1431  m_connected_slots.push_back((*it)->clone());
1432 
1433  ++it;
1434  }
1435  }
1436 
1437  void slot_duplicate(const has_slots<mt_policy>* oldtarget, has_slots<mt_policy>* newtarget)
1438  {
1439  lock_block<mt_policy> lock(this);
1440  iterator it = m_connected_slots.begin();
1441  iterator itEnd = m_connected_slots.end();
1442 
1443  while(it != itEnd)
1444  {
1445  if((*it)->getdest() == oldtarget)
1446  {
1447  m_connected_slots.push_back((*it)->duplicate(newtarget));
1448  }
1449 
1450  ++it;
1451  }
1452  }
1453 
1455  {
1456  disconnect_all();
1457  }
1458 
1460  {
1461  lock_block<mt_policy> lock(this);
1463  const_iterator itEnd = m_connected_slots.end();
1464 
1465  while(it != itEnd)
1466  {
1467  (*it)->getdest()->signal_disconnect(this);
1468  delete *it;
1469 
1470  ++it;
1471  }
1472 
1474  }
1475 
1477  {
1478  lock_block<mt_policy> lock(this);
1479  iterator it = m_connected_slots.begin();
1480  iterator itEnd = m_connected_slots.end();
1481 
1482  while(it != itEnd)
1483  {
1484  if((*it)->getdest() == pclass)
1485  {
1486  delete *it;
1487  m_connected_slots.erase(it);
1488  pclass->signal_disconnect(this);
1489  return;
1490  }
1491 
1492  ++it;
1493  }
1494  }
1495 
1497  {
1498  lock_block<mt_policy> lock(this);
1499  iterator it = m_connected_slots.begin();
1500  iterator itEnd = m_connected_slots.end();
1501 
1502  while(it != itEnd)
1503  {
1504  iterator itNext = it;
1505  ++itNext;
1506 
1507  if((*it)->getdest() == pslot)
1508  {
1509  delete *it;
1510  m_connected_slots.erase(it);
1511  }
1512 
1513  it = itNext;
1514  }
1515  }
1516 
1517  protected:
1519  };
1520 
1521 
1522  template<class dest_type, class mt_policy>
1523  class _connection0 : public _connection_base0<mt_policy>
1524  {
1525  public:
1527  {
1528  this->pobject = NULL;
1529  this->pmemfun = NULL;
1530  }
1531 
1532  _connection0(dest_type* pobject, void (dest_type::*pmemfun)())
1533  {
1534  m_pobject = pobject;
1535  m_pmemfun = pmemfun;
1536  }
1537 
1539  {
1540  return new _connection0<dest_type, mt_policy>(*this);
1541  }
1542 
1544  {
1545  return new _connection0<dest_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
1546  }
1547 
1548  virtual void emit()
1549  {
1550  (m_pobject->*m_pmemfun)();
1551  }
1552 
1554  {
1555  return m_pobject;
1556  }
1557 
1558  private:
1559  dest_type* m_pobject;
1560  void (dest_type::* m_pmemfun)();
1561  };
1562 
1563  template<class dest_type, class arg1_type, class mt_policy>
1564  class _connection1 : public _connection_base1<arg1_type, mt_policy>
1565  {
1566  public:
1568  {
1569  this->pobject = NULL;
1570  this->pmemfun = NULL;
1571  }
1572 
1573  _connection1(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type))
1574  {
1575  m_pobject = pobject;
1576  m_pmemfun = pmemfun;
1577  }
1578 
1580  {
1582  }
1583 
1585  {
1586  return new _connection1<dest_type, arg1_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
1587  }
1588 
1589  virtual void emit(arg1_type a1)
1590  {
1591  (m_pobject->*m_pmemfun)(a1);
1592  }
1593 
1595  {
1596  return m_pobject;
1597  }
1598 
1599  private:
1600  dest_type* m_pobject;
1601  void (dest_type::* m_pmemfun)(arg1_type);
1602  };
1603 
1604  template<class dest_type, class arg1_type, class arg2_type, class mt_policy>
1605  class _connection2 : public _connection_base2<arg1_type, arg2_type, mt_policy>
1606  {
1607  public:
1609  {
1610  this->pobject = NULL;
1611  this->pmemfun = NULL;
1612  }
1613 
1614  _connection2(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type,
1615  arg2_type))
1616  {
1617  m_pobject = pobject;
1618  m_pmemfun = pmemfun;
1619  }
1620 
1622  {
1624  }
1625 
1627  {
1628  return new _connection2<dest_type, arg1_type, arg2_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
1629  }
1630 
1631  virtual void emit(arg1_type a1, arg2_type a2)
1632  {
1633  (m_pobject->*m_pmemfun)(a1, a2);
1634  }
1635 
1637  {
1638  return m_pobject;
1639  }
1640 
1641  private:
1642  dest_type* m_pobject;
1643  void (dest_type::* m_pmemfun)(arg1_type, arg2_type);
1644  };
1645 
1646  template<class dest_type, class arg1_type, class arg2_type, class arg3_type, class mt_policy>
1647  class _connection3 : public _connection_base3<arg1_type, arg2_type, arg3_type, mt_policy>
1648  {
1649  public:
1651  {
1652  this->pobject = NULL;
1653  this->pmemfun = NULL;
1654  }
1655 
1656  _connection3(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type,
1657  arg2_type, arg3_type))
1658  {
1659  m_pobject = pobject;
1660  m_pmemfun = pmemfun;
1661  }
1662 
1664  {
1666  }
1667 
1669  {
1671  }
1672 
1673  virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3)
1674  {
1675  (m_pobject->*m_pmemfun)(a1, a2, a3);
1676  }
1677 
1679  {
1680  return m_pobject;
1681  }
1682 
1683  private:
1684  dest_type* m_pobject;
1685  void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type);
1686  };
1687 
1688  template<class dest_type, class arg1_type, class arg2_type, class arg3_type,
1689  class arg4_type, class mt_policy>
1690  class _connection4 : public _connection_base4<arg1_type, arg2_type,
1691  arg3_type, arg4_type, mt_policy>
1692  {
1693  public:
1695  {
1696  this->pobject = NULL;
1697  this->pmemfun = NULL;
1698  }
1699 
1700  _connection4(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type,
1701  arg2_type, arg3_type, arg4_type))
1702  {
1703  m_pobject = pobject;
1704  m_pmemfun = pmemfun;
1705  }
1706 
1708  {
1710  }
1711 
1713  {
1715  }
1716 
1717  virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3,
1718  arg4_type a4)
1719  {
1720  (m_pobject->*m_pmemfun)(a1, a2, a3, a4);
1721  }
1722 
1724  {
1725  return m_pobject;
1726  }
1727 
1728  private:
1729  dest_type* m_pobject;
1730  void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type,
1731  arg4_type);
1732  };
1733 
1734  template<class dest_type, class arg1_type, class arg2_type, class arg3_type,
1735  class arg4_type, class arg5_type, class mt_policy>
1736  class _connection5 : public _connection_base5<arg1_type, arg2_type,
1737  arg3_type, arg4_type, arg5_type, mt_policy>
1738  {
1739  public:
1741  {
1742  this->pobject = NULL;
1743  this->pmemfun = NULL;
1744  }
1745 
1746  _connection5(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type,
1747  arg2_type, arg3_type, arg4_type, arg5_type))
1748  {
1749  m_pobject = pobject;
1750  m_pmemfun = pmemfun;
1751  }
1752 
1753  virtual _connection_base5<arg1_type, arg2_type, arg3_type, arg4_type,
1754  arg5_type, mt_policy>* clone()
1755  {
1756  return new _connection5<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
1757  arg5_type, mt_policy>(*this);
1758  }
1759 
1760  virtual _connection_base5<arg1_type, arg2_type, arg3_type, arg4_type,
1761  arg5_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
1762  {
1763  return new _connection5<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
1764  arg5_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
1765  }
1766 
1767  virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
1768  arg5_type a5)
1769  {
1770  (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5);
1771  }
1772 
1774  {
1775  return m_pobject;
1776  }
1777 
1778  private:
1779  dest_type* m_pobject;
1780  void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type,
1781  arg5_type);
1782  };
1783 
1784  template<class dest_type, class arg1_type, class arg2_type, class arg3_type,
1785  class arg4_type, class arg5_type, class arg6_type, class mt_policy>
1786  class _connection6 : public _connection_base6<arg1_type, arg2_type,
1787  arg3_type, arg4_type, arg5_type, arg6_type, mt_policy>
1788  {
1789  public:
1791  {
1792  this->pobject = NULL;
1793  this->pmemfun = NULL;
1794  }
1795 
1796  _connection6(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type,
1797  arg2_type, arg3_type, arg4_type, arg5_type, arg6_type))
1798  {
1799  m_pobject = pobject;
1800  m_pmemfun = pmemfun;
1801  }
1802 
1803  virtual _connection_base6<arg1_type, arg2_type, arg3_type, arg4_type,
1804  arg5_type, arg6_type, mt_policy>* clone()
1805  {
1806  return new _connection6<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
1807  arg5_type, arg6_type, mt_policy>(*this);
1808  }
1809 
1810  virtual _connection_base6<arg1_type, arg2_type, arg3_type, arg4_type,
1811  arg5_type, arg6_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
1812  {
1813  return new _connection6<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
1814  arg5_type, arg6_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
1815  }
1816 
1817  virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
1818  arg5_type a5, arg6_type a6)
1819  {
1820  (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6);
1821  }
1822 
1824  {
1825  return m_pobject;
1826  }
1827 
1828  private:
1829  dest_type* m_pobject;
1830  void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type,
1831  arg5_type, arg6_type);
1832  };
1833 
1834  template<class dest_type, class arg1_type, class arg2_type, class arg3_type,
1835  class arg4_type, class arg5_type, class arg6_type, class arg7_type, class mt_policy>
1836  class _connection7 : public _connection_base7<arg1_type, arg2_type,
1837  arg3_type, arg4_type, arg5_type, arg6_type, arg7_type, mt_policy>
1838  {
1839  public:
1841  {
1842  this->pobject = NULL;
1843  this->pmemfun = NULL;
1844  }
1845 
1846  _connection7(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type,
1847  arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type))
1848  {
1849  m_pobject = pobject;
1850  m_pmemfun = pmemfun;
1851  }
1852 
1853  virtual _connection_base7<arg1_type, arg2_type, arg3_type, arg4_type,
1854  arg5_type, arg6_type, arg7_type, mt_policy>* clone()
1855  {
1856  return new _connection7<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
1857  arg5_type, arg6_type, arg7_type, mt_policy>(*this);
1858  }
1859 
1860  virtual _connection_base7<arg1_type, arg2_type, arg3_type, arg4_type,
1861  arg5_type, arg6_type, arg7_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
1862  {
1863  return new _connection7<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
1864  arg5_type, arg6_type, arg7_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
1865  }
1866 
1867  virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
1868  arg5_type a5, arg6_type a6, arg7_type a7)
1869  {
1870  (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6, a7);
1871  }
1872 
1874  {
1875  return m_pobject;
1876  }
1877 
1878  private:
1879  dest_type* m_pobject;
1880  void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type,
1881  arg5_type, arg6_type, arg7_type);
1882  };
1883 
1884  template<class dest_type, class arg1_type, class arg2_type, class arg3_type,
1885  class arg4_type, class arg5_type, class arg6_type, class arg7_type,
1886  class arg8_type, class mt_policy>
1887  class _connection8 : public _connection_base8<arg1_type, arg2_type,
1888  arg3_type, arg4_type, arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>
1889  {
1890  public:
1892  {
1893  this->pobject = NULL;
1894  this->pmemfun = NULL;
1895  }
1896 
1897  _connection8(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type,
1898  arg2_type, arg3_type, arg4_type, arg5_type, arg6_type,
1899  arg7_type, arg8_type))
1900  {
1901  m_pobject = pobject;
1902  m_pmemfun = pmemfun;
1903  }
1904 
1905  virtual _connection_base8<arg1_type, arg2_type, arg3_type, arg4_type,
1906  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>* clone()
1907  {
1908  return new _connection8<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
1909  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>(*this);
1910  }
1911 
1912  virtual _connection_base8<arg1_type, arg2_type, arg3_type, arg4_type,
1913  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
1914  {
1915  return new _connection8<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
1916  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
1917  }
1918 
1919  virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
1920  arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8)
1921  {
1922  (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6, a7, a8);
1923  }
1924 
1926  {
1927  return m_pobject;
1928  }
1929 
1930  private:
1931  dest_type* m_pobject;
1932  void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type,
1933  arg5_type, arg6_type, arg7_type, arg8_type);
1934  };
1935 
1936  template<class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
1937  class signal0 : public _signal_base0<mt_policy>
1938  {
1939  public:
1942  {
1943  ;
1944  }
1945 
1947  : _signal_base0<mt_policy>(s)
1948  {
1949  ;
1950  }
1951 
1952  template<class desttype>
1953  void connect(desttype* pclass, void (desttype::*pmemfun)())
1954  {
1955  lock_block<mt_policy> lock(this);
1957  new _connection0<desttype, mt_policy>(pclass, pmemfun);
1958  this->m_connected_slots.push_back(conn);
1959  pclass->signal_connect(this);
1960  }
1961 
1962  void emit()
1963  {
1964  lock_block<mt_policy> lock(this);
1965  const_iterator itNext, it = this->m_connected_slots.begin();
1966  const_iterator itEnd = this->m_connected_slots.end();
1967 
1968  while(it != itEnd)
1969  {
1970  itNext = it;
1971  ++itNext;
1972 
1973  (*it)->emit();
1974 
1975  it = itNext;
1976  }
1977  }
1978 
1979  void operator()()
1980  {
1981  lock_block<mt_policy> lock(this);
1982  const_iterator itNext, it = this->m_connected_slots.begin();
1983  const_iterator itEnd = this->m_connected_slots.end();
1984 
1985  while(it != itEnd)
1986  {
1987  itNext = it;
1988  ++itNext;
1989 
1990  (*it)->emit();
1991 
1992  it = itNext;
1993  }
1994  }
1995  };
1996 
1997  template<class arg1_type, class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
1998  class signal1 : public _signal_base1<arg1_type, mt_policy>
1999  {
2000  public:
2003  {
2004  ;
2005  }
2006 
2008  : _signal_base1<arg1_type, mt_policy>(s)
2009  {
2010  ;
2011  }
2012 
2013  template<class desttype>
2014  void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type))
2015  {
2016  lock_block<mt_policy> lock(this);
2018  new _connection1<desttype, arg1_type, mt_policy>(pclass, pmemfun);
2019  this->m_connected_slots.push_back(conn);
2020  pclass->signal_connect(this);
2021  }
2022 
2023  void emit(arg1_type a1)
2024  {
2025  lock_block<mt_policy> lock(this);
2026  const_iterator itNext, it = this->m_connected_slots.begin();
2027  const_iterator itEnd = this->m_connected_slots.end();
2028 
2029  while(it != itEnd)
2030  {
2031  itNext = it;
2032  ++itNext;
2033 
2034  (*it)->emit(a1);
2035 
2036  it = itNext;
2037  }
2038  }
2039 
2040  void operator()(arg1_type a1)
2041  {
2042  lock_block<mt_policy> lock(this);
2043  const_iterator itNext, it = this->m_connected_slots.begin();
2044  const_iterator itEnd = this->m_connected_slots.end();
2045 
2046  while(it != itEnd)
2047  {
2048  itNext = it;
2049  ++itNext;
2050 
2051  (*it)->emit(a1);
2052 
2053  it = itNext;
2054  }
2055  }
2056  };
2057 
2058  template<class arg1_type, typename arg2_type, typename mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
2059  class signal2 : public _signal_base2<arg1_type, arg2_type, mt_policy>
2060  {
2061  public:
2064  {
2065  ;
2066  }
2067 
2069  : _signal_base2<arg1_type, arg2_type, mt_policy>(s)
2070  {
2071  ;
2072  }
2073 
2074  template<class desttype>
2075  void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type,
2076  arg2_type))
2077  {
2078  lock_block<mt_policy> lock(this);
2081  this->m_connected_slots.push_back(conn);
2082  pclass->signal_connect(this);
2083  }
2084 
2085  void emit(arg1_type a1, arg2_type a2)
2086  {
2087  lock_block<mt_policy> lock(this);
2088  const_iterator itNext, it = this->m_connected_slots.begin();
2089  const_iterator itEnd = this->m_connected_slots.end();
2090 
2091  while(it != itEnd)
2092  {
2093  itNext = it;
2094  ++itNext;
2095 
2096  (*it)->emit(a1, a2);
2097 
2098  it = itNext;
2099  }
2100  }
2101 
2102  void operator()(arg1_type a1, arg2_type a2)
2103  {
2104  lock_block<mt_policy> lock(this);
2105  const_iterator itNext, it = this->m_connected_slots.begin();
2106  const_iterator itEnd = this->m_connected_slots.end();
2107 
2108  while(it != itEnd)
2109  {
2110  itNext = it;
2111  ++itNext;
2112 
2113  (*it)->emit(a1, a2);
2114 
2115  it = itNext;
2116  }
2117  }
2118  };
2119 
2120  template<class arg1_type, typename arg2_type, typename arg3_type, typename mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
2121  class signal3 : public _signal_base3<arg1_type, arg2_type, arg3_type, mt_policy>
2122  {
2123  public:
2126  {
2127  ;
2128  }
2129 
2131  : _signal_base3<arg1_type, arg2_type, arg3_type, mt_policy>(s)
2132  {
2133  ;
2134  }
2135 
2136  template<class desttype>
2137  void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type,
2138  arg2_type, arg3_type))
2139  {
2140  lock_block<mt_policy> lock(this);
2143  pmemfun);
2144  this->m_connected_slots.push_back(conn);
2145  pclass->signal_connect(this);
2146  }
2147 
2148  void emit(arg1_type a1, arg2_type a2, arg3_type a3)
2149  {
2150  lock_block<mt_policy> lock(this);
2151  const_iterator itNext, it = this->m_connected_slots.begin();
2152  const_iterator itEnd = this->m_connected_slots.end();
2153 
2154  while(it != itEnd)
2155  {
2156  itNext = it;
2157  ++itNext;
2158 
2159  (*it)->emit(a1, a2, a3);
2160 
2161  it = itNext;
2162  }
2163  }
2164 
2165  void operator()(arg1_type a1, arg2_type a2, arg3_type a3)
2166  {
2167  lock_block<mt_policy> lock(this);
2168  const_iterator itNext, it = this->m_connected_slots.begin();
2169  const_iterator itEnd = this->m_connected_slots.end();
2170 
2171  while(it != itEnd)
2172  {
2173  itNext = it;
2174  ++itNext;
2175 
2176  (*it)->emit(a1, a2, a3);
2177 
2178  it = itNext;
2179  }
2180  }
2181  };
2182 
2183  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type, class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
2184  class signal4 : public _signal_base4<arg1_type, arg2_type, arg3_type,
2185  arg4_type, mt_policy>
2186  {
2187  public:
2190  {
2191  ;
2192  }
2193 
2195  : _signal_base4<arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>(s)
2196  {
2197  ;
2198  }
2199 
2200  template<class desttype>
2201  void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type,
2202  arg2_type, arg3_type, arg4_type))
2203  {
2204  lock_block<mt_policy> lock(this);
2206  conn = new _connection4<desttype, arg1_type, arg2_type, arg3_type,
2207  arg4_type, mt_policy>(pclass, pmemfun);
2208  this->m_connected_slots.push_back(conn);
2209  pclass->signal_connect(this);
2210  }
2211 
2212  void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4)
2213  {
2214  lock_block<mt_policy> lock(this);
2215  const_iterator itNext, it = this->m_connected_slots.begin();
2216  const_iterator itEnd = this->m_connected_slots.end();
2217 
2218  while(it != itEnd)
2219  {
2220  itNext = it;
2221  ++itNext;
2222 
2223  (*it)->emit(a1, a2, a3, a4);
2224 
2225  it = itNext;
2226  }
2227  }
2228 
2229  void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4)
2230  {
2231  lock_block<mt_policy> lock(this);
2232  const_iterator itNext, it = this->m_connected_slots.begin();
2233  const_iterator itEnd = this->m_connected_slots.end();
2234 
2235  while(it != itEnd)
2236  {
2237  itNext = it;
2238  ++itNext;
2239 
2240  (*it)->emit(a1, a2, a3, a4);
2241 
2242  it = itNext;
2243  }
2244  }
2245  };
2246 
2247  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
2248  class arg5_type, class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
2249  class signal5 : public _signal_base5<arg1_type, arg2_type, arg3_type,
2250  arg4_type, arg5_type, mt_policy>
2251  {
2252  public:
2255  {
2256  ;
2257  }
2258 
2259  signal5(const signal5<arg1_type, arg2_type, arg3_type, arg4_type,
2260  arg5_type, mt_policy>& s)
2261  : _signal_base5<arg1_type, arg2_type, arg3_type, arg4_type,
2262  arg5_type, mt_policy>(s)
2263  {
2264  ;
2265  }
2266 
2267  template<class desttype>
2268  void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type,
2269  arg2_type, arg3_type, arg4_type, arg5_type))
2270  {
2271  lock_block<mt_policy> lock(this);
2272  _connection5<desttype, arg1_type, arg2_type, arg3_type, arg4_type,
2273  arg5_type, mt_policy>* conn = new _connection5<desttype, arg1_type, arg2_type,
2274  arg3_type, arg4_type, arg5_type, mt_policy>(pclass, pmemfun);
2275  this->m_connected_slots.push_back(conn);
2276  pclass->signal_connect(this);
2277  }
2278 
2279  void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
2280  arg5_type a5)
2281  {
2282  lock_block<mt_policy> lock(this);
2283  const_iterator itNext, it = this->m_connected_slots.begin();
2284  const_iterator itEnd = this->m_connected_slots.end();
2285 
2286  while(it != itEnd)
2287  {
2288  itNext = it;
2289  ++itNext;
2290 
2291  (*it)->emit(a1, a2, a3, a4, a5);
2292 
2293  it = itNext;
2294  }
2295  }
2296 
2297  void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
2298  arg5_type a5)
2299  {
2300  lock_block<mt_policy> lock(this);
2301  const_iterator itNext, it = this->m_connected_slots.begin();
2302  const_iterator itEnd = this->m_connected_slots.end();
2303 
2304  while(it != itEnd)
2305  {
2306  itNext = it;
2307  ++itNext;
2308 
2309  (*it)->emit(a1, a2, a3, a4, a5);
2310 
2311  it = itNext;
2312  }
2313  }
2314  };
2315 
2316 
2317  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
2318  class arg5_type, class arg6_type, class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
2319  class signal6 : public _signal_base6<arg1_type, arg2_type, arg3_type,
2320  arg4_type, arg5_type, arg6_type, mt_policy>
2321  {
2322  public:
2323  typedef typename _signal_base6<arg1_type, arg2_type, arg3_type,
2324  arg4_type, arg5_type, arg6_type, mt_policy>::connections_list::const_iterator const_iterator;
2326  {
2327  ;
2328  }
2329 
2330  signal6(const signal6<arg1_type, arg2_type, arg3_type, arg4_type,
2331  arg5_type, arg6_type, mt_policy>& s)
2332  : _signal_base6<arg1_type, arg2_type, arg3_type, arg4_type,
2333  arg5_type, arg6_type, mt_policy>(s)
2334  {
2335  ;
2336  }
2337 
2338  template<class desttype>
2339  void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type,
2340  arg2_type, arg3_type, arg4_type, arg5_type, arg6_type))
2341  {
2342  lock_block<mt_policy> lock(this);
2343  _connection6<desttype, arg1_type, arg2_type, arg3_type, arg4_type,
2344  arg5_type, arg6_type, mt_policy>* conn =
2345  new _connection6<desttype, arg1_type, arg2_type, arg3_type,
2346  arg4_type, arg5_type, arg6_type, mt_policy>(pclass, pmemfun);
2347  this->m_connected_slots.push_back(conn);
2348  pclass->signal_connect(this);
2349  }
2350 
2351  void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
2352  arg5_type a5, arg6_type a6)
2353  {
2354  lock_block<mt_policy> lock(this);
2355  const_iterator itNext, it = this->m_connected_slots.begin();
2356  const_iterator itEnd = this->m_connected_slots.end();
2357 
2358  while(it != itEnd)
2359  {
2360  itNext = it;
2361  ++itNext;
2362 
2363  (*it)->emit(a1, a2, a3, a4, a5, a6);
2364 
2365  it = itNext;
2366  }
2367  }
2368 
2369  void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
2370  arg5_type a5, arg6_type a6)
2371  {
2372  lock_block<mt_policy> lock(this);
2373  const_iterator itNext, it = this->m_connected_slots.begin();
2374  const_iterator itEnd = this->m_connected_slots.end();
2375 
2376  while(it != itEnd)
2377  {
2378  itNext = it;
2379  ++itNext;
2380 
2381  (*it)->emit(a1, a2, a3, a4, a5, a6);
2382 
2383  it = itNext;
2384  }
2385  }
2386  };
2387 
2388  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
2389  class arg5_type, class arg6_type, class arg7_type, class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
2390  class signal7 : public _signal_base7<arg1_type, arg2_type, arg3_type,
2391  arg4_type, arg5_type, arg6_type, arg7_type, mt_policy>
2392  {
2393  public:
2394  typedef typename _signal_base7<arg1_type, arg2_type, arg3_type,
2395  arg4_type, arg5_type, arg6_type, arg7_type, mt_policy>::connections_list::const_iterator const_iterator;
2397  {
2398  ;
2399  }
2400 
2401  signal7(const signal7<arg1_type, arg2_type, arg3_type, arg4_type,
2402  arg5_type, arg6_type, arg7_type, mt_policy>& s)
2403  : _signal_base7<arg1_type, arg2_type, arg3_type, arg4_type,
2404  arg5_type, arg6_type, arg7_type, mt_policy>(s)
2405  {
2406  ;
2407  }
2408 
2409  template<class desttype>
2410  void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type,
2411  arg2_type, arg3_type, arg4_type, arg5_type, arg6_type,
2412  arg7_type))
2413  {
2414  lock_block<mt_policy> lock(this);
2415  _connection7<desttype, arg1_type, arg2_type, arg3_type, arg4_type,
2416  arg5_type, arg6_type, arg7_type, mt_policy>* conn =
2417  new _connection7<desttype, arg1_type, arg2_type, arg3_type,
2418  arg4_type, arg5_type, arg6_type, arg7_type, mt_policy>(pclass, pmemfun);
2419  this->m_connected_slots.push_back(conn);
2420  pclass->signal_connect(this);
2421  }
2422 
2423  void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
2424  arg5_type a5, arg6_type a6, arg7_type a7)
2425  {
2426  lock_block<mt_policy> lock(this);
2427  const_iterator itNext, it = this->m_connected_slots.begin();
2428  const_iterator itEnd = this->m_connected_slots.end();
2429 
2430  while(it != itEnd)
2431  {
2432  itNext = it;
2433  ++itNext;
2434 
2435  (*it)->emit(a1, a2, a3, a4, a5, a6, a7);
2436 
2437  it = itNext;
2438  }
2439  }
2440 
2441  void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
2442  arg5_type a5, arg6_type a6, arg7_type a7)
2443  {
2444  lock_block<mt_policy> lock(this);
2445  const_iterator itNext, it = this->m_connected_slots.begin();
2446  const_iterator itEnd = this->m_connected_slots.end();
2447 
2448  while(it != itEnd)
2449  {
2450  itNext = it;
2451  ++itNext;
2452 
2453  (*it)->emit(a1, a2, a3, a4, a5, a6, a7);
2454 
2455  it = itNext;
2456  }
2457  }
2458  };
2459 
2460  template<class arg1_type, class arg2_type, class arg3_type, class arg4_type,
2461  class arg5_type, class arg6_type, class arg7_type, class arg8_type, class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
2462  class signal8 : public _signal_base8<arg1_type, arg2_type, arg3_type,
2463  arg4_type, arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>
2464  {
2465  public:
2466  typedef typename _signal_base8<arg1_type, arg2_type, arg3_type,
2467  arg4_type, arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>::connections_list::const_iterator const_iterator;
2469  {
2470  ;
2471  }
2472 
2473  signal8(const signal8<arg1_type, arg2_type, arg3_type, arg4_type,
2474  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>& s)
2475  : _signal_base8<arg1_type, arg2_type, arg3_type, arg4_type,
2476  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>(s)
2477  {
2478  ;
2479  }
2480 
2481  template<class desttype>
2482  void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type,
2483  arg2_type, arg3_type, arg4_type, arg5_type, arg6_type,
2484  arg7_type, arg8_type))
2485  {
2486  lock_block<mt_policy> lock(this);
2487  _connection8<desttype, arg1_type, arg2_type, arg3_type, arg4_type,
2488  arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>* conn =
2489  new _connection8<desttype, arg1_type, arg2_type, arg3_type,
2490  arg4_type, arg5_type, arg6_type, arg7_type,
2491  arg8_type, mt_policy>(pclass, pmemfun);
2492  this->m_connected_slots.push_back(conn);
2493  pclass->signal_connect(this);
2494  }
2495 
2496  void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
2497  arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8)
2498  {
2499  lock_block<mt_policy> lock(this);
2500  const_iterator itNext, it = this->m_connected_slots.begin();
2501  const_iterator itEnd = this->m_connected_slots.end();
2502 
2503  while(it != itEnd)
2504  {
2505  itNext = it;
2506  ++itNext;
2507 
2508  (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8);
2509 
2510  it = itNext;
2511  }
2512  }
2513 
2514  void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4,
2515  arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8)
2516  {
2517  lock_block<mt_policy> lock(this);
2518  const_iterator itNext, it = this->m_connected_slots.begin();
2519  const_iterator itEnd = this->m_connected_slots.end();
2520 
2521  while(it != itEnd)
2522  {
2523  itNext = it;
2524  ++itNext;
2525 
2526  (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8);
2527 
2528  it = itNext;
2529  }
2530  }
2531  };
2532 
2533 }; // namespace sigslot
2534 
2535 #endif // SIGSLOT_H__
2536