Summary
Custom type-caster headers (e.g. for PETSc, VTK and Ublas types) currently need to be added in manually per class via source_includes in the yaml configuration file. If a class uses a type that needs translating by a type-caster, forgetting to include the relevant header in config results in runtime errors.
It would make configuration easier if we could automatically detect which classes need type-casters and automatically include the relevant header. For example, we could provide a key to describe which type-caster headers are required for certain types:
typecasters:
- header: caster_petsc.h
types: [Vec, Mat]
- header: PybindVTKTypeCaster.h
types: [vtkSmartPointer, vtkObject]
- header: PybindUblasTypeCaster.hpp
types: ["boost::numeric::ublas::vector", "boost::numeric::ublas::c_vector"]
If a class has any methods which have one of these types in args, the relevant type-caster header should be included in its wrapper automatically.
Summary
Custom type-caster headers (e.g. for PETSc, VTK and Ublas types) currently need to be added in manually per class via
source_includesin the yaml configuration file. If a class uses a type that needs translating by a type-caster, forgetting to include the relevant header in config results in runtime errors.It would make configuration easier if we could automatically detect which classes need type-casters and automatically include the relevant header. For example, we could provide a key to describe which type-caster headers are required for certain types:
If a class has any methods which have one of these types in args, the relevant type-caster header should be included in its wrapper automatically.