Summary
Currently template_substitutions need to be added to the yaml configuration to generate wrappers for each explicit instantiation of a class.
For example, Foo will need the yaml configuration below to generate wrappers for Foo<1>, Foo<2> and Foo<3>
Foo.hpp
template<unsigned SPACE_DIM>
class Foo {...}
Foo.cpp
...
template class Foo<1>;
template class Foo<2>;
template class Foo<3>;
config.yaml
...
template_substitutions:
- signature: <unsigned SPACE_DIM >
replacement: [[1], [2], [3]]
This configuration is needed because castxml only parses headers to extract the interface, but template instantiations are normally in cpp files.
One possible way to automate the discovery of template instantiations might be to add custom parsing logic in addition to the functionality provided by castxml.
Summary
Currently
template_substitutionsneed to be added to the yaml configuration to generate wrappers for each explicit instantiation of a class.For example,
Foowill need the yaml configuration below to generate wrappers forFoo<1>,Foo<2>andFoo<3>Foo.hppFoo.cppconfig.yamlThis configuration is needed because
castxmlonly parses headers to extract the interface, but template instantiations are normally incppfiles.One possible way to automate the discovery of template instantiations might be to add custom parsing logic in addition to the functionality provided by
castxml.