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++ Core » <<= and <<
Re: <<= and << [message #12957 is a reply to message #7187] Fri, 30 November 2007 13:13 Go to previous messageGo to previous message
waxblood is currently offline  waxblood
Messages: 95
Registered: January 2007
Member
Quote:


<<= sets the WhenAction callback

<< adds a new callback to existing one; if there were any callbacks before assigned, they will be called as well.

In fact, "<<" is sort of experiment and is very rarely used



Reading code snippets in documentation '<<=' is always used instead of <<, but isn't the '<<' behaviour much more natural than the first one? Writing code with '<<' allows the programmer to modify callbacks stack of ancestor classes freely being at least a little more confident that those callbacks will always be executed before any one other callbacks in derived classes.
Using always '<<=' precludes this possibility.

I think it would be useful to develop plugin-oriented programs, too.



I'm wondering, given the fact quite nobody uses the '<<' form, would it be possible to convert the '<<=' behaviour to '<<'?


David


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bug in Core06.cpp or in U++ Core value types tutorial
Next Topic: operator< for container sorting (small confusion)
Goto Forum:
  


Current Time: Tue Jul 15 02:12:25 CEST 2025

Total time taken to generate the page: 0.03846 seconds