fgen.wrapping_strategies

fgen.wrapping_strategies#

Wrapping strategies

Different Fortran types need different strategies for wrapping. We capture these here.

fgen.wrapping_strategies.array_deferred_size

Wrapping strategy for arrays of a deferred size

fgen.wrapping_strategies.character

Wrapping strategy for characters (strings in Python world)

fgen.wrapping_strategies.character_deferred_size

Wrapping strategy for characters with a deferred size (i.e.

fgen.wrapping_strategies.default

Wrapping strategy for everything that isn't covered elsewhere, i.e. the default.

fgen.wrapping_strategies.derived_type

Wrapping strategy for derived types

fgen.wrapping_strategies.enum

Wrapping strategy for enum types

fgen.wrapping_strategies.information_injection

Information injection functions

fgen.wrapping_strategies.interface

Interface definition for wrapping strategies

fgen.wrapping_strategies.logical

Wrapping strategy for logicals (booleans in Python world)

fgen.wrapping_strategies.passing_to_fortran_steps

Data model for how we pass data from Python to Fortran

fgen.wrapping_strategies.receiving_from_python_steps

Data model for how we receive data from Python in Fortran

fgen.wrapping_strategies.type_annotations

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) – FortranDataType for which to get the wrapping strategy

Returns:

fgen.wrapping_strategies.interface.WrappingStrategyLike – Wrapping strategy object