gov.llnl.babel.backend.python
Class DualGenerator

java.lang.Object
  |
  +--gov.llnl.babel.backend.python.DualGenerator
All Implemented Interfaces:
BuildGenerator, FileListener

public class DualGenerator
extends java.lang.Object
implements BuildGenerator, FileListener


Constructor Summary
DualGenerator()
           
 
Method Summary
 void createAll()
          Generate babel.make and setup.py for all the symbols.
 java.util.Set getLanguages()
          Return the set of languages that this build generator serves.
 void newFile(SymbolID id, int type, java.lang.String role, java.lang.String dir, java.lang.String name)
          This method is called by the FileManager for each new file it creates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DualGenerator

public DualGenerator()
Method Detail

createAll

public void createAll()
               throws java.io.IOException
Generate babel.make and setup.py for all the symbols.

Specified by:
createAll in interface BuildGenerator
Throws:
java.io.IOException - this is a exception that contains all the I/O exceptions that occurred during file generation.

newFile

public void newFile(SymbolID id,
                    int type,
                    java.lang.String role,
                    java.lang.String dir,
                    java.lang.String name)
This method is called by the FileManager for each new file it creates. Delegate this method to MakefileGenerator and SetupGenerator.

Specified by:
newFile in interface FileListener
Parameters:
id - the file is related to this symbol ID.
type - the symbol ID is this type (one of the constants from Type.
role - this describes the role the file plays. For example, the file could be a STUBSRCS file or a IMPLSRCS file. The role strings used are determined by the backend.
dir - the path (relative or absolute) of the directory where the file will be created.
name - the name of the file not including any directory information. The complete name of the file should be dir + name.

getLanguages

public java.util.Set getLanguages()
Description copied from interface: BuildGenerator
Return the set of languages that this build generator serves. Each build generator serves a Set of languages.

Specified by:
getLanguages in interface BuildGenerator
Returns:
a Set of strings. Each string in the set represents a language supported by the build generator.