3
The Method class wraps member functions for use with the signals/slots framework.
5
template < typename R,typename ClassT,class A1 = Void, class A2 = Void, class A3 = Void, class A4 = Void, class A5 = Void, class A6 = Void, class A7 = Void, class A8 = Void, class A9 = Void, class A10 = Void>
6
class Method : public Callable<R, A1,A2,A3,A4,A5,A6,A7,A8,A9,A10>
9
/** Convenience typedef of the wrapped member function signature. */
10
typedef R (ClassT::*MemFuncT)(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10);
12
/** Wraps the given object/member pair. */
13
explicit Method(ClassT& object, MemFuncT ptr) throw()
14
: _object(&object), _memFunc(ptr)
17
/** Deeply copies rhs. */
18
Method(const Method& rhs) throw()
19
: Callable<R, A1,A2,A3,A4,A5,A6,A7,A8,A9,A10>()
20
{ this->operator=(rhs); }
23
/** Returns a reference to this object's wrapped ClassT object. */
27
/** Returns a const reference to this object's wrapped ClassT object. */
28
const ClassT& object() const
31
/** Returns a reference to this object's wrapped MemFuncT. */
32
const MemFuncT& method() const
36
Passes on all arguments to the wrapped object/member pair and returns
37
the result of that member.
39
inline R operator()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10) const
40
{ return (_object->*_memFunc)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); }
43
Creates a copy of this object and returns it. The caller
44
owns the returned object.
46
Method<R, ClassT, A1,A2,A3,A4,A5,A6,A7,A8,A9,A10>* clone() const
47
{ return new Method(*this); }
49
/** Deeply copies rhs. */
50
Method& operator=(const Method& rhs)
53
_object = rhs._object;
54
_memFunc = rhs._memFunc;
65
Creates and returns a Method object for the given object/method pair.
67
template <class R, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
68
Method<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10)) throw()
70
return Method<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10>(obj,ptr);
73
MethodSlot wraps Method objects so that they can act as Slots.
75
template < typename R, typename ClassT,class A1 = Void, class A2 = Void, class A3 = Void, class A4 = Void, class A5 = Void, class A6 = Void, class A7 = Void, class A8 = Void, class A9 = Void, class A10 = Void>
76
class MethodSlot : public BasicSlot<R, A1,A2,A3,A4,A5,A6,A7,A8,A9,A10>
79
/** Wraps the given Method object. */
80
MethodSlot(const Method<R, ClassT,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10>& method)
85
Creates a copy of this object and returns it. The caller
86
owns the returned object.
89
{ return new MethodSlot(*this); }
91
/** Returns a pointer to this object's internal Callable. */
92
virtual const void* callable() const
95
virtual bool opened(const Connection& c)
97
Connectable& connectable = _method.object();
98
return connectable.opened(c);
101
virtual void closed(const Connection& c)
103
Connectable& connectable = _method.object();
104
connectable.closed(c);
108
Method<R, ClassT,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10> _method;
110
/** Creates and returns a MethodSlot object for the given object/member pair. */
111
template <class R, class BaseT, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
112
MethodSlot<R,BaseT,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10) ) throw()
114
return MethodSlot<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10>( callable( obj, memFunc ) );
119
template < typename R, typename ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
120
class Method<R,ClassT, A1,A2,A3,A4,A5,A6,A7,A8,A9,Void> : public Callable<R, A1,A2,A3,A4,A5,A6,A7,A8,A9,Void>
123
/** Convenience typedef of the wrapped member function signature. */
124
typedef R (ClassT::*MemFuncT)(A1,A2,A3,A4,A5,A6,A7,A8,A9);
126
/** Wraps the given object/member pair. */
127
explicit Method(ClassT& object, MemFuncT ptr) throw()
128
: _object(&object), _memFunc(ptr)
131
/** Deeply copies rhs. */
132
Method(const Method& rhs) throw()
133
: Callable<R, A1,A2,A3,A4,A5,A6,A7,A8,A9,Void>()
134
{ this->operator=(rhs); }
137
/** Returns a reference to this object's wrapped ClassT object. */
141
/** Returns a const reference to this object's wrapped ClassT object. */
142
const ClassT& object() const
145
/** Returns a reference to this object's wrapped MemFuncT. */
146
const MemFuncT& method() const
150
Passes on all arguments to the wrapped object/member pair and returns
151
the result of that member.
153
inline R operator()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) const
154
{ return (_object->*_memFunc)(a1,a2,a3,a4,a5,a6,a7,a8,a9); }
157
Creates a copy of this object and returns it. The caller
158
owns the returned object.
160
Method<R, ClassT, A1,A2,A3,A4,A5,A6,A7,A8,A9,Void>* clone() const
161
{ return new Method(*this); }
163
/** Deeply copies rhs. */
164
Method& operator=(const Method& rhs)
167
_object = rhs._object;
168
_memFunc = rhs._memFunc;
179
Creates and returns a Method object for the given object/method pair.
181
template <class R, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
182
Method<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8,A9> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)) throw()
184
return Method<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8,A9>(obj,ptr);
186
/** Creates and returns a MethodSlot object for the given object/member pair. */
187
template <class R, class BaseT, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
188
MethodSlot<R,BaseT,A1,A2,A3,A4,A5,A6,A7,A8,A9> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2,A3,A4,A5,A6,A7,A8,A9) ) throw()
190
return MethodSlot<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8,A9>( callable( obj, memFunc ) );
195
template < typename R, typename ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
196
class Method<R,ClassT, A1,A2,A3,A4,A5,A6,A7,A8,Void,Void> : public Callable<R, A1,A2,A3,A4,A5,A6,A7,A8,Void,Void>
199
/** Convenience typedef of the wrapped member function signature. */
200
typedef R (ClassT::*MemFuncT)(A1,A2,A3,A4,A5,A6,A7,A8);
202
/** Wraps the given object/member pair. */
203
explicit Method(ClassT& object, MemFuncT ptr) throw()
204
: _object(&object), _memFunc(ptr)
207
/** Deeply copies rhs. */
208
Method(const Method& rhs) throw()
209
: Callable<R, A1,A2,A3,A4,A5,A6,A7,A8,Void,Void>()
210
{ this->operator=(rhs); }
213
/** Returns a reference to this object's wrapped ClassT object. */
217
/** Returns a const reference to this object's wrapped ClassT object. */
218
const ClassT& object() const
221
/** Returns a reference to this object's wrapped MemFuncT. */
222
const MemFuncT& method() const
226
Passes on all arguments to the wrapped object/member pair and returns
227
the result of that member.
229
inline R operator()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
230
{ return (_object->*_memFunc)(a1,a2,a3,a4,a5,a6,a7,a8); }
233
Creates a copy of this object and returns it. The caller
234
owns the returned object.
236
Method<R, ClassT, A1,A2,A3,A4,A5,A6,A7,A8,Void,Void>* clone() const
237
{ return new Method(*this); }
239
/** Deeply copies rhs. */
240
Method& operator=(const Method& rhs)
243
_object = rhs._object;
244
_memFunc = rhs._memFunc;
255
Creates and returns a Method object for the given object/method pair.
257
template <class R, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
258
Method<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)) throw()
260
return Method<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8>(obj,ptr);
262
/** Creates and returns a MethodSlot object for the given object/member pair. */
263
template <class R, class BaseT, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
264
MethodSlot<R,BaseT,A1,A2,A3,A4,A5,A6,A7,A8> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2,A3,A4,A5,A6,A7,A8) ) throw()
266
return MethodSlot<R,ClassT,A1,A2,A3,A4,A5,A6,A7,A8>( callable( obj, memFunc ) );
271
template < typename R, typename ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7>
272
class Method<R,ClassT, A1,A2,A3,A4,A5,A6,A7,Void,Void,Void> : public Callable<R, A1,A2,A3,A4,A5,A6,A7,Void,Void,Void>
275
/** Convenience typedef of the wrapped member function signature. */
276
typedef R (ClassT::*MemFuncT)(A1,A2,A3,A4,A5,A6,A7);
278
/** Wraps the given object/member pair. */
279
explicit Method(ClassT& object, MemFuncT ptr) throw()
280
: _object(&object), _memFunc(ptr)
283
/** Deeply copies rhs. */
284
Method(const Method& rhs) throw()
285
: Callable<R, A1,A2,A3,A4,A5,A6,A7,Void,Void,Void>()
286
{ this->operator=(rhs); }
289
/** Returns a reference to this object's wrapped ClassT object. */
293
/** Returns a const reference to this object's wrapped ClassT object. */
294
const ClassT& object() const
297
/** Returns a reference to this object's wrapped MemFuncT. */
298
const MemFuncT& method() const
302
Passes on all arguments to the wrapped object/member pair and returns
303
the result of that member.
305
inline R operator()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
306
{ return (_object->*_memFunc)(a1,a2,a3,a4,a5,a6,a7); }
309
Creates a copy of this object and returns it. The caller
310
owns the returned object.
312
Method<R, ClassT, A1,A2,A3,A4,A5,A6,A7,Void,Void,Void>* clone() const
313
{ return new Method(*this); }
315
/** Deeply copies rhs. */
316
Method& operator=(const Method& rhs)
319
_object = rhs._object;
320
_memFunc = rhs._memFunc;
331
Creates and returns a Method object for the given object/method pair.
333
template <class R, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7>
334
Method<R,ClassT,A1,A2,A3,A4,A5,A6,A7> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)) throw()
336
return Method<R,ClassT,A1,A2,A3,A4,A5,A6,A7>(obj,ptr);
338
/** Creates and returns a MethodSlot object for the given object/member pair. */
339
template <class R, class BaseT, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6, class A7>
340
MethodSlot<R,BaseT,A1,A2,A3,A4,A5,A6,A7> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2,A3,A4,A5,A6,A7) ) throw()
342
return MethodSlot<R,ClassT,A1,A2,A3,A4,A5,A6,A7>( callable( obj, memFunc ) );
347
template < typename R, typename ClassT,class A1, class A2, class A3, class A4, class A5, class A6>
348
class Method<R,ClassT, A1,A2,A3,A4,A5,A6,Void,Void,Void,Void> : public Callable<R, A1,A2,A3,A4,A5,A6,Void,Void,Void,Void>
351
/** Convenience typedef of the wrapped member function signature. */
352
typedef R (ClassT::*MemFuncT)(A1,A2,A3,A4,A5,A6);
354
/** Wraps the given object/member pair. */
355
explicit Method(ClassT& object, MemFuncT ptr) throw()
356
: _object(&object), _memFunc(ptr)
359
/** Deeply copies rhs. */
360
Method(const Method& rhs) throw()
361
: Callable<R, A1,A2,A3,A4,A5,A6,Void,Void,Void,Void>()
362
{ this->operator=(rhs); }
365
/** Returns a reference to this object's wrapped ClassT object. */
369
/** Returns a const reference to this object's wrapped ClassT object. */
370
const ClassT& object() const
373
/** Returns a reference to this object's wrapped MemFuncT. */
374
const MemFuncT& method() const
378
Passes on all arguments to the wrapped object/member pair and returns
379
the result of that member.
381
inline R operator()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
382
{ return (_object->*_memFunc)(a1,a2,a3,a4,a5,a6); }
385
Creates a copy of this object and returns it. The caller
386
owns the returned object.
388
Method<R, ClassT, A1,A2,A3,A4,A5,A6,Void,Void,Void,Void>* clone() const
389
{ return new Method(*this); }
391
/** Deeply copies rhs. */
392
Method& operator=(const Method& rhs)
395
_object = rhs._object;
396
_memFunc = rhs._memFunc;
407
Creates and returns a Method object for the given object/method pair.
409
template <class R, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6>
410
Method<R,ClassT,A1,A2,A3,A4,A5,A6> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)) throw()
412
return Method<R,ClassT,A1,A2,A3,A4,A5,A6>(obj,ptr);
414
/** Creates and returns a MethodSlot object for the given object/member pair. */
415
template <class R, class BaseT, class ClassT,class A1, class A2, class A3, class A4, class A5, class A6>
416
MethodSlot<R,BaseT,A1,A2,A3,A4,A5,A6> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2,A3,A4,A5,A6) ) throw()
418
return MethodSlot<R,ClassT,A1,A2,A3,A4,A5,A6>( callable( obj, memFunc ) );
423
template < typename R, typename ClassT,class A1, class A2, class A3, class A4, class A5>
424
class Method<R,ClassT, A1,A2,A3,A4,A5,Void,Void,Void,Void,Void> : public Callable<R, A1,A2,A3,A4,A5,Void,Void,Void,Void,Void>
427
/** Convenience typedef of the wrapped member function signature. */
428
typedef R (ClassT::*MemFuncT)(A1,A2,A3,A4,A5);
430
/** Wraps the given object/member pair. */
431
explicit Method(ClassT& object, MemFuncT ptr) throw()
432
: _object(&object), _memFunc(ptr)
435
/** Deeply copies rhs. */
436
Method(const Method& rhs) throw()
437
: Callable<R, A1,A2,A3,A4,A5,Void,Void,Void,Void,Void>()
438
{ this->operator=(rhs); }
441
/** Returns a reference to this object's wrapped ClassT object. */
445
/** Returns a const reference to this object's wrapped ClassT object. */
446
const ClassT& object() const
449
/** Returns a reference to this object's wrapped MemFuncT. */
450
const MemFuncT& method() const
454
Passes on all arguments to the wrapped object/member pair and returns
455
the result of that member.
457
inline R operator()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
458
{ return (_object->*_memFunc)(a1,a2,a3,a4,a5); }
461
Creates a copy of this object and returns it. The caller
462
owns the returned object.
464
Method<R, ClassT, A1,A2,A3,A4,A5,Void,Void,Void,Void,Void>* clone() const
465
{ return new Method(*this); }
467
/** Deeply copies rhs. */
468
Method& operator=(const Method& rhs)
471
_object = rhs._object;
472
_memFunc = rhs._memFunc;
483
Creates and returns a Method object for the given object/method pair.
485
template <class R, class ClassT,class A1, class A2, class A3, class A4, class A5>
486
Method<R,ClassT,A1,A2,A3,A4,A5> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)) throw()
488
return Method<R,ClassT,A1,A2,A3,A4,A5>(obj,ptr);
490
/** Creates and returns a MethodSlot object for the given object/member pair. */
491
template <class R, class BaseT, class ClassT,class A1, class A2, class A3, class A4, class A5>
492
MethodSlot<R,BaseT,A1,A2,A3,A4,A5> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2,A3,A4,A5) ) throw()
494
return MethodSlot<R,ClassT,A1,A2,A3,A4,A5>( callable( obj, memFunc ) );
499
template < typename R, typename ClassT,class A1, class A2, class A3, class A4>
500
class Method<R,ClassT, A1,A2,A3,A4,Void,Void,Void,Void,Void,Void> : public Callable<R, A1,A2,A3,A4,Void,Void,Void,Void,Void,Void>
503
/** Convenience typedef of the wrapped member function signature. */
504
typedef R (ClassT::*MemFuncT)(A1,A2,A3,A4);
506
/** Wraps the given object/member pair. */
507
explicit Method(ClassT& object, MemFuncT ptr) throw()
508
: _object(&object), _memFunc(ptr)
511
/** Deeply copies rhs. */
512
Method(const Method& rhs) throw()
513
: Callable<R, A1,A2,A3,A4,Void,Void,Void,Void,Void,Void>()
514
{ this->operator=(rhs); }
517
/** Returns a reference to this object's wrapped ClassT object. */
521
/** Returns a const reference to this object's wrapped ClassT object. */
522
const ClassT& object() const
525
/** Returns a reference to this object's wrapped MemFuncT. */
526
const MemFuncT& method() const
530
Passes on all arguments to the wrapped object/member pair and returns
531
the result of that member.
533
inline R operator()(A1 a1, A2 a2, A3 a3, A4 a4) const
534
{ return (_object->*_memFunc)(a1,a2,a3,a4); }
537
Creates a copy of this object and returns it. The caller
538
owns the returned object.
540
Method<R, ClassT, A1,A2,A3,A4,Void,Void,Void,Void,Void,Void>* clone() const
541
{ return new Method(*this); }
543
/** Deeply copies rhs. */
544
Method& operator=(const Method& rhs)
547
_object = rhs._object;
548
_memFunc = rhs._memFunc;
559
Creates and returns a Method object for the given object/method pair.
561
template <class R, class ClassT,class A1, class A2, class A3, class A4>
562
Method<R,ClassT,A1,A2,A3,A4> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2, A3 a3, A4 a4)) throw()
564
return Method<R,ClassT,A1,A2,A3,A4>(obj,ptr);
566
/** Creates and returns a MethodSlot object for the given object/member pair. */
567
template <class R, class BaseT, class ClassT,class A1, class A2, class A3, class A4>
568
MethodSlot<R,BaseT,A1,A2,A3,A4> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2,A3,A4) ) throw()
570
return MethodSlot<R,ClassT,A1,A2,A3,A4>( callable( obj, memFunc ) );
575
template < typename R, typename ClassT,class A1, class A2, class A3>
576
class Method<R,ClassT, A1,A2,A3,Void,Void,Void,Void,Void,Void,Void> : public Callable<R, A1,A2,A3,Void,Void,Void,Void,Void,Void,Void>
579
/** Convenience typedef of the wrapped member function signature. */
580
typedef R (ClassT::*MemFuncT)(A1,A2,A3);
582
/** Wraps the given object/member pair. */
583
explicit Method(ClassT& object, MemFuncT ptr) throw()
584
: _object(&object), _memFunc(ptr)
587
/** Deeply copies rhs. */
588
Method(const Method& rhs) throw()
589
: Callable<R, A1,A2,A3,Void,Void,Void,Void,Void,Void,Void>()
590
{ this->operator=(rhs); }
593
/** Returns a reference to this object's wrapped ClassT object. */
597
/** Returns a const reference to this object's wrapped ClassT object. */
598
const ClassT& object() const
601
/** Returns a reference to this object's wrapped MemFuncT. */
602
const MemFuncT& method() const
606
Passes on all arguments to the wrapped object/member pair and returns
607
the result of that member.
609
inline R operator()(A1 a1, A2 a2, A3 a3) const
610
{ return (_object->*_memFunc)(a1,a2,a3); }
613
Creates a copy of this object and returns it. The caller
614
owns the returned object.
616
Method<R, ClassT, A1,A2,A3,Void,Void,Void,Void,Void,Void,Void>* clone() const
617
{ return new Method(*this); }
619
/** Deeply copies rhs. */
620
Method& operator=(const Method& rhs)
623
_object = rhs._object;
624
_memFunc = rhs._memFunc;
635
Creates and returns a Method object for the given object/method pair.
637
template <class R, class ClassT,class A1, class A2, class A3>
638
Method<R,ClassT,A1,A2,A3> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2, A3 a3)) throw()
640
return Method<R,ClassT,A1,A2,A3>(obj,ptr);
642
/** Creates and returns a MethodSlot object for the given object/member pair. */
643
template <class R, class BaseT, class ClassT,class A1, class A2, class A3>
644
MethodSlot<R,BaseT,A1,A2,A3> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2,A3) ) throw()
646
return MethodSlot<R,ClassT,A1,A2,A3>( callable( obj, memFunc ) );
651
template < typename R, typename ClassT,class A1, class A2>
652
class Method<R,ClassT, A1,A2,Void,Void,Void,Void,Void,Void,Void,Void> : public Callable<R, A1,A2,Void,Void,Void,Void,Void,Void,Void,Void>
655
/** Convenience typedef of the wrapped member function signature. */
656
typedef R (ClassT::*MemFuncT)(A1,A2);
658
/** Wraps the given object/member pair. */
659
explicit Method(ClassT& object, MemFuncT ptr) throw()
660
: _object(&object), _memFunc(ptr)
663
/** Deeply copies rhs. */
664
Method(const Method& rhs) throw()
665
: Callable<R, A1,A2,Void,Void,Void,Void,Void,Void,Void,Void>()
666
{ this->operator=(rhs); }
669
/** Returns a reference to this object's wrapped ClassT object. */
673
/** Returns a const reference to this object's wrapped ClassT object. */
674
const ClassT& object() const
677
/** Returns a reference to this object's wrapped MemFuncT. */
678
const MemFuncT& method() const
682
Passes on all arguments to the wrapped object/member pair and returns
683
the result of that member.
685
inline R operator()(A1 a1, A2 a2) const
686
{ return (_object->*_memFunc)(a1,a2); }
689
Creates a copy of this object and returns it. The caller
690
owns the returned object.
692
Method<R, ClassT, A1,A2,Void,Void,Void,Void,Void,Void,Void,Void>* clone() const
693
{ return new Method(*this); }
695
/** Deeply copies rhs. */
696
Method& operator=(const Method& rhs)
699
_object = rhs._object;
700
_memFunc = rhs._memFunc;
711
Creates and returns a Method object for the given object/method pair.
713
template <class R, class ClassT,class A1, class A2>
714
Method<R,ClassT,A1,A2> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1, A2 a2)) throw()
716
return Method<R,ClassT,A1,A2>(obj,ptr);
718
/** Creates and returns a MethodSlot object for the given object/member pair. */
719
template <class R, class BaseT, class ClassT,class A1, class A2>
720
MethodSlot<R,BaseT,A1,A2> slot( ClassT & obj, R (BaseT::*memFunc)(A1,A2) ) throw()
722
return MethodSlot<R,ClassT,A1,A2>( callable( obj, memFunc ) );
727
template < typename R, typename ClassT,class A1>
728
class Method<R,ClassT, A1,Void,Void,Void,Void,Void,Void,Void,Void,Void> : public Callable<R, A1,Void,Void,Void,Void,Void,Void,Void,Void,Void>
731
/** Convenience typedef of the wrapped member function signature. */
732
typedef R (ClassT::*MemFuncT)(A1);
734
/** Wraps the given object/member pair. */
735
explicit Method(ClassT& object, MemFuncT ptr) throw()
736
: _object(&object), _memFunc(ptr)
739
/** Deeply copies rhs. */
740
Method(const Method& rhs) throw()
741
: Callable<R, A1,Void,Void,Void,Void,Void,Void,Void,Void,Void>()
742
{ this->operator=(rhs); }
745
/** Returns a reference to this object's wrapped ClassT object. */
749
/** Returns a const reference to this object's wrapped ClassT object. */
750
const ClassT& object() const
753
/** Returns a reference to this object's wrapped MemFuncT. */
754
const MemFuncT& method() const
758
Passes on all arguments to the wrapped object/member pair and returns
759
the result of that member.
761
inline R operator()(A1 a1) const
762
{ return (_object->*_memFunc)(a1); }
765
Creates a copy of this object and returns it. The caller
766
owns the returned object.
768
Method<R, ClassT, A1,Void,Void,Void,Void,Void,Void,Void,Void,Void>* clone() const
769
{ return new Method(*this); }
771
/** Deeply copies rhs. */
772
Method& operator=(const Method& rhs)
775
_object = rhs._object;
776
_memFunc = rhs._memFunc;
787
Creates and returns a Method object for the given object/method pair.
789
template <class R, class ClassT,class A1>
790
Method<R,ClassT,A1> callable( ClassT & obj, R (ClassT::*ptr)(A1 a1)) throw()
792
return Method<R,ClassT,A1>(obj,ptr);
794
/** Creates and returns a MethodSlot object for the given object/member pair. */
795
template <class R, class BaseT, class ClassT,class A1>
796
MethodSlot<R,BaseT,A1> slot( ClassT & obj, R (BaseT::*memFunc)(A1) ) throw()
798
return MethodSlot<R,ClassT,A1>( callable( obj, memFunc ) );
803
template < typename R, typename ClassT>
804
class Method<R,ClassT, Void,Void,Void,Void,Void,Void,Void,Void,Void,Void> : public Callable<R, Void,Void,Void,Void,Void,Void,Void,Void,Void,Void>
807
/** Convenience typedef of the wrapped member function signature. */
808
typedef R (ClassT::*MemFuncT)();
810
/** Wraps the given object/member pair. */
811
explicit Method(ClassT& object, MemFuncT ptr) throw()
812
: _object(&object), _memFunc(ptr)
815
/** Deeply copies rhs. */
816
Method(const Method& rhs) throw()
817
: Callable<R, Void,Void,Void,Void,Void,Void,Void,Void,Void,Void>()
818
{ this->operator=(rhs); }
821
/** Returns a reference to this object's wrapped ClassT object. */
825
/** Returns a const reference to this object's wrapped ClassT object. */
826
const ClassT& object() const
829
/** Returns a reference to this object's wrapped MemFuncT. */
830
const MemFuncT& method() const
834
Passes on all arguments to the wrapped object/member pair and returns
835
the result of that member.
837
inline R operator()() const
838
{ return (_object->*_memFunc)(); }
841
Creates a copy of this object and returns it. The caller
842
owns the returned object.
844
Method<R, ClassT, Void,Void,Void,Void,Void,Void,Void,Void,Void,Void>* clone() const
845
{ return new Method(*this); }
847
/** Deeply copies rhs. */
848
Method& operator=(const Method& rhs)
851
_object = rhs._object;
852
_memFunc = rhs._memFunc;
863
Creates and returns a Method object for the given object/method pair.
865
template <class R, class ClassT>
866
Method<R,ClassT> callable( ClassT & obj, R (ClassT::*ptr)()) throw()
868
return Method<R,ClassT>(obj,ptr);
870
/** Creates and returns a MethodSlot object for the given object/member pair. */
871
template <class R, class BaseT, class ClassT>
872
MethodSlot<R,BaseT> slot( ClassT & obj, R (BaseT::*memFunc)() ) throw()
874
return MethodSlot<R,ClassT>( callable( obj, memFunc ) );