Use templating to reduce number of generated wrapper files. Many wrappers only vary in template arguments and the rest of the code is exactly the same.
The first requires separate wrappers to be created for AbstractCellPopulation2_2 and AbstractCellPopulation3_3. Counting hpp and cpp, this generates 4 files.
The second requires a single templated wrapper to be created for AbstractCellPopulation. This would only generate 2 files regardless of the number of different sets of template arguments required. This approach would only need each set of arguments to be explicitly instantiated.
Description
Use templating to reduce number of generated wrapper files. Many wrappers only vary in template arguments and the rest of the code is exactly the same.
For example, the aim would be to refactor this
into this:
The first requires separate wrappers to be created for
AbstractCellPopulation2_2
andAbstractCellPopulation3_3
. Counting hpp and cpp, this generates 4 files.The second requires a single templated wrapper to be created for
AbstractCellPopulation
. This would only generate 2 files regardless of the number of different sets of template arguments required. This approach would only need each set of arguments to be explicitly instantiated.