public class Fortran extends java.lang.Object implements CodeConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
s_ensure |
static java.lang.String |
s_exception
The argument name that holds the exception pointer which a method may
throw an exception.
|
static java.lang.String |
s_privateSuffix
Our suffix used by private procedures
|
static java.lang.String |
s_return
The dummy argument name for return values.
|
static java.lang.String |
s_self
The argument name that holds the object/interface pointer in
a call to an object method.
|
C_AUTO_GEN_SPLICER, C_AUTO_GEN_WARNING, C_BACKSLASH, C_BEGIN_UNREFERENCED_METHODS, C_COMMENT_CLOSE, C_COMMENT_DOC_OPEN, C_COMMENT_F77, C_COMMENT_F90, C_COMMENT_HASH, C_COMMENT_OPEN, C_COMMENT_SLASH, C_COMMENT_SUBSEQUENT, C_DEFINE, C_DESC_CJNI_PREFIX, C_DESC_FSKEL_PREFIX, C_DESC_HEADER_PREFIX, C_DESC_IMPL_PREFIX, C_DESC_IOR_PREFIX, C_DESC_SJNI_PREFIX, C_DESC_SKEL_PREFIX, C_DESC_STUB_PREFIX, C_END_UNREFERENCED_METHODS, C_F03_ALT_SUFFIX, C_F03_BINDC_SUFFIX, C_F03_IMPL_EXTENSION, C_F03_IMPL_METHOD_SUFFIX, C_F03_METHOD_SUFFIX, C_F03_VERSION, C_F77_IMPL_EXTENSION, C_F77_IMPL_METHOD_SUFFIX, C_F77_METHOD_SUFFIX, C_F77_VERSION, C_F7731_IMPL_EXTENSION, C_F90_ALT_SUFFIX, C_F90_IMPL_EXTENSION, C_F90_IMPL_METHOD_SUFFIX, C_F90_METHOD_SUFFIX, C_F90_VERSION, C_FORTRAN_DESC_STUB_PREFIX, C_FORTRAN_IMPL_MODULE_PREFIX, C_FORTRAN_MODULE_PREFIX, C_FORTRAN_TYPE_MODULE_PREFIX, C_GUARD_CLOSE, C_GUARD_OPEN, C_HASH, C_IFDEFINE_CLOSE, C_IFDEFINE_CXX, C_IFDEFINE_OPEN, C_INCLUDE, C_INSERT_HERE, C_INT_BACKSLASH, C_IS_IMPL, C_IS_NOT_IMPL, C_SLASH, C_UNREFERENCED_COMMENT1, C_UNREFERENCED_COMMENT2, C_UNREFERENCED_COMMENT3, C_UTILITY_HEADER_PREFIX, C_UTILITY_SOURCE_PREFIX, MATLAB_COMMENT_OPEN
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
arrayIndices(java.util.List indices,
java.lang.String indexExprPrefix) |
static java.lang.String |
arrayIOR(Context context) |
static Method |
connectRemoteMethod(Extendable ext,
Context context,
boolean isF90) |
static Type |
convertRarrayToArray(Type array,
Context context) |
static Method |
createCast(Context context,
SymbolID id) |
static Method |
createCastTwo(Context context,
SymbolID id) |
static Method |
createRemoteMethod(Extendable ext,
Context context,
boolean isF90) |
static void |
declareIndices(java.util.Map indexMap,
LanguageWriterForFortran d_lw,
Context d_context)
Emits declarations for rarrays indices
|
static java.util.Set |
generateStubIncludes(LanguageWriterForC writer,
Extendable ext)
Generates include directives for all the Babel clases used in this
fortran stub or skel
|
static java.lang.String |
getAltBindCName(SymbolID id,
Method method,
Context context)
Returns the name of a Fortran method for the ISO BIND(C) extension.
|
static java.lang.String |
getAltBuiltinName(int index,
boolean isStatic)
Get the built-in function name without the leading underscore.
|
static java.lang.String |
getAltStubName(SymbolID id,
Method method,
Context context)
Get the function name that should be used for the FORTRAN stubs to the
sidl object methods.
|
static java.lang.String |
getAltSuffix(Context context)
Return the appropriate FORTRAN alternative stub name.
|
static java.lang.String |
getArgumentString(Type type,
Context context,
boolean typeInStruct)
Return the FORTRAN type declaration corresponding to
type ,
a particular sidl type. |
static java.lang.String |
getArrayBindCdeclFile(SymbolID id) |
static java.lang.String |
getArrayConstructor(SymbolID id,
Context context)
Generate the name of the array constructor function.
|
static java.lang.String |
getArrayDestructor(SymbolID id,
Context context)
Generate the name of the array destructor function.
|
static java.lang.String |
getArrayDimen(SymbolID id,
Context context)
Generate the name of the array dimension access function.
|
static java.lang.String |
getArrayFile(SymbolID id,
Context context) |
static java.lang.String |
getArrayGet(SymbolID id,
Context context)
Generate the name of the array get element function.
|
static java.lang.String |
getArrayGet(SymbolID id,
int numArgs,
Context context)
Generate the name of the array get element function.
|
static java.lang.String |
getArrayLength(SymbolID id,
Context context)
Generate the name of the array length access function.
|
static java.lang.String |
getArrayLower(SymbolID id,
Context context)
Generate the name of the array lower bound access function.
|
static java.lang.String |
getArrayModule(SymbolID id,
Context context) |
static java.lang.String |
getArrayName(SymbolID id,
int dim) |
static java.lang.String |
getArraySet(SymbolID id,
Context context)
Generate the name of the array set element function.
|
static java.lang.String |
getArraySet(SymbolID id,
int numArgs,
Context context)
Generate the name of the array set element function.
|
static SymbolID |
getArraySymbolID(Type t,
Context d_context)
Return the SymbolID associated with an array type
|
static java.lang.String |
getArrayUpper(SymbolID id,
Context context)
Generate the name of the array upper bound access function.
|
static java.lang.String |
getBindCEPVTypeName(SymbolID id,
boolean doStatic)
Returns the name of a Fortran type that is interoperable with Babel's C EPV
|
static java.lang.String |
getBindCFieldType(Type type)
Returns the Bind(C) Type corresponding to the given SIDL type
|
static java.lang.String |
getBindCName(SymbolID id,
Method method,
Context context)
Returns the name of a Fortran method for the ISO BIND(C) extension.
|
static java.lang.String |
getBindCPostEPVTypeName(SymbolID id,
boolean doStatic)
Returns the name of a Fortran type that is interoperable with Babel's C EPV
|
static java.lang.String |
getBindCPreEPVTypeName(SymbolID id,
boolean doStatic)
Returns the name of a Fortran type that is interoperable with Babel's C EPV
|
static java.lang.String |
getBindCProxyName(java.lang.String name)
Contruct the name for a BindC Proxy variable
(adds a
ptr_ prefix and sanitizes
special characters |
static java.lang.String |
getBindCRarrayShape(Type type)
Computes a shape array for the given rarray suitable for a call to
c_f_pointer.
|
static java.lang.String |
getBindCReturnType(Type type)
Returns the Bind(C) Type corresponding to the given SIDL type
|
static java.lang.String |
getBindCSkelName(SymbolID id,
Method method,
Context context)
Returns the name of a Fortran method skeleton for the ISO BIND(C) extension.
|
static java.lang.String |
getBindCType(Type type,
int mode)
Returns the Bind(C) Type corresponding to the given SIDL type
|
static java.lang.String |
getBindCType(Type type,
int mode,
boolean is_skeleton)
Returns the Bind(C) Type corresponding to the given SIDL type
|
static java.lang.String |
getDelRefArray(Type arrayType) |
static java.lang.String |
getEnsureArray(Type arrayType) |
static java.lang.String |
getEnsureArrayFunction(Type arrayType) |
static java.lang.String |
getEnumStubFile(SymbolID id)
Return the name of the stub file for a particular enumeration.
|
static java.lang.String |
getEnumStubImpl(SymbolID id)
Return the name of the stub impl file for a particular enumeration.
|
static java.lang.String |
getExtendedMethodName(SymbolID id,
java.lang.String baseName)
Return the extended function name (i.e., one with the full name
prepended).
|
static java.lang.String |
getExtendedMethodName(SymbolID id,
java.lang.String baseName,
NameMangler non,
NameMangler fort,
Context context)
Gets a possibly mangled version of the extended method name.
|
static java.lang.String |
getFortran2BindCExpr(java.lang.String expr,
Type t,
int mode)
Returns a String that translates among the usual Fortran representation
and Bind(C) equivalents.
|
static java.lang.String |
getFortranPrefix(Context context)
Return the sidl Fortran prefix for macros and types.
|
static java.lang.String |
getFortranSymbol(Context context)
Return the appropriate version of SIDLFortran##Symbol.
|
static java.lang.String |
getFortranTypeInC(Type type,
Context context)
Return the C type corresponding to the FORTRAN type corresponding to
a particular sidl type.
|
static int |
getFortranVersion(Context context)
Return the appropriate version of Fortran (i.e., 77 or 90).
|
static java.lang.String |
getfSkelFile(SymbolID id,
Context context)
Return the name of the file that holds the implementation of the
skeletons for FORTRAN.
|
static java.lang.String |
getHeaderFile(SymbolID id)
Return the name of the stub header file for a particular symbol.
|
static java.lang.String |
getImplExtension(Context context)
Return the appropriate FORTRAN extension.
|
static java.lang.String |
getImplFile(SymbolID id,
Context context)
Return the name of the file that hold the implementation of the
FORTRAN sidl object.
|
static java.lang.String |
getImplMethodSuffix(Context context)
Return the appropriate FORTRAN impl method name suffix based.
|
static java.lang.String |
getImplModule(SymbolID id) |
static java.lang.String |
getImplModuleFile(SymbolID id,
Context context)
Return the name of the file that hold the derived types for
implementation of the FORTRAN sidl object.
|
static java.lang.String |
getImplTypeName(SymbolID id) |
static java.lang.String |
getInitArray(Type arrayType) |
static java.lang.String |
getMethodFSkelName(SymbolID id,
Method method,
NameMangler non,
NameMangler fort,
Context context)
Return the Fortran function name that should be used for the skeleton
method.
|
static java.lang.String |
getMethodImplName(SymbolID id,
Method method,
NameMangler mang,
Context context)
Return the function name that should be used for the FORTRAN subroutine
that implements a particular method.
|
static java.util.List |
getMethodList(Extendable ext)
This returns the list of all methods that need to have stub methods
generated.
|
static java.lang.String |
getMethodSkelName(SymbolID id,
Method method)
Return the C function name that should be used for the skeleton
method.
|
static java.lang.String |
getMethodStubName(SymbolID id,
Method method,
Context context)
Get the function name that should be used for the FORTRAN stubs to the
sidl object methods.
|
static java.lang.String |
getMethodStubName(SymbolID id,
Method method,
NameMangler non,
NameMangler fort,
Context context)
Get the function name that should be used for the FORTRAN stubs to the
sidl object methods.
|
static java.lang.String |
getMethodSuffix(Context context)
Return the appropriate FORTRAN method name suffix based on the version.
|
static java.lang.String |
getMethodSuperImplName(SymbolID id,
Method method,
NameMangler mang,
Context context)
Return the function name that should be used for the FORTRAN subroutine
that implements a particular SUPER method.
|
static java.lang.String |
getMethodSuperName(SymbolID id,
Method method,
NameMangler mang,
Context context)
Get the function name that should be used for the FORTRAN super method
in the skels (availible in this Impls).
|
static java.lang.String |
getModBindCdeclFile(SymbolID id) |
static java.lang.String |
getModule(SymbolID id,
Context context) |
static java.lang.String |
getModuleFile(SymbolID id,
Context context)
Return the name of the F90 stub module file for a particular
symbol.
|
static java.lang.String |
getReturnString(Type type,
Context context,
boolean typeInStruct)
Return the FORTRAN type declaration corresponding to
type ,
a particular sidl type. |
static java.lang.String |
getSkelFile(SymbolID id)
Return the name of the file that holds the implementation of the
skeletons for FORTRAN.
|
static Method |
getStructAlloc(Struct strct,
Context context) |
static Method |
getStructDealloc(Struct strct,
Context context) |
static Method |
getStructDestroy(Struct strct,
Context context) |
static Method |
getStructGetter(Struct strct,
Struct.Item fld,
Context context) |
static Method |
getStructInit(Struct strct,
Context context) |
static java.lang.String |
getStructModuleFile(SymbolID id,
Context context)
Return the name of the file that hold the derived types for
Fortran/BindC to C/C++ interoperability.
|
static Method |
getStructRarrayAlloc(Struct strct,
Context context) |
static Method |
getStructRarrayDealloc(Struct strct,
Context context) |
static Method |
getStructSetter(Struct strct,
Struct.Item fld,
Context context) |
static java.util.Set |
getStructTypes(java.util.List arg_list)
Returns the _set_ of struct types referenced by the given argument
list.
|
static java.lang.String |
getStubDocFile(SymbolID id)
Return the name of the F77 stub documentation file for a particular
symbol.
|
static java.lang.String |
getStubFile(SymbolID id)
Return the name of the stub file for a particular symbol.
|
static java.lang.String |
getStubNameFile(SymbolID id) |
static java.lang.String |
getStubSuffix(Context context)
Returns a suffix that is appended to utility functions defined in the
Babel stub in order to avoid duplicated symbols during linking.
|
static SymbolID |
getSymbolIDforBasicType(Type basicType)
Create a new SymbolID for a basic type
|
static java.lang.String |
getSymbolName(SymbolID id)
Convert a symbol name into string with the pieces of the symbol joined
together with underline characters.
|
static java.lang.String |
getSymbolNameForFile(SymbolID id)
Convert a symbol name into string with the pieces of the symbol joined
together with underline characters.
|
static java.lang.String |
getSymbolNameForFile(SymbolID id,
boolean isImpl,
Context context)
Same as above method, but use an extra argument for determining
when the file whose name is to be generated corresponds to an impl.
|
static java.lang.String |
getTypeFile(SymbolID id,
Context context)
Return the name of the F90 type module file for a particular
symbol.
|
static java.lang.String |
getTypeModule(SymbolID id,
Context context) |
static java.lang.String |
getTypeName(SymbolID id) |
static boolean |
hasBindC(Context context) |
static boolean |
hasBindCProxy(Type t,
int mode)
Returns true if the given type requires a proxy variable for Bind(C) bindings
|
static boolean |
hasDirectAccess(Type t) |
static boolean |
isFortran(Context context) |
static boolean |
isFortran03(Context context) |
static boolean |
isFortran77(Context context) |
static boolean |
isFortran7731(Context context) |
static boolean |
isFortran90(Context context) |
static boolean |
isFortranFunction(Method m,
Context context)
Return TRUE if the type is one of the standard primitive types,
used for F03 Function return types; otherwise, return FALSE.
|
static boolean |
needsAbbrev(Context context) |
static boolean |
needsCSkel(Method m,
Context context)
Returns whether or not the given function requires a C skeleton for Fortran 2003
|
static boolean |
needsCStub(Method m,
boolean do_alternate,
Context context)
Returns whether or not the given function requires a C stub for Fortran
2003.
|
static void |
printBindC2Fortran(Type t,
java.lang.String cname,
java.lang.String name,
int mode,
boolean generateDefaultAssignment,
boolean generateEnsure,
LanguageWriterForFortran d_lw)
Emits code to convert the bindC variable
name of the type
type to the eqvivalent Fortran proxy cname |
static void |
printBindCProxyDecl(Type t,
int mode,
java.lang.String name,
LanguageWriterForFortran d_lw,
Context d_context)
Emits a Bind(C) proxy declaration
|
static void |
printFortran2BindC(Type t,
java.lang.String fname,
java.lang.String name,
int mode,
boolean generateDefaultAssignment,
boolean generateEnsure,
LanguageWriterForFortran d_lw)
Emits code to convert the Fortran proxy
fname to the
eqvivalent bindC variable name of type type . |
static void |
printIndexExprs(java.util.Map indexMap,
java.util.Map expr_map,
java.lang.String builtin,
LanguageWriterForFortran d_lw,
Context d_context)
Emits initializations for rarrays indices
|
static void |
printInitializeEmpty(Type t,
java.lang.String name,
LanguageWriterForFortran d_lw)
Emit code to initialize an empty t name
No code is generated for basic types
|
static java.util.List |
reorderArguments(java.util.List args)
Reorder an argument list to guarantee that all raw arrays occur at the
end of the argument list.
|
static java.lang.String |
structSerializeStub(SymbolID id,
boolean serialize,
Context context) |
public static final java.lang.String s_return
public static final java.lang.String s_self
public static final java.lang.String s_exception
public static final java.lang.String[] s_ensure
public static final java.lang.String s_privateSuffix
public static java.lang.String getSymbolName(SymbolID id)
id
- the symbol id to convert.public static java.lang.String getSymbolNameForFile(SymbolID id)
id
- the symbol id to convert.public static java.lang.String getSymbolNameForFile(SymbolID id, boolean isImpl, Context context)
public static SymbolID getSymbolIDforBasicType(Type basicType)
public static java.lang.String getStubFile(SymbolID id)
id
- the symbol whose stub file will be returnedpublic static java.lang.String getStubNameFile(SymbolID id)
public static java.lang.String getArrayBindCdeclFile(SymbolID id)
public static java.lang.String getModBindCdeclFile(SymbolID id)
public static java.lang.String getHeaderFile(SymbolID id)
id
- the symbol whose stub file will be returnedpublic static java.lang.String getStubDocFile(SymbolID id)
id
- the symbol whose stub documentation file will be returnedpublic static java.lang.String getModuleFile(SymbolID id, Context context)
id
- the symbol whose stub documentation file will be returnedpublic static java.lang.String getTypeFile(SymbolID id, Context context)
id
- the symbol whose stub documentation file will be returnedpublic static java.lang.String getTypeName(SymbolID id)
public static java.lang.String getImplTypeName(SymbolID id)
public static java.lang.String getImplModule(SymbolID id)
public static java.lang.String getArrayName(SymbolID id, int dim)
public static SymbolID getArraySymbolID(Type t, Context d_context)
public static java.util.List reorderArguments(java.util.List args)
args
- the incoming list of argumentspublic static java.lang.String getStubSuffix(Context context)
public static java.lang.String structSerializeStub(SymbolID id, boolean serialize, Context context)
public static java.lang.String arrayIndices(java.util.List indices, java.lang.String indexExprPrefix)
public static boolean hasDirectAccess(Type t)
public static java.lang.String getEnumStubFile(SymbolID id)
id
- the symbol whose stub file will be returnedpublic static java.lang.String getEnsureArray(Type arrayType)
public static java.lang.String getEnsureArrayFunction(Type arrayType)
public static java.lang.String getInitArray(Type arrayType)
public static java.lang.String getDelRefArray(Type arrayType)
public static java.lang.String getEnumStubImpl(SymbolID id)
id
- the symbol whose stub file will be returnedpublic static java.lang.String getSkelFile(SymbolID id)
public static java.lang.String getfSkelFile(SymbolID id, Context context)
public static java.lang.String getImplExtension(Context context)
public static java.lang.String getImplFile(SymbolID id, Context context)
id
- the name of the symbolpublic static java.lang.String getImplModuleFile(SymbolID id, Context context)
id
- the name of the symbolpublic static java.lang.String getStructModuleFile(SymbolID id, Context context)
id
- the name of the symbolpublic static java.lang.String getMethodStubName(SymbolID id, Method method, Context context)
id
- the name of the symbol who has the method.method
- information about the method to be named.public static java.lang.String getMethodStubName(SymbolID id, Method method, NameMangler non, NameMangler fort, Context context) throws CodeGenerationException
id
- the name of the symbol who has the method.method
- information about the method to be named.non
- the non-name mangler.fort
- the fortran name mangler.context
- information about the method to be named.CodeGenerationException
public static java.lang.String getMethodFSkelName(SymbolID id, Method method, NameMangler non, NameMangler fort, Context context) throws CodeGenerationException
id
- the name of the symbol who has the methodmethod
- information about the method.CodeGenerationException
public static java.util.List getMethodList(Extendable ext)
Method
objectspublic static java.util.Set getStructTypes(java.util.List arg_list)
Method
struct typespublic static java.lang.String getAltBuiltinName(int index, boolean isStatic)
index
- the index of the built-in method that is
desired (e.g., IOR.CONTRACTS).isStatic
- TRUE if the static version is desired; FALSE otherwise.java.lang.ArrayIndexOutOfBoundsException
- this runtime exception is thrown if index
is out of
bounds.public static java.lang.String getAltStubName(SymbolID id, Method method, Context context)
id
- the name of the symbol who has the method.method
- information about the method to be named.public static java.lang.String getMethodSuperName(SymbolID id, Method method, NameMangler mang, Context context) throws CodeGenerationException
id
- the name of the symbol who has the method.method
- information about the method to be named.CodeGenerationException
public static int getFortranVersion(Context context)
public static java.lang.String getMethodSuffix(Context context)
public static java.lang.String getAltSuffix(Context context)
public static java.lang.String getImplMethodSuffix(Context context)
public static java.lang.String getFortranSymbol(Context context)
public static java.lang.String getArrayDestructor(SymbolID id, Context context)
public static java.lang.String getArrayConstructor(SymbolID id, Context context)
public static java.lang.String getArraySet(SymbolID id, Context context)
public static java.lang.String getArraySet(SymbolID id, int numArgs, Context context)
public static java.lang.String getArrayGet(SymbolID id, Context context)
public static java.lang.String getArrayGet(SymbolID id, int numArgs, Context context)
public static java.lang.String getArrayDimen(SymbolID id, Context context)
public static java.lang.String getArrayLower(SymbolID id, Context context)
public static java.lang.String getArrayUpper(SymbolID id, Context context)
public static java.lang.String getArrayLength(SymbolID id, Context context)
public static java.lang.String getMethodImplName(SymbolID id, Method method, NameMangler mang, Context context) throws CodeGenerationException
id
and the method name have mixed case, this method returns a mixed case
string.id
- the name of the symbol who has the method.method
- the information about the method.mang
- the name mangler being used to address long names.CodeGenerationException
- the name mangler is broken.public static java.lang.String getBindCName(SymbolID id, Method method, Context context)
id
- the name of the symbol who has the method.method
- the information about the method.mang
- the name mangler being used to address long names.public static java.lang.String getAltBindCName(SymbolID id, Method method, Context context)
id
- the name of the symbol who has the method.method
- the information about the method.mang
- the name mangler being used to address long names.public static java.lang.String getBindCSkelName(SymbolID id, Method method, Context context)
id
- the name of the symbol who has the method.method
- the information about the method.mang
- the name mangler being used to address long names.public static java.lang.String getBindCEPVTypeName(SymbolID id, boolean doStatic)
public static java.lang.String getBindCPreEPVTypeName(SymbolID id, boolean doStatic)
public static java.lang.String getBindCPostEPVTypeName(SymbolID id, boolean doStatic)
public static boolean needsCStub(Method m, boolean do_alternate, Context context)
public static boolean needsCSkel(Method m, Context context)
public static java.lang.String getExtendedMethodName(SymbolID id, java.lang.String baseName)
id
- the name of the symbol who has the method.baseName
- the base method name.public static java.lang.String getExtendedMethodName(SymbolID id, java.lang.String baseName, NameMangler non, NameMangler fort, Context context) throws CodeGenerationException
id
- the name of the symbol who has the method.baseName
- the base name to be extended.non
- the non-name mangler.fort
- the fortran name mangler.CodeGenerationException
public static java.lang.String getMethodSuperImplName(SymbolID id, Method method, NameMangler mang, Context context) throws CodeGenerationException
id
and the method name have mixed case, this method returns a mixed case
string.id
- the name of the symbol who has the method.method
- the information about the method.mang
- the name mangler being used to address long names.CodeGenerationException
- the name mangler is broken.public static java.lang.String getMethodSkelName(SymbolID id, Method method)
id
- the name of the symbol who has the methodmethod
- information about the method.public static java.lang.String getFortranTypeInC(Type type, Context context) throws CodeGenerationException
type
- the sidl type description.CodeGenerationException
- the type is unsupported.public static java.lang.String getFortranPrefix(Context context)
public static boolean needsAbbrev(Context context)
public static boolean isFortran(Context context)
public static boolean isFortran03(Context context)
public static boolean hasBindC(Context context)
public static boolean isFortran90(Context context)
public static boolean isFortran77(Context context)
public static boolean isFortran7731(Context context)
public static boolean isFortranFunction(Method m, Context context)
public static java.lang.String arrayIOR(Context context)
public static Method getStructSetter(Struct strct, Struct.Item fld, Context context)
public static Method getStructGetter(Struct strct, Struct.Item fld, Context context)
public static Method createCastTwo(Context context, SymbolID id) throws CodeGenerationException
CodeGenerationException
public static java.lang.String getArgumentString(Type type, Context context, boolean typeInStruct) throws CodeGenerationException
type
,
a particular sidl type. This is potentially different from the return
type in F03 bindings.type
- a sidl type description.CodeGenerationException
- the type is unsupported.public static java.lang.String getReturnString(Type type, Context context, boolean typeInStruct) throws CodeGenerationException
type
,
a particular sidl type.type
- a sidl type description.CodeGenerationException
- the type is unsupported.public static java.lang.String getBindCType(Type type, int mode)
public static java.lang.String getBindCType(Type type, int mode, boolean is_skeleton)
public static java.lang.String getBindCFieldType(Type type)
public static java.lang.String getBindCReturnType(Type type)
public static java.lang.String getBindCRarrayShape(Type type)
public static java.lang.String getBindCProxyName(java.lang.String name)
ptr_
prefix and sanitizes
special characterspublic static void declareIndices(java.util.Map indexMap, LanguageWriterForFortran d_lw, Context d_context) throws CodeGenerationException
CodeGenerationException
public static void printIndexExprs(java.util.Map indexMap, java.util.Map expr_map, java.lang.String builtin, LanguageWriterForFortran d_lw, Context d_context) throws CodeGenerationException
CodeGenerationException
public static void printBindC2Fortran(Type t, java.lang.String cname, java.lang.String name, int mode, boolean generateDefaultAssignment, boolean generateEnsure, LanguageWriterForFortran d_lw)
name
of the type
type
to the eqvivalent Fortran proxy cname
generateDefaultAssignment
- if true, generate a copy assignment,
even if no conversion is necessarypublic static void printFortran2BindC(Type t, java.lang.String fname, java.lang.String name, int mode, boolean generateDefaultAssignment, boolean generateEnsure, LanguageWriterForFortran d_lw)
fname
to the
eqvivalent bindC variable name
of type type
.intentOut
- if true
, string variables are
initialized to c_null_ptr
before
making a copy.generateDefaultAssignment
- if true, generate a copy assignment,
even if no conversion is necessarypublic static boolean hasBindCProxy(Type t, int mode)
public static void printBindCProxyDecl(Type t, int mode, java.lang.String name, LanguageWriterForFortran d_lw, Context d_context)
public static void printInitializeEmpty(Type t, java.lang.String name, LanguageWriterForFortran d_lw)
public static java.lang.String getFortran2BindCExpr(java.lang.String expr, Type t, int mode)
public static java.util.Set generateStubIncludes(LanguageWriterForC writer, Extendable ext) throws CodeGenerationException
writer
- Language writer for Cext
- Extendible (Class or Interface) to generate dependenciesCodeGenerationException
public static Method createRemoteMethod(Extendable ext, Context context, boolean isF90)
public static Method connectRemoteMethod(Extendable ext, Context context, boolean isF90)