public class ImplSource
extends java.lang.Object
| Constructor and Description |
|---|
ImplSource(LanguageWriterForFortran writer,
CodeSplicer splicer,
Context context)
Generate an instance to generate a FORTRAN implementation template.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addUseForReferences(Method m,
SymbolID id) |
java.util.Map |
findCollisions(java.util.Map methodsSeen,
Symbol sym) |
void |
generateCode(Class cls)
Generate the implementation FORTRAN file for a sidl class.
|
static void |
generateCode(Class cls,
LanguageWriterForFortran writer,
CodeSplicer splicer,
Context context)
Generate the implementation FORTRAN file for a sidl class.
|
java.lang.String |
getArgumentDeclaration(Argument a)
Return the argument declaration, tailored to the specific flavor
of FORTRAN.
|
java.lang.String |
getFunctionRetTypeDecl(Argument a,
java.lang.String methodName)
Return the function declaration, tailored to BindC.
|
static boolean |
isFortranFunction(Type check)
Utility function that checks if we have a fortran function
that returns primitve types.
|
static boolean |
isInt(java.lang.String s) |
void |
useStatementsForSupers(Method m,
SymbolID id) |
static void |
useStatementsForSupers(Method m,
SymbolID id,
LanguageWriterForFortran writer,
CodeSplicer splicer,
Context context) |
public ImplSource(LanguageWriterForFortran writer, CodeSplicer splicer, Context context) throws java.security.NoSuchAlgorithmException
writer - the output device to which the FORTRAN implementation
should be written.splicer - this stores the previous implementation when one
exists.java.security.NoSuchAlgorithmException - thrown when the JVM has not SHA hash algorithm.public static void useStatementsForSupers(Method m, SymbolID id, LanguageWriterForFortran writer, CodeSplicer splicer, Context context) throws CodeGenerationException
CodeGenerationExceptionpublic void useStatementsForSupers(Method m, SymbolID id) throws CodeGenerationException
CodeGenerationExceptionpublic java.lang.String getFunctionRetTypeDecl(Argument a, java.lang.String methodName) throws CodeGenerationException
a - the argumentMethodName - the name of the current function nameCodeGenerationExceptionpublic java.lang.String getArgumentDeclaration(Argument a) throws CodeGenerationException
a - the argumentCodeGenerationExceptionpublic java.util.Map findCollisions(java.util.Map methodsSeen,
Symbol sym)
throws CodeGenerationException
CodeGenerationExceptionpublic void addUseForReferences(Method m, SymbolID id) throws CodeGenerationException
CodeGenerationExceptionpublic void generateCode(Class cls) throws CodeGenerationException
cls - the sidl class whose implementation is to be written.CodeGenerationException - a catch all exception to indicate problems in the code generation
phase.public static void generateCode(Class cls, LanguageWriterForFortran writer, CodeSplicer splicer, Context context) throws CodeGenerationException, java.security.NoSuchAlgorithmException
CodeGenerationException - a catch all exception to indicate problems in the code generation
phase.java.security.NoSuchAlgorithmException - A problem with the name mangler.public static boolean isInt(java.lang.String s)
public static boolean isFortranFunction(Type check)
Type - is m.getReturnType()