gov.llnl.babel.backend.ior
public class GenerateIORClient extends java.lang.Object implements CodeGenerator
GenerateIORClient
is the main entry point for the IOR
code generation routines. This class calls the IOR header and source
file generation routines. It is assumed that all symbols necessary
to generate IOR code are available in the symbol table, which can be
guaranteed by calling resolveAllReferences
on the symbol
table.Constructor and Description |
---|
GenerateIORClient()
The constructor does nothing interesting.
|
Modifier and Type | Method and Description |
---|---|
void |
generateCode(java.util.Set symbols)
Generate IOR code for each symbol identifier in the set argument.
|
java.util.Set |
getLanguages()
Return the set of language names that this generator supports.
|
java.lang.String |
getName()
Return the canonical name of this generator.
|
java.lang.String |
getType()
Return the type of generator.
|
boolean |
getUserSymbolsOnly()
Return
true if and only if this code factory should
only operate on symbols outside the sidl namespace (i.e., exclude
symbols from the sidl runtime library). |
void |
setContext(Context context)
Routine to notify extensions of the context.
|
void |
setName(java.lang.String name)
Set the name of the generator.
|
public GenerateIORClient()
GenerateIORClient
class is generateCode
.public void generateCode(java.util.Set symbols) throws CodeGenerationException
generateCode
in interface CodeGenerator
symbols
- a set of Symbol
instances. The generator is expetected to write code for each symbol.CodeGenerationException
- this indicates that something failed during the code generation.
It could be anything from an I/O error to a illegal data type.public java.lang.String getType()
CodeGenerator
getType
in interface CodeGenerator
public boolean getUserSymbolsOnly()
CodeGenerator
true
if and only if this code factory should
only operate on symbols outside the sidl namespace (i.e., exclude
symbols from the sidl runtime library). This is typically true
for C and Python where the stubs for the sidl runtime library
are pregenerated. Generally, this should be true
for
anything other than a stub. Implementors do not need to worry
about the special case of generating the sidl runtime library
itself.getUserSymbolsOnly
in interface CodeGenerator
public java.util.Set getLanguages()
CodeGenerator
getLanguages
in interface CodeGenerator
public void setName(java.lang.String name) throws CodeGenerationException
CodeGenerator
CodeGenerator.getName()
is called.setName
in interface CodeGenerator
name
- this should be the name that the end user designated for
the generator.CodeGenerationException
public java.lang.String getName()
CodeGenerator
CodeGenerator.setName(String)
should be called at least once before this method is called.getName
in interface CodeGenerator
CodeGenerator.getLanguages()
. It may not be equal to the name given in
CodeGenerator.setName(String)
.public void setContext(Context context)
ContextAware
setContext
in interface ContextAware