[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Messaging system update .... soon ;)
Hi all,
The Gtk-- team is currently working to make the signal/slot system handle return values correctly. The mods should appear
somewhere around version 0.9.6 (seems as if they have some problems making it work correctly with the Gtk+ signal interface).
IŽll incorporate the changes into our system ASAP.
For the curious here - it will look somehow like this:
-------------------------
template <class rettype>
class DecisionMaker
{
public:
virtual bool CallNext (rettype PreviousRetVal) = 0;
rettype RetVal (void) = 0;
};
class MyDecider : public DecisionMaker <int>
{
private:
int RetValUpToNow;
public:
bool CallNext (int RV)
{
RetValUpToNow += RV;
return ((RV > 50) ? true : false);
}
int RetVal (void)
{ return RetValUpToNow; }
};
rettype ppMessage0::call (...)
{
while (anotherHandlerExists)
{
if (!Decider.CallNext (Handler ()))
return (Decider.RetVal ());
}
}
-----------------------------
Cu
Christian