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 JavaConfiguration
cfg
-
Constructor Summary
Constructors Constructor Description DebugEmitter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginDefines()
void
beginEmission(GlueEmitterControls controls)
Begin the emission of glue code.void
beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap, List<FunctionSymbol> cFunctions)
void
beginStructLayout()
Begins the process of computing field offsets and type sizes for the structs to be emitted.void
beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap)
protected JavaConfiguration
createConfig()
Create the object that will read and store configuration information for this JavaEmitter.void
emitDefine(ConstantDefinition def, String optionalComment)
Iterator<FunctionSymbol>
emitFunctions(List<FunctionSymbol> originalCFunctions)
Emit glue code for the list of FunctionSymbols.void
emitSingleFunction(FunctionSymbol sym)
void
emitStruct(CompoundType t, Type typedefType)
Emit glue code for the given CompoundType.void
endDefines()
void
endEmission()
Finish the emission of glue code.void
endFunctions()
void
endStructLayout()
Finishes the struct layout process.void
endStructs()
JavaConfiguration
getConfig()
void
layoutStruct(CompoundType t)
Lays out one struct which will be emitted later.void
readConfigurationFile(String filename)
-
-
-
Field Detail
-
cfg
protected JavaConfiguration cfg
-
-
Method Detail
-
readConfigurationFile
public void readConfigurationFile(String filename) throws IOException
- Specified by:
readConfigurationFile
in interfaceGlueEmitter
- Throws:
IOException
-
getConfig
public JavaConfiguration getConfig()
- Specified by:
getConfig
in interfaceGlueEmitter
-
beginEmission
public void beginEmission(GlueEmitterControls controls)
Description copied from interface:GlueEmitter
Begin the emission of glue code. This might include opening files, emitting class headers, etc.- Specified by:
beginEmission
in interfaceGlueEmitter
-
endEmission
public void endEmission()
Description copied from interface:GlueEmitter
Finish the emission of glue code. This might include closing files, closing open class definitions, etc.- Specified by:
endEmission
in interfaceGlueEmitter
-
beginDefines
public void beginDefines()
- Specified by:
beginDefines
in interfaceGlueEmitter
-
emitDefine
public void emitDefine(ConstantDefinition def, String optionalComment)
- Specified by:
emitDefine
in interfaceGlueEmitter
optionalComment
- 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:
endDefines
in interfaceGlueEmitter
-
beginFunctions
public void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap, List<FunctionSymbol> cFunctions)
- Specified by:
beginFunctions
in interfaceGlueEmitter
-
emitFunctions
public Iterator<FunctionSymbol> emitFunctions(List<FunctionSymbol> originalCFunctions) throws Exception
Description copied from interface:GlueEmitter
Emit glue code for the list of FunctionSymbols.- Specified by:
emitFunctions
in interfaceGlueEmitter
- Throws:
Exception
-
emitSingleFunction
public void emitSingleFunction(FunctionSymbol sym)
-
endFunctions
public void endFunctions()
- Specified by:
endFunctions
in interfaceGlueEmitter
-
beginStructLayout
public void beginStructLayout() throws Exception
Description copied from interface:GlueEmitter
Begins the process of computing field offsets and type sizes for the structs to be emitted.- Specified by:
beginStructLayout
in interfaceGlueEmitter
- Throws:
Exception
-
layoutStruct
public void layoutStruct(CompoundType t) throws Exception
Description copied from interface:GlueEmitter
Lays out one struct which will be emitted later.- Specified by:
layoutStruct
in interfaceGlueEmitter
- Throws:
Exception
-
endStructLayout
public void endStructLayout() throws Exception
Description copied from interface:GlueEmitter
Finishes the struct layout process.- Specified by:
endStructLayout
in interfaceGlueEmitter
- Throws:
Exception
-
beginStructs
public void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap)
- Specified by:
beginStructs
in interfaceGlueEmitter
-
emitStruct
public void emitStruct(CompoundType t, Type typedefType)
Description copied from interface:GlueEmitter
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.- Specified by:
emitStruct
in interfaceGlueEmitter
-
endStructs
public void endStructs()
- Specified by:
endStructs
in interfaceGlueEmitter
-
createConfig
protected JavaConfiguration createConfig()
Create the object that will read and store configuration information for this JavaEmitter.
-
-