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 » IsNullInstance() for Callback
Re: IsNullInstance() for Callback [message #1638 is a reply to message #1635] Sat, 11 March 2006 07:35 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
hojtsy wrote on Fri, 10 March 2006 18:48

I think it would be good to check if a given Callback is Null or not. This would need a IsNullInstance() method for Callback.


I am not sure. To test whether Callback is empty or not, you can call operator bool() - just like with function pointer.

IsNull would imply that Callback is sort of value (or Value..). That is something that we had decided to avoid lately. The trouble with this is that for Value, you expect comparison, hash-value etc. But for

Callback1<Foo>

that creates the requirement for Foo comparison and GetHashValue - something not very nice in most cases.

MIrek


 
Read Message
Read Message
Read Message
Read Message
Read Message
Next Topic: what KillPostCallback is suppose to do
Goto Forum:
  


Current Time: Mon Aug 25 12:46:50 CEST 2025

Total time taken to generate the page: 0.07282 seconds