Package com.jogamp.gluegen.procaddress
Class ProcAddressEmitter
java.lang.Object
com.jogamp.gluegen.JavaEmitter
com.jogamp.gluegen.procaddress.ProcAddressEmitter
- All Implemented Interfaces:
GlueEmitter
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jogamp.gluegen.JavaEmitter
JavaEmitter.EmissionStyle, JavaEmitter.MethodAccess -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMust be synchronized w/ ProcAddressTable.PROCADDRESS_VAR_PREFIX !!!protected Stringprotected Stringprotected PrintWriterprotected static final StringFields inherited from class com.jogamp.gluegen.JavaEmitter
cfg, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) protected voidvoidbeginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) protected booleanprotected JavaConfigurationCreate the object that will read and store configuration information for this JavaEmitter.protected voidvoidprotected voidprotected voidfixSecurityModifiers(JavaMethodBindingEmitter javaEmitter) If 'native', enforce 'private native' modifiers.protected List<? extends FunctionEmitter>Generate all appropriate Java bindings for the specified C function symbols.protected voidgenerateModifiedEmitters(CMethodBindingEmitter baseCEmitter, List<FunctionEmitter> emitters) protected voidgenerateModifiedEmitters(JavaMethodBindingEmitter baseJavaEmitter, List<FunctionEmitter> emitters) protected StringReturns the name of the typedef for a pointer to the function represented by the argument as defined by the ProcAddressNameExpr in the .cfg file.protected ProcAddressConfigurationprotected booleanprotected booleanMethods inherited from class com.jogamp.gluegen.JavaEmitter
addStrings2Buffer, beginDefines, beginEmission, beginStructLayout, cFileName, cWriter, emitAllFileFooters, emitAllFileHeaders, emitCHeader, emitCInitCode, emitCustomJavaCode, emitDefine, emitFunctions, emitJavaInitCode, emitStruct, endDefines, endEmission, endStructLayout, endStructs, expandMethodBinding, generatePrivateEmitters, generatePublicEmitters, getClassAccessModifiers, getConfig, getConfiguration, getImplPackageName, getJavaOutputDir, getJavaPackageName, getJNIMethodNamePrefix, javaFileName, javaImplWriter, javaWriter, jniMangle, layoutStruct, mangleBinding, openFile, prepCEmitter, readConfigurationFile, requiresStaticInitialization
-
Field Details
-
PROCADDRESS_VAR_PREFIX
Must be synchronized w/ ProcAddressTable.PROCADDRESS_VAR_PREFIX !!!- See Also:
-
WRAP_PREFIX
- See Also:
-
tableWriter
-
emittedTableEntries
-
tableClassPackage
-
tableClassName
-
-
Constructor Details
-
ProcAddressEmitter
public ProcAddressEmitter()
-
-
Method Details
-
beginFunctions
public void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) throws Exception- Specified by:
beginFunctionsin interfaceGlueEmitter- Overrides:
beginFunctionsin classJavaEmitter- Throws:
Exception
-
endFunctions
- Specified by:
endFunctionsin interfaceGlueEmitter- Overrides:
endFunctionsin classJavaEmitter- Throws:
Exception
-
beginStructs
public void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) throws Exception- Specified by:
beginStructsin interfaceGlueEmitter- Overrides:
beginStructsin classJavaEmitter- Throws:
Exception
-
runtimeExceptionType
-
unsupportedExceptionType
-
createConfig
Description copied from class:JavaEmitterCreate the object that will read and store configuration information for this JavaEmitter.- Overrides:
createConfigin classJavaEmitter
-
generateMethodBindingEmitters
protected List<? extends FunctionEmitter> generateMethodBindingEmitters(FunctionSymbol sym) throws Exception Description copied from class:JavaEmitterGenerate all appropriate Java bindings for the specified C function symbols.- Overrides:
generateMethodBindingEmittersin classJavaEmitter- Throws:
Exception
-
needsModifiedEmitters
-
getFunctionPointerTypedefName
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. -
fixSecurityModifiers
If 'native', enforce 'private native' modifiers. -
generateModifiedEmitters
protected void generateModifiedEmitters(JavaMethodBindingEmitter baseJavaEmitter, List<FunctionEmitter> emitters) -
generateModifiedEmitters
protected void generateModifiedEmitters(CMethodBindingEmitter baseCEmitter, List<FunctionEmitter> emitters) -
callThroughProcAddress
-
hasFunctionPointerTypedef
-
beginProcAddressTable
- Throws:
Exception
-
endProcAddressTable
- Throws:
Exception
-
emitProcAddressTableEntryForString
-
getProcAddressConfig
-