gov.llnl.babel.backend.ior
Class IORHeader

java.lang.Object
  extended by gov.llnl.babel.backend.ior.IORHeader

public class IORHeader
extends java.lang.Object

Class IORHeader generates an IOR header to a language writer output stream. The constructor takes a language writer stream and method generateCode generates the intermediate object header code for the specified symbol to the output stream. The language writer output stream is not closed by this object.


Constructor Summary
IORHeader(LanguageWriterForC writer, Context context)
          Create a IORHeader object that will write symbol information to the provided output language writer stream.
 
Method Summary
 void generateCode(Symbol symbol)
          Write IOR header information for the provided symbol to the language writer output stream provided in the constructor.
static void generateCode(Symbol symbol, LanguageWriterForC writer, Context context)
          This is a convenience utility function that writes the symbol header information into the provided language writer output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IORHeader

public IORHeader(LanguageWriterForC writer,
                 Context context)
Create a IORHeader object that will write symbol information to the provided output language writer stream.

Method Detail

generateCode

public static void generateCode(Symbol symbol,
                                LanguageWriterForC writer,
                                Context context)
                         throws CodeGenerationException
This is a convenience utility function that writes the symbol header information into the provided language writer output stream. The output stream is not closed on exit. A code generation exception is thrown if an error is detected.

Throws:
CodeGenerationException

generateCode

public void generateCode(Symbol symbol)
                  throws CodeGenerationException
Write IOR 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 generated header may not be valid input for the C compiler). A code generation exception is generated if an error is detected.

Throws:
CodeGenerationException