Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Plugin system

Name: Anonymous 2005-07-31 22:10

How would you write a plugin system for an image-processing application where one plugin is "dependant" on another plugin? For example I have an histogram plugin who has to call the grayscale plugin before showing the histogram. I could hard-code the grayscale function but it's ugly and I would have to do the same for a lot of other plugins.

I'm writing this in Qt (Trolltech) and C++, and I use the QLibrary object (not that it really matters...)

Name: Anonymous 2005-08-02 2:46

For the more rigorous:

A is empty, B is an initial list of plugins.

while B is not empty
  Pop X off B.
  If X exists in A, go to next iteration.
  Load X.
  Append X to A.
  Push X.dependencies to B.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List