gov.llnl.babel.backend.ucxx
Class CxxStubSource
java.lang.Object
gov.llnl.babel.backend.ucxx.CxxStubSource
public class CxxStubSource
extends java.lang.Object
Create and write a header for a Cxx C extension class to wrap a
BABEL extendable in a Cxx object. The header has to expose a
function to create a wrapped IOR, a function to check if a
PyObject
is an instance of this extension type, and
an import macro.
void | generateCode() - Generate the header file for the extendable with which this object was
created.
|
static void | generateSupers(Class cls, LanguageWriterForCxx writer, Context context) - This is a convenience utility function specifically for the generation
of super "Stub" functions in the Impl files.
|
CxxStubSource
public CxxStubSource(Extendable ext,
Context context)
Create an object capable of generating the header file for a
BABEL extendable.
ext
- an interface or class symbol that needs a header
file for a Cxx C extension class.
CxxStubSource
public CxxStubSource(Extendable ext,
LanguageWriterForCxx writer,
Context context)
Create an object capable of generating the header file for a
BABEL extendable.
ext
- an interface or class symbol that needs a header
file for a Cxx C extension class.
generateCode
public void generateCode()
throws CodeGenerationException
Generate the header file for the extendable with which this object was
created.
generateSupers
public static void generateSupers(Class cls,
LanguageWriterForCxx writer,
Context context)
throws CodeGenerationException
This is a convenience utility function specifically for the generation
of super "Stub" functions in the Impl files.
The output stream is not closed on exit. A code
generation exception is thrown if an error is detected.
cls
- The class in which these supers are to be generatedwriter
- the output writer to which the stub source will
be written. This will not be closed.
CodeGenerationException
- this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.