Show in Contents

Add to Favorites

Home: Alias Help
Using the API

Using the API

Determining the Position of an Instance
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.