Package com.jogamp.gluegen
Interface GlueEmitter
-
- All Known Implementing Classes:
CStructAnnotationProcessor.AnnotationProcessorJavaStructEmitter,DebugEmitter,JavaEmitter,ProcAddressEmitter
public interface GlueEmitterSpecifies 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbeginDefines()voidbeginEmission(GlueEmitterControls controls)Begin the emission of glue code.voidbeginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap, List<FunctionSymbol> cFunctions)voidbeginStructLayout()Begins the process of computing field offsets and type sizes for the structs to be emitted.voidbeginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap)voidemitDefine(ConstantDefinition def, String optionalComment)Iterator<FunctionSymbol>emitFunctions(List<FunctionSymbol> cFunctions)Emit glue code for the list of FunctionSymbols.voidemitStruct(CompoundType t, Type typedefType)Emit glue code for the given CompoundType.voidendDefines()voidendEmission()Finish the emission of glue code.voidendFunctions()voidendStructLayout()Finishes the struct layout process.voidendStructs()JavaConfigurationgetConfig()voidlayoutStruct(CompoundType t)Lays out one struct which will be emitted later.voidreadConfigurationFile(String filename)
-
-
-
Method Detail
-
readConfigurationFile
void readConfigurationFile(String filename) throws Exception
- Throws:
Exception
-
getConfig
JavaConfiguration getConfig()
-
beginEmission
void beginEmission(GlueEmitterControls controls) throws Exception
Begin the emission of glue code. This might include opening files, emitting class headers, etc.- Throws:
Exception
-
endEmission
void endEmission() throws ExceptionFinish the emission of glue code. This might include closing files, closing open class definitions, etc.- Throws:
Exception
-
emitDefine
void emitDefine(ConstantDefinition def, String optionalComment) throws Exception
- Parameters:
optionalComment- If optionalComment is non-null, the emitter can emit that string as a comment providing extra information about the define.- Throws:
Exception
-
beginFunctions
void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap, List<FunctionSymbol> cFunctions) throws Exception
- Throws:
Exception
-
emitFunctions
Iterator<FunctionSymbol> emitFunctions(List<FunctionSymbol> cFunctions) throws Exception
Emit glue code for the list of FunctionSymbols.- Throws:
Exception
-
beginStructLayout
void beginStructLayout() throws ExceptionBegins the process of computing field offsets and type sizes for the structs to be emitted.- Throws:
Exception
-
layoutStruct
void layoutStruct(CompoundType t) throws Exception
Lays out one struct which will be emitted later.- Throws:
Exception
-
endStructLayout
void endStructLayout() throws ExceptionFinishes the struct layout process.- Throws:
Exception
-
beginStructs
void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap) throws Exception
- Throws:
Exception
-
emitStruct
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.- Throws:
Exception
-
-