Jim Smith wrote: > I would like to get some opinions on this template class interface. Will I > run into problems deriving from type IOPolicy? Would Containment be a better > approach instead of inheritance?
I am in favor of policy-based design: I code almost everything to an interface. What you describe here is really the Strategy design pattern, just used slightly differently than normal (changing performance instead of function). Ask yourself what a user of the class needs from it. Does the user care how the implementation does its job, or just that you pass in input and get a given output? Do the steps in between matter? Will you have more than one viable implementation? I think you are fine, but that is just because I use this pattern almost every day :-) -- John Gaughan http://www.jtgprogramming.org/
