I've updated the git-hub repository.
Now, the signals and slots must be objects of type FastDelegate, a FastDelegate object encapsulate a pointer to a function of any type (excepts anonymous function I haven't finish all code implementation yet), and functions arguments.
The fast delegates are the benefits to be faster and to allow you to pass derived objects properly by casting a derivate object pointer to a base object before calling the virtual member function of a base class.
It avoids to have to call directly the virtual member function of the base class on an object of a derived class whith the operator ->, the code may be unportable and the behaviour can be undefined when the base class inherits from several classes with a virtual inheritance. (and also if thoses classes have abstract virtual functions)
The delegate'll be even introduced in next C# version it seems.
To create a FastDelegate object you have just to past the return type of the function pointer as a tempalte argument and the adress of the function to call.
Like this :
FastDelegate<bool> delegate(&MyCall::MyFunction);
Don't forget to pass the arguments to the functions before calling it if the function takes argument, and, the object if it's a member function : (Otherwise it result to a crash, it's the inconvenient of the using of tuples but the advantages are powerfull because the code is generate at the compilation time and the function call result to only 2 ASM instructions.)
delegate.setParams(object, argument1, ...);
And you have just to class the operator() to execute the function :
delegate();
Later you'll be able to pass default arguments when you'll create the delegate the defautl arguments well be set in a tuple, and be concataned with another tuple that contains arguments passed before calling the delegate. (And a placeholder system maybe'll be avalaible in a next version if I can do this technique with tuples (and not with std::bind any more))
The actions can know have a signal function, I can't use the emit key word here because this feature is only avalaible in Qt, so, the alternative is to pass a FastDelegate object which a pointer to a function whiwh return true or false if the signal is triggered. (This function is called a trigger function)
With the new system we can call a slot if one or more sf::event and a trigger function are triggered.
A system like the java listener'll be implemented later with the guis components in the next version. (I'll certainly take example on the source code of sf::GUI.
)
It should rox. (And I'll finally have a framework which guis, opengl and sfml are compatible. (This is not the case with the actuals games framework so it's also why I've decided to create ODFAEG.)
I've also tried with java and JOGL, but JOGL and java classes weren't very compatible, it was resulting to thread concurrent exception most of the time.
This is not the case with ODFAEG.
I'm happy to have finally found a solution to my problems. (But know I'have to reimplementing all)