Delegate system for member function pointers

I am using it myself right now, so a fully working example wouldnt be a problem. I've also rewrote the SimpleTimer lib from Author: mromani@ottotecnica.com using this system and some other advantages.

I'll make it a arduino lib with an example attached and post it for download in this thread. I'll try to get this done before the weekend.

@westfw: its for member function pointers, a simple function pointer wouldnt need a delegate system ofcourse. Although my current setup does all the magic in the background so you could easily throw in a simple function pointer or get more freaky and use a delegate for a member function pointer like so:

//no class
void simple_function(){
//do something
}

timerlib.setTimer(30000, simple_function, 0);

//within another class
delegate d = MakeDelegate(this, &BigClass::someFunction);

timerlib.setTimer(30000, d, 0);

With no changes in the timerlib object. This is ussually a hackle because non-member functions dont get a this operator, where member functions do get these. If your this operator gets screwed the called function has no clue whats going on in its own class/object.

But, I'll get back on this thread with some descent examples so its all getting a little clearer.