Glossary

bufferify

The process of creating a buffer. The C wrapper may create an additional function for each wrapped function. This function has additional arguments needed for the Fortran interface to pass the metadata of the argument such as the size.

C wrapper

The wrapper with a C API. When wrapping C++, the C wrapper will be C++ code but functions will use extern "C" block to allow them to be called from C and Fortran using the bind(C) keyword.

capsule

Struct to hold a pointer to a C++ class instance and some memory management flags. The name was inspired by the Python PyCapsule type.

cdesc

Struct used to contain information used to describe memory. The address, type, shape, element size. Similar to CFI_desc_t from Fortran’s Further Interoperability with C.

CFI

C Fortran Interface defined by the Further interoperability of Fortran with C features of TS29113 and Fortran 2018.

flatten

The process of converting a nested name such as namespace::class::method into a name acceptable to Fortran and C such as namespace_class_method.

Fortran wrapper

Fortran functions which call the C wrapper functions.

helper function

A function used by Shroud to factor out common functionality from wrappers.

library

A collection of C++ declarations wrapped at the same time. This creates a Fortran or Python module.

name mangling

A technique used to solve various problems caused by the need to resolve unique names for programming entities in many modern programming languages. – wikipedia

Shroud creates unique name for C++ namespaced, overloaded and templated function by adding additional components to the C and Fortran names to make them unique.

native type

numeric type, intrinsic. Integer or real of any size.

POD

Plain Old Data.

shadow class

A Fortran derived type which contains a capsule and type-bound procedures to provide a Fortran object-oriented interface similar to a C++ class. Also known as a proxy class. Similar to a PyObject struct in Python.

splicer

A block of code which implements the wrapper. It is generated by Shroud but can be replaced with a user provided implementation. A splicer also provides a place to insert code into a generated file a well defined places. This allows user provided code to be preserved when regenerating wrappers.

statements

A data structure used to describe how a function argument will be wrapped. Described in Statements chapter.

typemap

A data structure used to describe how to wrap a C/C++ type. Described in Typemaps chapter.