f90wrap
f90wrap copied to clipboard
Abstract classes
Looks like abstract classes are not parsed properly. The code snippet
type, abstract :: shapes
integer :: shapetype = 0
end type
is parsed as type(abstract) instead of an abstract type(shapes). However, since this is an abstract class, the f90wrap_shapes__get__shapetype(this, shapetype) subroutine would probably have to be handled differently.
If the abstract class is not required in Python, looks like moving f90wrap_shapes__get__shapetype(this, shapetype) to classes that extend the abstract class is sufficient. Maybe a pre-processor that copies everything in the abstract class to it's child class would be the easiest solution.
That's correct, there's currently no support for any Fortran 2003 features. Mapping the abstract types to either standard Python classes or abstract base classes and then specifying the correct inheritance in the Python classes wrapped around the concrete Fortran derived types would be the best solution, and probably wouldn't be any more work than pre-processing.