You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I presume that the proposed function pointers would point to the "event-handler" functions. This is problematic for several reasons.
First, the handling of an event depends on both the signal and the state of the receiving active object, so only one "event handler" won't do.
Second, the same event can be handled differently by different active objects, so again, one "event handler" won't do.
Third, the "event handler" function in general needs to access some additional data. This data is typically encapsulated inside the receiving active object. So, such a function would need to have access to such data.
Signal is implemented now as uint16_t.
So you need a big switch in dispatch() function to handle each signal and downcast<> template.
Signal could be implemented as function pointer
void(*)()
or even as a structthus dispatch function will need to just call func(arg) without need to handle big switch operator
The text was updated successfully, but these errors were encountered: