Package com.jogamp.gluegen
Class DebugEmitter
- java.lang.Object
-
- com.jogamp.gluegen.DebugEmitter
-
- All Implemented Interfaces:
GlueEmitter
public class DebugEmitter extends Object implements GlueEmitter
Debug emitter which prints the parsing results to standard output.
-
-
Field Summary
Fields Modifier and Type Field Description protected JavaConfigurationcfg
-
Constructor Summary
Constructors Constructor Description DebugEmitter()
-
Method Summary
All Methods Instance Methods Concrete 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)protected JavaConfigurationcreateConfig()Create the object that will read and store configuration information for this JavaEmitter.voidemitDefine(ConstantDefinition def, String optionalComment)Iterator<FunctionSymbol>emitFunctions(List<FunctionSymbol> originalCFunctions)Emit glue code for the list of FunctionSymbols.voidemitSingleFunction(FunctionSymbol sym)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)
-
-
-
Field Detail
-
cfg
protected JavaConfiguration cfg
-
-
Method Detail
-
readConfigurationFile
public void readConfigurationFile(String filename) throws IOException
- Specified by:
readConfigurationFilein interfaceGlueEmitter- Throws:
IOException
-
getConfig
public JavaConfiguration getConfig()
- Specified by:
getConfigin interfaceGlueEmitter
-
beginEmission
public void beginEmission(GlueEmitterControls controls)
Description copied from interface:GlueEmitterBegin the emission of glue code. This might include opening files, emitting class headers, etc.- Specified by:
beginEmissionin interfaceGlueEmitter
-
endEmission
public void endEmission()
Description copied from interface:GlueEmitterFinish the emission of glue code. This might include closing files, closing open class definitions, etc.- Specified by:
endEmissionin interfaceGlueEmitter
-
beginDefines
public void beginDefines()
- Specified by:
beginDefinesin interfaceGlueEmitter
-
emitDefine
public void emitDefine(ConstantDefinition def, String optionalComment)
- Specified by:
emitDefinein interfaceGlueEmitteroptionalComment- If optionalComment is non-null, the emitter can emit that string as a comment providing extra information about the define.
-
endDefines
public void endDefines()
- Specified by:
endDefinesin interfaceGlueEmitter
-
beginFunctions
public void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap, List<FunctionSymbol> cFunctions)
- Specified by:
beginFunctionsin interfaceGlueEmitter
-
emitFunctions
public Iterator<FunctionSymbol> emitFunctions(List<FunctionSymbol> originalCFunctions) throws Exception
Description copied from interface:GlueEmitterEmit glue code for the list of FunctionSymbols.- Specified by:
emitFunctionsin interfaceGlueEmitter- Throws:
Exception
-
emitSingleFunction
public void emitSingleFunction(FunctionSymbol sym)
-
endFunctions
public void endFunctions()
- Specified by:
endFunctionsin interfaceGlueEmitter
-
beginStructLayout
public void beginStructLayout() throws ExceptionDescription copied from interface:GlueEmitterBegins the process of computing field offsets and type sizes for the structs to be emitted.- Specified by:
beginStructLayoutin interfaceGlueEmitter- Throws:
Exception
-
layoutStruct
public void layoutStruct(CompoundType t) throws Exception
Description copied from interface:GlueEmitterLays out one struct which will be emitted later.- Specified by:
layoutStructin interfaceGlueEmitter- Throws:
Exception
-
endStructLayout
public void endStructLayout() throws ExceptionDescription copied from interface:GlueEmitterFinishes the struct layout process.- Specified by:
endStructLayoutin interfaceGlueEmitter- Throws:
Exception
-
beginStructs
public void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap)
- Specified by:
beginStructsin interfaceGlueEmitter
-
emitStruct
public void emitStruct(CompoundType t, Type typedefType)
Description copied from interface:GlueEmitterEmit 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.- Specified by:
emitStructin interfaceGlueEmitter
-
endStructs
public void endStructs()
- Specified by:
endStructsin interfaceGlueEmitter
-
createConfig
protected JavaConfiguration createConfig()
Create the object that will read and store configuration information for this JavaEmitter.
-
-