Top Description Methods
com.jogamp.gluegen

public Interface GlueEmitter

Known Direct Implementers
com.jogamp.gluegen.JavaEmitter, com.jogamp.gluegen.DebugEmitter
Imports
java.util.*, com.jogamp.gluegen.cgram.types.*

Specifies the interface by which GlueGen requests glue code to be generated. Can be replaced to generate glue code for other languages and foreign function interfaces.

Method Summary

Modifier and TypeMethod and Description
public void
public void
beginEmission(GlueEmitterControls controls)

Begin the emission of glue code.

public void
beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap)

public void
beginStructLayout()

Begins the process of computing field offsets and type sizes for the structs to be emitted.

public void
beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap)

public void
emitDefine(ConstantDefinition def, String
If optionalComment is non-null, the emitter can emit that string as a comment providing extra information about the define.
optionalComment
)

public Iterator<FunctionSymbol>
emitFunctions(List<FunctionSymbol> cFunctions)

Emit glue code for the list of FunctionSymbols.

public void
emitStruct(CompoundType t, Type typedefType)

Emit glue code for the given CompoundType.

public void
public void
endEmission()

Finish the emission of glue code.

public void
public void
endStructLayout()

Finishes the struct layout process.

public void
public JavaConfiguration
public void
layoutStruct(CompoundType t)

Lays out one struct which will be emitted later.

public void

Method Detail

beginDefinesback to summary
public void beginDefines() throws Exception
beginEmissionback to summary
public void beginEmission(GlueEmitterControls controls) throws Exception

Begin the emission of glue code. This might include opening files, emitting class headers, etc.

beginFunctionsback to summary
public void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) throws Exception
beginStructLayoutback to summary
public void beginStructLayout() throws Exception

Begins the process of computing field offsets and type sizes for the structs to be emitted.

beginStructsback to summary
public void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) throws Exception
emitDefineback to summary
public void emitDefine(ConstantDefinition def, String optionalComment) throws Exception
Parameters
optionalComment:String

If optionalComment is non-null, the emitter can emit that string as a comment providing extra information about the define.

emitFunctionsback to summary
public Iterator<FunctionSymbol> emitFunctions(List<FunctionSymbol> cFunctions) throws Exception

Emit glue code for the list of FunctionSymbols.

emitStructback to summary
public void emitStruct(CompoundType t, Type typedefType) throws Exception

Emit glue code for the given CompoundType. typedefType is provided when the CompoundType (e.g. "struct foo_t") has not been typedefed to anything but the type of "pointer to struct foo_t" has (e.g. "typedef struct foo_t {} *Foo"); in this case typedefType would be set to pointer type Foo.

endDefinesback to summary
public void endDefines() throws Exception
endEmissionback to summary
public void endEmission() throws Exception

Finish the emission of glue code. This might include closing files, closing open class definitions, etc.

endFunctionsback to summary
public void endFunctions() throws Exception
endStructLayoutback to summary
public void endStructLayout() throws Exception

Finishes the struct layout process.

endStructsback to summary
public void endStructs() throws Exception
getConfigurationback to summary
public JavaConfiguration getConfiguration()
layoutStructback to summary
public void layoutStruct(CompoundType t) throws Exception

Lays out one struct which will be emitted later.

readConfigurationFileback to summary
public void readConfigurationFile(String filename) throws Exception