Share

Sharing Code between OpenModel and OpenAlias

With careful coding, you can share code between OpenModel and OpenAlias plug-ins.

To simplify code sharing, you can:

  • limit an application’s main() and a plug-in’s plugin_init() (described later) to do only initialization.
  • Pool common code between the OpenModel and OpenAlias routines into a ‘utility’ library. This could be accessed by either the main() routine (in OpenModel) or by the main function in the OpenAlias plug-in. This helps to avoid the heavy use of #ifdef’s in the source code.

Was this information helpful?