On Fri, 30 Dec 2005, Eric Lemings wrote:
I'm writing a library (or collection of libraries really) that has a "front end" interface library and several "back end" implementation libraries. The front end basically has a single point of entry: a factory method that accepts a string that identifies a particular back end. The back end library is then dynamically loaded and used to create the appropriate environment object. Note, multiple back ends can be in use at the same time.
Sounds great. So you can have the method you locate be a "factory" method which constructs an object derived from a common base class. Once you have a returned object, you can just use all of its methods.
Typically you want to have a way to map the string into a module name. Usually this can be done via simple concatenation. If multiple strings can map to the same module, then more smarts are required.
Bob ====================================== Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool