Sharing Code Between OpenModel and OpenAlias
In some cases it might be desirable to share code between OpenModel applications and OpenAlias. Since both are based on the same API (with minor variations necessitated by their different uses) careful coding can result in most code being shared between OpenModel applications 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 only do 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.
[email protected]
Copyright © 1998, Alias|Wavefront, a division of Silicon Graphics Limited. All rights
reserved.