Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Callbacks and Timers » Possible improvements to U++ callbacks
Possible improvements to U++ callbacks [message #18242] Thu, 18 September 2008 19:34 Go to previous message
cas_ is currently offline  cas_
Messages: 20
Registered: July 2008
Location: Poland
Promising Member
I know there are probably more urgent things to deal with (like switching to some modern graphics backend, documentation improvements and perhaps more decent debugging support on Linux), but anyway I've decided to share some thoughts.

U++ supports callbacks through Callback* family of templates. They are simple, effective and sufficient in most situations. However, there is very little support for connecting multiple functions to single callback object - only chaining is supported, as far as I know. Unfortunately, this approach makes it hard to disconnect a previously connected callback. What if you delete an object, which is pointed by a callback placed in some chain? Some existing signal/slot libraries (like libsigc++) give you even possibility to handle such situations automatically (in sigc++ it's enough to derive your class from sigc::trackable).

What do you think about improving U++ callbacks in this way? Would you find it useful? It should be possible to extend current implementation without losing backward compatibility.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can I stop the timer?
Next Topic: Problem with non-blocking mode
Goto Forum:
  


Current Time: Fri Apr 19 03:56:56 CEST 2024

Total time taken to generate the page: 0.01918 seconds