com.jogamp.gluegen.procaddress
Class ProcAddressEmitter
java.lang.Object
com.jogamp.gluegen.JavaEmitter
com.jogamp.gluegen.procaddress.ProcAddressEmitter
- All Implemented Interfaces:
- GlueEmitter
public class ProcAddressEmitter
- extends JavaEmitter
A subclass of JavaEmitter that modifies the normal emission of C
and Java code to allow dynamic lookups of the C entry points
associated with the Java methods.
Methods inherited from class com.jogamp.gluegen.JavaEmitter |
addStrings2Buffer, beginDefines, beginEmission, beginStructLayout, cWriter, emitAllFileFooters, emitAllFileHeaders, emitCHeader, emitCustomJavaCode, emitDefine, emitFunctions, emitStruct, emitStructImpl, endDefines, endEmission, endStructLayout, endStructs, expandMethodBinding, generatePrivateEmitters, generatePublicEmitters, getConfig, getImplPackageName, getJavaOutputDir, getJavaPackageName, getJavaRadix, getJavaType, getJavaType, getJavaValue, javaImplWriter, javaWriter, layoutStruct, openFile, prepCEmitter, readConfigurationFile, setMachineDescription |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROCADDRESS_VAR_PREFIX
public static final String PROCADDRESS_VAR_PREFIX
- See Also:
- Constant Field Values
WRAP_PREFIX
protected static final String WRAP_PREFIX
- See Also:
- Constant Field Values
tableWriter
protected PrintWriter tableWriter
emittedTableEntries
protected Set<String> emittedTableEntries
tableClassPackage
protected String tableClassPackage
tableClassName
protected String tableClassName
ProcAddressEmitter
public ProcAddressEmitter()
beginFunctions
public void beginFunctions(TypeDictionary typedefDictionary,
TypeDictionary structDictionary,
Map<Type,Type> canonMap)
throws Exception
- Specified by:
beginFunctions
in interface GlueEmitter
- Overrides:
beginFunctions
in class JavaEmitter
- Throws:
Exception
endFunctions
public void endFunctions()
throws Exception
- Specified by:
endFunctions
in interface GlueEmitter
- Overrides:
endFunctions
in class JavaEmitter
- Throws:
Exception
beginStructs
public void beginStructs(TypeDictionary typedefDictionary,
TypeDictionary structDictionary,
Map<Type,Type> canonMap)
throws Exception
- Specified by:
beginStructs
in interface GlueEmitter
- Overrides:
beginStructs
in class JavaEmitter
- Throws:
Exception
runtimeExceptionType
public String runtimeExceptionType()
unsupportedExceptionType
public String unsupportedExceptionType()
createConfig
protected JavaConfiguration createConfig()
- Description copied from class:
JavaEmitter
- Create the object that will read and store configuration information for
this JavaEmitter.
- Overrides:
createConfig
in class JavaEmitter
generateMethodBindingEmitters
protected List<? extends FunctionEmitter> generateMethodBindingEmitters(Set<MethodBinding> methodBindingSet,
FunctionSymbol sym)
throws Exception
- Description copied from class:
JavaEmitter
- Generate all appropriate Java bindings for the specified C function
symbols.
- Overrides:
generateMethodBindingEmitters
in class JavaEmitter
- Throws:
Exception
needsModifiedEmitters
protected boolean needsModifiedEmitters(FunctionSymbol sym)
getFunctionPointerTypedefName
protected String getFunctionPointerTypedefName(FunctionSymbol sym)
- Returns the name of the typedef for a pointer to the function
represented by the argument as defined by the ProcAddressNameExpr
in the .cfg file. For example, in the OpenGL headers, if the
argument is the function "glFuncName", the value returned will be
"PFNGLFUNCNAMEPROC". This returns a valid string regardless of
whether or not the typedef is actually defined.
generateModifiedEmitters
protected void generateModifiedEmitters(JavaMethodBindingEmitter baseJavaEmitter,
List<FunctionEmitter> emitters)
generateModifiedEmitters
protected void generateModifiedEmitters(CMethodBindingEmitter baseCEmitter,
List<FunctionEmitter> emitters)
needsProcAddressWrapper
protected boolean needsProcAddressWrapper(FunctionSymbol sym)
beginProcAddressTable
protected void beginProcAddressTable()
throws Exception
- Throws:
Exception
endProcAddressTable
protected void endProcAddressTable()
throws Exception
- Throws:
Exception
emitProcAddressTableEntryForString
protected void emitProcAddressTableEntryForString(String str)
getProcAddressConfig
protected ProcAddressConfiguration getProcAddressConfig()