
Andreas Huber wrote: [snip]
This would obviously be handled better with a map of some sort (has to map int to function). The problem here is that some functions have more arguments than others, precluding the possibility of uniform type for the function value of the map. I cannot just go and change the function sig to include dummy values ('cause it's a dumb idea). This situation made me think of boost.function/boost.bind, which allows to effectively shorten the function parameter list by binding some of the args. I admit I'm not familiar with this, but another method used to simulate a virtual function table with different arg lists was discussed in comp.std.c++ under subjects headings:
From: brangdon@cix.co.uk (Dave Harris) Newsgroups: comp.std.c++ Subject: Re: Proposal for Interfaces (version 3.0) Date: Mon, 26 Apr 2004 16:59:05 +0000 (UTC) From: dave@boost-consulting.com (David Abrahams) Newsgroups: comp.std.c++ Subject: Re: Proposal: interfaces [repost] Date: Mon, 26 Apr 2004 01:53:05 +0000 (UTC)