The object oriented way of doing things seems to be: define a base class with pure virtual functions in it, and then define various inherited versions of this base class which implement the functionality of the base class in various different ways.