Re: to be effcient or not to be efficient
Steve Lhomme <[email protected]>
| Newsgroups | gmane.comp.multimedia.media-api |
|---|---|
| Message-ID | <[email protected]> |
Toby Hudon wrote: >>Who ever does a switch over a few hundred cases in a time >>critical application shuld be shot anyways. There are >>ways to handle this effciently. >> > > > then in each subclass implement the virtual function which the orignial function call calls in place of the switch, so that your code is dependant on which subclass is being passed to the calling function. Mmmm, but how do you chose which class to instanciate when you receive the message ? You need a switch... (otherwise you're talking about passing objects directly which is not an option)