When linking the aips++ system will have a large number of template instantiations already done for you. However there may be some template instantiations you will have to create for yourself. This is done with a personal template instantiation list. To do this create a file called templates. This should be in the directory containing the test program for the class you are currently working on. gmake will see this file and ``knows'' how to create the templates you have specified.
The templates file should contain entries like:
0010 trial/Arrays/Convolver.cc template class Convolver<Float, Complex> 1000 aips/Arrays/ArrayMath.cc template operator*(const Array<Float> &, const Float &)
The entries are:
Templates that are used by the test programs should not be put in the system file (unless there is an overriding reason), but stored in separate templates files that exist in the test directories. This keeps the aips++ libraries at a manageable size and avoids excessive link times.
If your templates file is getting long and unmanageable there is a utility
called reident to sort/uniq, re-sequence and
``canonicalise'' the templates file.
In the default mode reident will check if there are duplicates and if
necessary changes idents to ensure they're all unique. Idents of 0000 are
always replaced.
Its output is always to the file called templates (and input and output can be the same file) so I usually type
reident templateswhere I have already appended my changes to an already existing file called templates.
reident can also merge multiple template files together so that
reident templates templates.additionswill merge both input files into the output file.
The shell comment character # can be used to comment entries in your templates file.