LLNL / shroud

Shroud: generate Fortran and Python wrappers for C and C++ libraries
BSD 3-Clause "New" or "Revised" License
91 stars 7 forks source link

Create language specific meta-attributes #338

Closed ltaylor16 closed 8 months ago

ltaylor16 commented 8 months ago

Creating a user callable C wrapper will require different args than a Fortran callable C wrapper. For example, std::vector will need an explicit length argument that Fortran can provide via the intrinsic size. This will be done with a new statement group but it will require a different +api meta attribute than Fortran uses (like cdesc)

This merge request creates a FunctionNode._bind[wlang][name] dictionary to hold statement.Bind instances.

Replaces use of the declarator.metaattrs field mostly. Python and Lua still use the current metaattrs.

The arg_to_buffer and arg_to_CFI functions have been removed. Instead the original FunctionNode can be wrapped as both C and Fortran since there is a binding specific metaattrs.