[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: libltdl examples
From: |
Bob Friesenhahn |
Subject: |
RE: libltdl examples |
Date: |
Fri, 30 Dec 2005 15:32:59 -0600 (CST) |
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
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
- Re: libltdl examples, (continued)
- Re: libltdl examples, Howard Chu, 2005/12/29
- Re: libltdl examples, Kurt Roeckx, 2005/12/29
- RE: libltdl examples, Eric Lemings, 2005/12/30
- RE: libltdl examples, Eric Lemings, 2005/12/30
- RE: libltdl examples, Eric Lemings, 2005/12/30
- RE: libltdl examples,
Bob Friesenhahn <=