Home » U++ Library support » U++ Core » Callback (THISBACK) Improve
Re: Callback (THISBACK) Improve [message #30248 is a reply to message #30232] |
Mon, 20 December 2010 10:59   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
noticed that some reducing argument templates were still missing.
here comes the additional in Callback1.h, simply replace file..
this makes things like this possible
Callback cb0;
Callback1<double> cb1;
Callback2<double, double> cb2;
Callback3<double, double, double> cb3;
Callback4<double, double, double, double> cb4;
Gate gt0;
Gate1<double> gt1;
Gate2<double, double> gt2;
Gate3<double, double, double> gt3;
Gate4<double, double, double, double> gt4;
//args reduction
//1 arg to 0 args
cb0 = callback1(cb1, 1);
//2 args to 1 arg
cb1 = callback1(cb2, 2);
cb0 = callback2(cb2, 1, 2);
//3 args to 2 args
cb2 = callback1(cb3, 3); //new
cb0 = callback3(cb3, 1, 2, 3); //new
//4 args to 3 args
cb3 = callback1(cb4, 4); //new
cb0 = callback4(cb4, 1, 2, 3, 4); //new
//1 arg to 0 args
gt0 = callback1(gt1, 1); //new
//2 args to 1 arg
gt1 = callback1(gt2, 2); //new
gt0 = callback2(gt2, 1, 2); //new
//3 args to 2 args
gt2 = callback1(gt3, 3); //new
gt0 = callback3(gt3, 1, 2, 3); //new
//4 args to 3 args
gt3 = callback1(gt4, 4); //new
gt0 = callback4(gt4, 1, 2, 3, 4); //new
-
Attachment: Callback1.h
(Size: 18.20KB, Downloaded 355 times)
|
|
|
 |
|
Callback (THISBACK) Improve
By: tojocky on Tue, 07 December 2010 15:08
|
 |
|
Re: Callback (THISBACK) Improve
By: koldo on Thu, 09 December 2010 09:08
|
 |
|
Re: Callback (THISBACK) Improve
By: tojocky on Thu, 09 December 2010 13:42
|
 |
|
Re: Callback (THISBACK) Improve
By: mirek on Sun, 12 December 2010 08:43
|
 |
|
Re: Callback (THISBACK) Improve
By: tojocky on Sun, 12 December 2010 13:26
|
 |
|
Re: Callback (THISBACK) Improve
By: mirek on Sun, 12 December 2010 15:55
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Mon, 13 December 2010 17:13
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Fri, 17 December 2010 11:01
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Mon, 20 December 2010 10:59
|
 |
|
Re: Callback (THISBACK) Improve
By: tojocky on Mon, 20 December 2010 17:06
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Tue, 21 December 2010 15:45
|
 |
|
Re: Callback (THISBACK) Improve
By: tojocky on Wed, 22 December 2010 21:56
|
 |
|
Re: Callback (THISBACK) Improve
By: mirek on Sat, 25 December 2010 11:03
|
 |
|
Re: Callback (THISBACK) Improve
By: mirek on Sat, 25 December 2010 11:01
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Sun, 26 December 2010 10:04
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Tue, 18 January 2011 10:24
|
 |
|
Re: Callback (THISBACK) Improve
By: mirek on Fri, 28 January 2011 10:31
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Tue, 01 February 2011 22:39
|
 |
|
Re: Callback (THISBACK) Improve
By: tojocky on Wed, 02 February 2011 08:34
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Wed, 02 February 2011 09:34
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Thu, 10 February 2011 11:26
|
 |
|
Re: Callback (THISBACK) Improve
By: kohait00 on Thu, 28 April 2011 13:53
|
 |
|
Re: Callback (THISBACK) Improve
By: mdelfede on Tue, 04 February 2014 23:55
|
 |
|
Re: Callback (THISBACK) Improve
By: zsolt on Wed, 05 February 2014 16:50
|
 |
|
Re: Callback (THISBACK) Improve
By: mdelfede on Wed, 05 February 2014 17:28
|
 |
|
Re: Callback (THISBACK) Improve
By: piotr5 on Sun, 09 February 2014 12:09
|
 |
|
Re: Callback (THISBACK) Improve
By: mdelfede on Sun, 09 February 2014 12:15
|
 |
|
Re: Callback (THISBACK) Improve
By: piotr5 on Sun, 09 February 2014 15:43
|
Goto Forum:
Current Time: Tue Apr 29 18:43:49 CEST 2025
Total time taken to generate the page: 0.01201 seconds
|