gov.llnl.babel.backend.sidl
Class GenerateSidl
java.lang.Object
gov.llnl.babel.backend.sidl.GenerateSidl
- CodeGenerator, ContextAware
public class GenerateSidl
extends java.lang.Object
This class implements the
CodeGenerator
interface for the SIDL code generator. This generator
creates a SIDL file for a package based on the contents of the symbol
table.
void | generateCode(Set symbols) - Given a set of symbol ids, this method will generate SIDL source
for all the corresponding packages in the set as needed.
|
Set | getLanguages() - Returns a set containing only "sidl" since we are only generating
the sidl representation of the interface.
|
String | getName() - Return the canonical name of this generator.
|
String | getType() - Return "text" since we are generating a textual representation of
the interface.
|
boolean | getUserSymbolsOnly() - Returns false since we are not limited it to user symbols only.
|
void | setContext(Context context) - Routine to notify extensions of the context.
|
void | setName(String name) - Set the name of the generator.
|
GenerateSidl
public GenerateSidl()
Create a new instance.
generateCode
public void generateCode(Set symbols)
throws CodeGenerationException
Given a set of symbol ids, this method will generate SIDL source
for all the corresponding packages in the set as needed.
- generateCode in interface CodeGenerator
symbols
- a set of symbol id (symbol names) for whom stubs
should be written as needed. Each object in the
set should be a SymbolID
.
getLanguages
public Set getLanguages()
Returns a set containing only "sidl" since we are only generating
the sidl representation of the interface.
- getLanguages in interface CodeGenerator
getName
public String getName()
Return the canonical name of this generator. This exists for cases
where a backend may have more than one name.
CodeGenerator.setName(String)
should be called at least once before this method is called.
- getName in interface CodeGenerator
getType
public String getType()
Return "text" since we are generating a textual representation of
the interface.
- getType in interface CodeGenerator
getUserSymbolsOnly
public boolean getUserSymbolsOnly()
Returns false since we are not limited it to user symbols only.
- getUserSymbolsOnly in interface CodeGenerator
setName
public void setName(String name)
throws CodeGenerationException
Set the name of the generator. This sets the name of the generator as
it appeared on the command line. This method should be called at least
once before
CodeGenerator.getName()
is called.
- setName in interface CodeGenerator
name
- this should be the name that the end user designated for
the generator.