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 » partial parametrizing of Callback<>
partial parametrizing of Callback<> [message #27408] Thu, 15 July 2010 21:33 Go to previous message
kohait00 is currently offline  kohait00
Messages: 936
Registered: July 2009
Location: Germany
Experienced Contributor
hi folks,

imagine i want to do the following

void MyCallback::Action(int i, float f)
{
	RLOG("" << i << " " << f);
}

void MyCallback::Test()
{
	Callback1<int> cb;
	cb = callback2(this, &CLASSNAME::Action, 1.0f); //latter param already specified
	cb(123); //first parameter specified now
}


partially specify the arguments to the callback, the rest specify later.

would it be possible with callbacks (i imagine one needs to extend the template generators for that)?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Strange crash connected to Timer
Next Topic: PROPOSAL: delegate like separation of method and args in Callbacks
Goto Forum:
  


Current Time: Sun Apr 11 08:24:59 CEST 2021

Total time taken to generate the page: 0.01060 seconds