Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

15
  • Sorry, I still can't say I see how imageHandler is constructed. Can you show me the line of code where it's happening? Commented Jul 23, 2017 at 15:08
  • @CandiedOrange Now, you should see that in query. Query edited. Hope it clarifies Commented Jul 23, 2017 at 15:09
  • if imagehandlers[10] is your construction code I need to know where that is and what else is going on there. I need context. Commented Jul 23, 2017 at 15:14
  • @CandiedOrange extern imageHandler *imagehandlers[]; in handlers.h, imagehandlers is array of structure of pointers(vtable). Each element of array, houses behavior code Commented Jul 23, 2017 at 15:19
  • 1
    Don't pay too much attention to any definition of dependency injection. Long before this term became popular, image processing frameworks and applications used the exact same thing, called plug-ins. It is not always necessary to have a configuration file. Just having a file present in a directory (a library) with the correct types inside is usually enough for it to be dynamically loaded, and an instance installed in the application or framework. Commented Jul 26, 2017 at 16:37