gov.llnl.babel.backend.rmi

Class RMIStubHeader


public class RMIStubHeader
extends java.lang.Object

Class RMIStubHeader is called for the C portion of a Stub Header. It generated declerations necessary for RMI.

Method Summary

static void
generateCode(Symbol symbol, LanguageWriterForC lw)
Write C client header information for the provided symbol to the language writer output stream provided in the constructor.
static void
generateConnectInternal(Extendable ext, LanguageWriterForC lw)
static void
generateExtendable(Extendable ext, LanguageWriterForC lw)
Generate a C client header for a SIDL class or interface description.
static void
generatePragmas(Extendable ext, LanguageWriterForC lw)

Method Details

generateCode

public static void generateCode(Symbol symbol,
                                LanguageWriterForC lw)
            throws CodeGenerationException
Write C client header information for the provided symbol to the language writer output stream provided in the constructor. This method does not close the writer output stream and may be called for more than one symbol (although the written header may not be valid input for the C compiler). A code generation exception is written if an error is detected.
Parameters:
symbol - the Symbol whose header will be written.
Throws:
CodeGenerationException - this is a catch all exception. It can be caused by I/O trouble or violations of the data type invariants.

generateConnectInternal

public static void generateConnectInternal(Extendable ext,
                                           LanguageWriterForC lw)
            throws CodeGenerationException

generateExtendable

public static void generateExtendable(Extendable ext,
                                      LanguageWriterForC lw)
            throws CodeGenerationException
Generate a C client header for a SIDL class or interface description. The header file consists of the typedef the defines the symbol type. Note that the typedef comes before any external includes to solve the problem with forward references. After the typedef comes the external includes, followed by special methods such as cast and new, followed by the regular methods. The header concludes with close statements for the header guards.
Parameters:
ext - the Extendable whose header is being written.
Throws:
CodeGenerationException - this is a catch all exception. It can be caused by I/O trouble or violations of the data type invariants.

generatePragmas

public static void generatePragmas(Extendable ext,
                                   LanguageWriterForC lw)
            throws CodeGenerationException