FEDEM Solver  R8.0
Source code of the dynamics solver
Macros
FFaFortran.H File Reference

Macros to aid cross-language linkage between C/C++ and Fortran. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define f90_int8   long
 Integer type corresponding to the Fortran integer kind kindmodule::i8. More...
 
#define f90_int   int
 Integer type corresponding to the default Fortran integer kind. More...
 
#define ptr_int   int
 Integer type used in type casting to/from C/C++ pointers and Fortran. More...
 
#define F90_NAME(name, NAME)   name##_
 Macro for portable handling of name conventions in mixed C/C++/Fortran. More...
 
#define _CPFX
 Defines the C++ linkage type on Windows. More...
 
#define F90_FUNCTION(type, name, NAME)   type _CPFX F90_NAME(name,NAME)
 Macro for portable handling of linkage in mixed C/C++/F90 calls. More...
 
#define SUBROUTINE(name, NAME)   F90_FUNCTION(void,name,NAME)
 Macro for declaration for Fortran subroutines in C/C++. More...
 
#define PTR_FUNCTION(name, NAME)   F90_FUNCTION(void*,name,NAME)
 Macro for declaration for Fortran pointer functions in C/C++. More...
 
#define INTEGER_FUNCTION(name, NAME)   F90_FUNCTION(f90_int,name,NAME)
 Macro for declaration for Fortran integer functions in C/C++. More...
 
#define REAL_FUNCTION(name, NAME)   F90_FUNCTION(float,name,NAME)
 Macro for declaration for Fortran real functions in C/C++. More...
 
#define DOUBLE_FUNCTION(name, NAME)   F90_FUNCTION(double,name,NAME)
 Macro for declaration for Fortran double functions in C/C++. More...
 

Detailed Description

Macros to aid cross-language linkage between C/C++ and Fortran.

Macro Definition Documentation

◆ _CPFX

#define _CPFX

Defines the C++ linkage type on Windows.

◆ DOUBLE_FUNCTION

#define DOUBLE_FUNCTION (   name,
  NAME 
)    F90_FUNCTION(double,name,NAME)

Macro for declaration for Fortran double functions in C/C++.

◆ F90_FUNCTION

#define F90_FUNCTION (   type,
  name,
  NAME 
)    type _CPFX F90_NAME(name,NAME)

Macro for portable handling of linkage in mixed C/C++/F90 calls.

◆ f90_int

#define f90_int   int

Integer type corresponding to the default Fortran integer kind.

◆ f90_int8

#define f90_int8   long

Integer type corresponding to the Fortran integer kind kindmodule::i8.

See also
kindModule.f90

◆ F90_NAME

#define F90_NAME (   name,
  NAME 
)    name##_

Macro for portable handling of name conventions in mixed C/C++/Fortran.

Since there is no way(?) to translate a lowercase string into an uppercase string through preprocessor macros, we must specify both the lower- and uppercase version of the name.

◆ INTEGER_FUNCTION

#define INTEGER_FUNCTION (   name,
  NAME 
)    F90_FUNCTION(f90_int,name,NAME)

Macro for declaration for Fortran integer functions in C/C++.

◆ PTR_FUNCTION

#define PTR_FUNCTION (   name,
  NAME 
)    F90_FUNCTION(void*,name,NAME)

Macro for declaration for Fortran pointer functions in C/C++.

◆ ptr_int

#define ptr_int   int

Integer type used in type casting to/from C/C++ pointers and Fortran.

See also
pointerkindmodule in FFrExtractorInterface.f90

◆ REAL_FUNCTION

#define REAL_FUNCTION (   name,
  NAME 
)    F90_FUNCTION(float,name,NAME)

Macro for declaration for Fortran real functions in C/C++.

◆ SUBROUTINE

#define SUBROUTINE (   name,
  NAME 
)    F90_FUNCTION(void,name,NAME)

Macro for declaration for Fortran subroutines in C/C++.