Package com.jogamp.gluegen
Interface GlueEmitter
- All Known Implementing Classes:
CStructAnnotationProcessor.AnnotationProcessorJavaStructEmitter,DebugEmitter,JavaEmitter,ProcAddressEmitter
public interface GlueEmitter
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 TypeMethodDescriptionvoidvoidbeginEmission(GlueEmitterControls controls) Begin the emission of glue code.voidbeginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) voidBegins 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) emitFunctions(List<FunctionSymbol> cFunctions) Emit glue code for the list of FunctionSymbols.voidemitStruct(CompoundType t, Type typedefType) Emit glue code for the given CompoundType.voidvoidFinish the emission of glue code.voidvoidFinishes the struct layout process.voidvoidLays out one struct which will be emitted later.voidreadConfigurationFile(String filename)
-
Method Details
-
readConfigurationFile
- Throws:
Exception
-
getConfiguration
JavaConfiguration getConfiguration() -
beginEmission
Begin the emission of glue code. This might include opening files, emitting class headers, etc.- Throws:
Exception
-
endEmission
Finish the emission of glue code. This might include closing files, closing open class definitions, etc.- Throws:
Exception
-
beginDefines
- Throws:
Exception
-
emitDefine
- Parameters:
optionalComment- If optionalComment is non-null, the emitter can emit that string as a comment providing extra information about the define.- Throws:
Exception
-
endDefines
- Throws:
Exception
-
beginFunctions
void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) throws Exception- Throws:
Exception
-
emitFunctions
Emit glue code for the list of FunctionSymbols.- Throws:
Exception
-
endFunctions
- Throws:
Exception
-
beginStructLayout
Begins the process of computing field offsets and type sizes for the structs to be emitted.- Throws:
Exception
-
layoutStruct
Lays out one struct which will be emitted later.- Throws:
Exception
-
endStructLayout
Finishes the struct layout process.- Throws:
Exception
-
beginStructs
void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) throws Exception- Throws:
Exception
-
emitStruct
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
-
endStructs
- Throws:
Exception
-