fgen.wrapping_strategies#
Wrapping strategies
Different Fortran types need different strategies for wrapping. We capture these here.
Wrapping strategy for arrays of a deferred size |
|
Wrapping strategy for arrays of derived types |
|
Wrapping strategy for arrays of derived type of a deferred size |
|
Wrapping strategy for characters (strings in Python world) |
|
Wrapping strategy for characters with a deferred size (i.e. |
|
Wrapping strategy for everything that isn't covered elsewhere, i.e. the default. |
|
Wrapping strategy for derived types |
|
Wrapping strategy for enum types |
|
Information injection functions |
|
Interface definition for wrapping strategies |
|
Wrapping strategy for logicals (booleans in Python world) |
|
Data model for how we pass data from Python to Fortran |
|
Data model for how we receive data from Python in Fortran |
|
Helpers for type annotations |
get_wrapping_strategy#
- get_wrapping_strategy(fortran_data_type)[source]#
Get wrapping strategy for a given
FortranDataType- Parameters:
fortran_data_type (
fgen.fortran_parsing.FortranDataType) –FortranDataTypefor which to get the wrapping strategy- Returns:
fgen.wrapping_strategies.interface.WrappingStrategyLike– Wrapping strategy object
get_character_wrapping_strategy#
- get_character_wrapping_strategy(fdt)[source]#
Get wrapping strategy, given we know the Fortran data type is a character
- Parameters:
fdt (
fgen.fortran_parsing.FortranDataType) – Fortran data type- Returns:
fgen.wrapping_strategies.interface.WrappingStrategyLike– Wrapping strategy
get_array_wrapping_strategy#
- get_array_wrapping_strategy(fdt)[source]#
Get wrapping strategy, given we know the data type is an array
- Parameters:
fdt (
fgen.fortran_parsing.FortranDataType) – Fortran data type- Returns:
fgen.wrapping_strategies.interface.WrappingStrategyLike– Wrapping strategy