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 |
---|---|
static void |
addUseForReferences(java.util.Collection symbol_refs,
java.util.Collection array_refs,
SymbolID id,
LanguageWriterForFortran d_lw,
Context d_context,
boolean do_types) |
static void |
addUseForReferences(Extendable ext,
java.util.Collection methods,
LanguageWriterForFortran d_lw,
Context d_context,
boolean do_types) |
void |
addUseForReferences(Method m,
SymbolID id) |
static void |
addUseForReferences(Method m,
SymbolID id,
LanguageWriterForFortran d_lw,
Context d_context,
boolean do_types) |
static java.util.Set |
arrayReferences(Class cls,
Context d_context) |
static java.util.Set |
arrayReferences(Method m) |
static gov.llnl.babel.backend.fortran.F90Method |
convertMethod(Method m,
SymbolID id,
Context context) |
static java.util.Collection |
extendMethods(Extendable ext,
Context d_context)
Add the builtin methods to the list of methods that must be
implemented.
|
java.util.Map |
findCollisions(java.util.Map methodsSeen,
Symbol sym) |
static java.util.Map |
findCollisions(java.util.Map methodsSeen,
Symbol sym,
Context d_context) |
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.
|
static java.lang.String |
getArgumentDeclaration(Argument a,
java.lang.String indexExprPrefix,
Context context)
Return the argument declaration, tailored to the specific flavor
of FORTRAN.
|
static boolean |
isInt(java.lang.String s) |
static java.lang.String |
uniqueName(java.lang.String name,
int num) |
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
CodeGenerationException
public void useStatementsForSupers(Method m, SymbolID id) throws CodeGenerationException
CodeGenerationException
public static java.lang.String getArgumentDeclaration(Argument a, java.lang.String indexExprPrefix, Context context) throws CodeGenerationException
a
- the argumentindexExprPrefix
- an optional prefix for the variables used by the
index expression. This is useful for struct
members in F90.CodeGenerationException
public static java.util.Set arrayReferences(Method m) throws CodeGenerationException
CodeGenerationException
public static java.util.Set arrayReferences(Class cls, Context d_context) throws CodeGenerationException
CodeGenerationException
public static java.lang.String uniqueName(java.lang.String name, int num)
public static gov.llnl.babel.backend.fortran.F90Method convertMethod(Method m, SymbolID id, Context context) throws CodeGenerationException
CodeGenerationException
public java.util.Map findCollisions(java.util.Map methodsSeen, Symbol sym) throws CodeGenerationException
CodeGenerationException
public static java.util.Map findCollisions(java.util.Map methodsSeen, Symbol sym, Context d_context) throws CodeGenerationException
CodeGenerationException
public static void addUseForReferences(Extendable ext, java.util.Collection methods, LanguageWriterForFortran d_lw, Context d_context, boolean do_types) throws CodeGenerationException
CodeGenerationException
public void addUseForReferences(Method m, SymbolID id) throws CodeGenerationException
CodeGenerationException
public static void addUseForReferences(Method m, SymbolID id, LanguageWriterForFortran d_lw, Context d_context, boolean do_types) throws CodeGenerationException
CodeGenerationException
public static void addUseForReferences(java.util.Collection symbol_refs, java.util.Collection array_refs, SymbolID id, LanguageWriterForFortran d_lw, Context d_context, boolean do_types) throws CodeGenerationException
CodeGenerationException
public static java.util.Collection extendMethods(Extendable ext, Context d_context) throws CodeGenerationException
ext
- the class whose implementation is being written.CodeGenerationException
public 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)