next up previous
Next: Error Messages Up: Notes on using the Previous: Demangling the template names

Checking in your templates

When code is checked in, the templates entries should be added to the relevant system/test template instantiation file:

   .../code/{aips,trial}/implement/\_ReposFiller/templates
if the templates are associated with an application or
   .../code/{aips,trial}/implement/yourModule/test/templates
if the templates are associated with a test program. gif

Be very careful when adding your templates to the system file as any duplication of the indent. number between your added templates and the already defined ones will cause the next system rebuild to fail (a sure way to become popular). Mark Calabretta suggests:

``When you add idents to the system templates file you should always run 'reident' before checking it back in. A good strategy is to give your new entries a 0000 ident.''

A question that is often asked is ``when do I put a template in the aips package and when do I put it in the trial package?''. If any template required for an application uses code (.cc or .h files) only from the aips package it should go in the aips/implement/_Reposfiller/template file. If it uses anything from the trial package it should go in the trial/implement/_Reposfiller/template template file. This avoids the problem of having undefined symbols when some purely aips templates are defined in the trial library (at the expense of having a larger than necessary aips library).

Pure aips templates that are needed for test programs in the aips package should still be in aips/implement/yourModule/test/templates. The aips test programs should not rely on anything in trial, they are not linked against the trial libraries, and should not use any templates from the trial package.

Any templates (pure aips or involving trial) that are needed for test programs in the trial package should still be in the trial/implement/yourModule/test/templates file. This may mean that you may have to use the EXTRA_PGMRLIBS flag when compiling these test programs, although we will attempt to automate this.

You should also ensure that the templates you are adding to the system are not defined alsewhere. Duplicate templates lead to link time errors on many systems (eg. Dec Alpha). The policy for checking for duplicates is:

Brian Glendenning has a tool that can automatically check for template duplicates. It is checked into the system and information on how to use it can be obtained by typing duplicates -help


next up previous
Next: Error Messages Up: Notes on using the Previous: Demangling the template names

Ralph Marson
Wed Aug 28 17:15:27 MDT 1996