-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signal implementation #4
Comments
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. |
This issue is closed as not viable to implement. |
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: