|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.backend.fortran.Fortran
public class Fortran
Provide a collection of static methods to provide the mapping of sidl concepts into FORTRAN. This class provides the mapping of symbol names to FORTRAN symbols, the mapping of the wrapper code to a set of files, and the mapping of types.
Field Summary |
---|
Method Summary | |
---|---|
static java.lang.String |
arrayIndices(java.util.Collection indices)
|
static java.lang.String |
arrayIOR()
|
static Method |
createCast(SymbolID id)
|
static Method |
createCastTwo(SymbolID id)
|
static java.lang.String |
getAltStubName(SymbolID id,
Method method)
Get the function name that should be used for the FORTRAN stubs to the sidl object methods. |
static java.lang.String |
getAltSuffix()
Return the appropriate FORTRAN alternative stub name. |
static java.lang.String |
getArrayConstructor(SymbolID id)
Generate the name of the array constructor function. |
static java.lang.String |
getArrayDestructor(SymbolID id)
Generate the name of the array destructor function. |
static java.lang.String |
getArrayDimen(SymbolID id)
Generate the name of the array dimension access function. |
static java.lang.String |
getArrayFile(SymbolID id)
|
static java.lang.String |
getArrayGet(SymbolID id)
Generate the name of the array get element function. |
static java.lang.String |
getArrayGet(SymbolID id,
int numArgs)
Generate the name of the array get element function. |
static java.lang.String |
getArrayLength(SymbolID id)
Generate the name of the array length access function. |
static java.lang.String |
getArrayLower(SymbolID id)
Generate the name of the array lower bound access function. |
static java.lang.String |
getArrayModule(SymbolID id)
|
static java.lang.String |
getArrayName(SymbolID id,
int dim)
|
static java.lang.String |
getArraySet(SymbolID id)
Generate the name of the array set element function. |
static java.lang.String |
getArraySet(SymbolID id,
int numArgs)
Generate the name of the array set element function. |
static java.lang.String |
getArrayUpper(SymbolID id)
Generate the name of the array upper bound access function. |
static java.lang.String |
getDelRefArray(Type arrayType)
|
static java.lang.String |
getEnsureArray(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 |
getFortranPrefix()
Return the sidl Fortran prefix for macros and types. |
static java.lang.String |
getFortranSymbol()
Return the appropriate version of SIDLFortran##Symbol. |
static java.lang.String |
getFortranTypeInC(Type type)
Return the C type corresponding to the FORTRAN type corresponding to a particular sidl type. |
static int |
getFortranVersion()
Return the appropriate version of Fortran (i.e., 77 or 90). |
static java.lang.String |
getImplExtension()
Return the appropriate FORTRAN extension. |
static java.lang.String |
getImplFile(SymbolID id)
Return the name of the file that hold the implementation of the FORTRAN sidl object. |
static java.lang.String |
getImplMethodSuffix()
Return the appropriate FORTRAN impl method name suffix based. |
static java.lang.String |
getImplModuleFile(SymbolID id)
Return the name of the file that hold the derived types for implementation of the FORTRAN sidl object. |
static java.lang.String |
getInitArray(Type arrayType)
|
static java.lang.String |
getMethodImplName(SymbolID id,
Method method,
NameMangler mang)
Return the function name that should be used for the FORTRAN subroutine that implements a particular method. |
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)
Get the function name that should be used for the FORTRAN stubs to the sidl object methods. |
static java.lang.String |
getMethodSuffix()
Return the appropriate FORTRAN method name suffix based on the version. |
static java.lang.String |
getMethodSuperImplName(SymbolID id,
Method method,
NameMangler mang)
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)
Get the function name that should be used for the FORTRAN super method in the skels (availible in this Impls) This method does not take into account the compiler specific issues (i.e. |
static java.lang.String |
getModule(SymbolID id)
|
static java.lang.String |
getModuleFile(SymbolID id)
Return the name of the F90 stub module file for a particular symbol. |
static java.lang.String |
getReturnString(Type type)
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 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 |
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)
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)
Return the name of the F90 type module file for a particular symbol. |
static java.lang.String |
getTypeModule(SymbolID id)
|
static java.lang.String |
getTypeName(SymbolID id)
|
static boolean |
hasDirectAccess(Type t)
|
static boolean |
isFortran90()
|
static boolean |
needsAbbrev()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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)
public static java.lang.String getStubFile(SymbolID id)
id
- the symbol whose stub file will be returned
public static java.lang.String getStubNameFile(SymbolID id)
public static java.lang.String getStubDocFile(SymbolID id)
id
- the symbol whose stub documentation file will be returned
public static java.lang.String getModuleFile(SymbolID id)
id
- the symbol whose stub documentation file will be returned
public static java.lang.String getTypeFile(SymbolID id)
id
- the symbol whose stub documentation file will be returned
public static java.lang.String getTypeModule(SymbolID id)
public static java.lang.String getArrayModule(SymbolID id)
public static java.lang.String getArrayFile(SymbolID id)
public static java.lang.String getTypeName(SymbolID id)
public static java.lang.String getArrayName(SymbolID id, int dim)
public static java.lang.String getModule(SymbolID id)
public static java.util.List reorderArguments(java.util.List args)
args
- the incoming list of arguments
public static java.lang.String arrayIndices(java.util.Collection indices)
public static boolean hasDirectAccess(Type t)
public static java.lang.String getEnumStubFile(SymbolID id)
id
- the symbol whose stub file will be returned
public static java.lang.String getEnsureArray(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 returned
public static java.lang.String getSkelFile(SymbolID id)
public static java.lang.String getImplExtension()
public static java.lang.String getImplFile(SymbolID id)
id
- the name of the symbol
public static java.lang.String getImplModuleFile(SymbolID id)
id
- the name of the symbol
public static java.lang.String getMethodStubName(SymbolID id, Method method)
id
- the name of the symbol who has the method.method
- information about the method to be named.
public static java.lang.String getAltStubName(SymbolID id, Method method)
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)
id
- the name of the symbol who has the method.method
- information about the method to be named.
public static int getFortranVersion()
public static java.lang.String getMethodSuffix()
public static java.lang.String getAltSuffix()
public static java.lang.String getImplMethodSuffix()
public static java.lang.String getFortranSymbol()
public static java.lang.String getArrayDestructor(SymbolID id)
public static java.lang.String getArrayConstructor(SymbolID id)
public static java.lang.String getArraySet(SymbolID id)
public static java.lang.String getArraySet(SymbolID id, int numArgs)
public static java.lang.String getArrayGet(SymbolID id)
public static java.lang.String getArrayGet(SymbolID id, int numArgs)
public static java.lang.String getArrayDimen(SymbolID id)
public static java.lang.String getArrayLower(SymbolID id)
public static java.lang.String getArrayUpper(SymbolID id)
public static java.lang.String getArrayLength(SymbolID id)
public static java.lang.String getMethodImplName(SymbolID id, Method method, NameMangler mang) 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 getMethodSuperImplName(SymbolID id, Method method, NameMangler mang) 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) throws CodeGenerationException
CodeGenerationException
- the type is unsupported.public static java.lang.String getFortranPrefix()
public static boolean needsAbbrev()
public static boolean isFortran90()
public static java.lang.String arrayIOR()
public static Method createCast(SymbolID id)
public static Method createCastTwo(SymbolID id) throws CodeGenerationException
CodeGenerationException
public static java.lang.String getReturnString(Type type) throws CodeGenerationException
type
,
a particular sidl type.
type
- a sidl type description.
CodeGenerationException
- the type is unsupported.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |