gov.llnl.babel.backend.fortran

Class StubHeader


public class StubHeader
extends java.lang.Object

This class generates the C code that sits between a FORTRAN client and the internal object representation (IOR) of a sidl object/interface. For each method, this generates a C function that will be called from FORTRAN. This C function massages the arguments from Fortran, calls the IOR, massages the out values from the IOR call, and returns the outgoing values to the Fortran caller.

Constructor Summary

StubHeader(LanguageWriterForC writer)
Create an object to generate the stub code for a sidl class/interface.

Method Summary

void
generateCode(Symbol symbol)
Generate a C (.h) file to provide other stubs with certain functions that must be available globally.
static void
generateCode(Symbol ext, LanguageWriterForC writer)
Generate a C (.h) file to provide other stubs with certain functions that must be available globally.

Constructor Details

StubHeader

public StubHeader(LanguageWriterForC writer)
Create an object to generate the stub code for a sidl class/interface. This is frequently called from generateCode rather than used directly.
Parameters:
writer - the stub code is generated to this output device.

Method Details

generateCode

public void generateCode(Symbol symbol)
            throws CodeGenerationException
Generate a C (.h) file to provide other stubs with certain functions that must be available globally.
Parameters:
symbol - the symbol for which stubs will be generated.
Throws:
CodeGenerationException - a catch all exception to indicate problems during the code generation phase of the sidl processing.

generateCode

public static void generateCode(Symbol ext,
                                LanguageWriterForC writer)
            throws CodeGenerationException
Generate a C (.h) file to provide other stubs with certain functions that must be available globally.
Parameters:
ext - the symbol for which stubs will be generated.
writer - the output device where the stub should be written.
Throws:
CodeGenerationException - a catch all exception to indicate problems during the code generation phase of the sidl processing.