Home » U++ Library support » U++ Core » Callback (THISBACK) Improve
Re: Callback (THISBACK) Improve [message #30232 is a reply to message #30177] |
Fri, 17 December 2010 11:01   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
i found out that the last change didnt really work and started to scratch Callback layer and found out many inconsistancies in name and usage.. so the past day i was restructuring the code blocks and renaming what was needed.
also, the changes recently made did not support the in-callback type conversion, i.e specifying a callback for float but parametrizing it with int.. this is corrected.
further more, i have extended Callback and Gate and unified their definitions.
since the code grew quite a bit with all that, i have grouped the stuff by count of arguments passing to THISBACK. so you will find a Callback0.h for THISBACK stuff, Callback1.h for THISBACK1, etc..
Callback.h simply includes them all..
just see the code. i think it's pretty clean now and easy to extend if needed, since all Callbacks now have same respective template type names accordingly. i havent changed the code in terms of function, but some naming issues to be more clean, i.e.
struct CallbackMethodActionArg1_2 : public Callback2Action<P1, P2> {}
//to
struct Callback2MethodActionArg1 : public Callback2Action<P1, P2> {}
because they made name clashes when extending..
for testing, i have compiled a major application, and also TheIDE, which both still work and also created a test app where all the combinations are listed to check right compilation. there, you will find the new added combinations and those still not supported.
i also added a STDBACK, STDBACK1, etc. helper, when dealing with non THISBACK functions (because i always have to remeber the syntax for those..)
EDIT:
there are now versions to reduce a callback's attributes by one, specifying a parameter from right, yiedling a callback with one parameter less..
i also found some templates for non thiscall's that use class R template type for return value, whereas callbacks are supposed to be void returning. is this a remanent of old times or is it 'by design'?
-
Attachment: Callback.rar
(Size: 15.03KB, Downloaded 344 times)
[Updated on: Fri, 17 December 2010 14:03] Report message to a moderator
|
|
|
 |
|
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 22:06:09 CEST 2025
Total time taken to generate the page: 0.01029 seconds
|