A
Andrea Crotti
So I have to handle an event and I have a function like
void handleEvent(int type)
(and I can't modify this prototype).
Now I had an ENUM for keeping the events, but it turns out that I need
to generate many more events, and have a function to generate the event
number.
So should I still keep the enum?
If yes I would need a starting point to begin with my own generated
events.
Is it possible to get the max of an ENUM?
(In theory I can just take the last of course, but suppose that I might
add many more.)
void handleEvent(int type)
(and I can't modify this prototype).
Now I had an ENUM for keeping the events, but it turns out that I need
to generate many more events, and have a function to generate the event
number.
So should I still keep the enum?
If yes I would need a starting point to begin with my own generated
events.
Is it possible to get the max of an ENUM?
(In theory I can just take the last of course, but suppose that I might
add many more.)