GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.gluegen.runtime.ProcAddressTable Class Referenceabstract

Superclass for all generated ProcAddressTables. More...

Collaboration diagram for com.jogamp.gluegen.runtime.ProcAddressTable:

Public Member Functions

 ProcAddressTable ()
 
 ProcAddressTable (final FunctionAddressResolver resolver)
 
void reset (final DynamicLookupHelper lookup) throws SecurityException, RuntimeException
 Resets the complete table. More...
 
void initEntry (final String name, final DynamicLookupHelper lookup) throws SecurityException, IllegalArgumentException
 Initializes the mapping for a single function. More...
 
final boolean isFunctionAvailable (final String functionName)
 Returns true only if non null function pointer to this function exists. More...
 
long getAddressFor (final String functionName) throws SecurityException, IllegalArgumentException
 This is a convenience method to query the native function handle by name. More...
 
final Set< String > getNullPointerFunctions ()
 Returns all functions pointing to null. More...
 
final String toString ()
 

Protected Member Functions

boolean isFunctionAvailableImpl (final String functionName) throws IllegalArgumentException
 This is a convenience method to query the native function existence by name. More...
 

Static Protected Attributes

static boolean DEBUG
 
static String DEBUG_PREFIX
 
static int debugNum
 

Detailed Description

Superclass for all generated ProcAddressTables.

A ProcAddressTable is a cache of pointers to the dynamically-linkable C functions this autogenerated Java binding has exposed. Some libraries such as OpenGL, OpenAL and others define function pointer signatures rather than statically linkable entry points for the purposes of being able to query at run-time whether a particular extension is available. This table acts as a cache of these function pointers. Each function pointer is typically looked up at run-time by a platform-dependent mechanism such as dlsym(), wgl/glXGetProcAddress(), or alGetProcAddress(). If the field containing the function pointer is 0, the function is considered to be unavailable and can not be called.

Author
Kenneth Russel
Michael Bien
Sven Gothel
See also
FunctionAddressResolver
DynamicLookupHelper

Definition at line 79 of file ProcAddressTable.java.

Constructor & Destructor Documentation

◆ ProcAddressTable() [1/2]

com.jogamp.gluegen.runtime.ProcAddressTable.ProcAddressTable ( )

Definition at line 103 of file ProcAddressTable.java.

◆ ProcAddressTable() [2/2]

com.jogamp.gluegen.runtime.ProcAddressTable.ProcAddressTable ( final FunctionAddressResolver  resolver)

Definition at line 107 of file ProcAddressTable.java.

Member Function Documentation

◆ getAddressFor()

long com.jogamp.gluegen.runtime.ProcAddressTable.getAddressFor ( final String  functionName) throws SecurityException, IllegalArgumentException

This is a convenience method to query the native function handle by name.

It lets you avoid having to manually compute the "PROCADDRESS_VAR_PREFIX + <functionName>" member variable name and look it up via reflection.

If a SecurityManager is installed, user needs link permissions for all libraries, i.e. for new RuntimePermission("loadLibrary.*");!

Exceptions
IllegalArgumentExceptionif this function is not in this table.
SecurityExceptionif user is not granted access for all libraries.

Definition at line 313 of file ProcAddressTable.java.

Here is the call graph for this function:

◆ getNullPointerFunctions()

final Set< String > com.jogamp.gluegen.runtime.ProcAddressTable.getNullPointerFunctions ( )

Returns all functions pointing to null.

Definition at line 326 of file ProcAddressTable.java.

◆ initEntry()

void com.jogamp.gluegen.runtime.ProcAddressTable.initEntry ( final String  name,
final DynamicLookupHelper  lookup 
) throws SecurityException, IllegalArgumentException

Initializes the mapping for a single function.

If a SecurityManager is installed, user needs link permissions for all libraries, i.e. for new RuntimePermission("loadLibrary.*");!

Exceptions
IllegalArgumentExceptionif this function is not in this table.
SecurityExceptionif user is not granted access for all libraries.

Definition at line 168 of file ProcAddressTable.java.

◆ isFunctionAvailable()

final boolean com.jogamp.gluegen.runtime.ProcAddressTable.isFunctionAvailable ( final String  functionName)

Returns true only if non null function pointer to this function exists.

Definition at line 271 of file ProcAddressTable.java.

Here is the call graph for this function:

◆ isFunctionAvailableImpl()

boolean com.jogamp.gluegen.runtime.ProcAddressTable.isFunctionAvailableImpl ( final String  functionName) throws IllegalArgumentException
protected

This is a convenience method to query the native function existence by name.

It lets you avoid having to manually compute the "PROCADDRESS_VAR_PREFIX + <functionName>" member variable name and look it up via reflection.

Exceptions
IllegalArgumentExceptionif this function is not in this table.

Definition at line 289 of file ProcAddressTable.java.

Here is the caller graph for this function:

◆ reset()

void com.jogamp.gluegen.runtime.ProcAddressTable.reset ( final DynamicLookupHelper  lookup) throws SecurityException, RuntimeException

Resets the complete table.

If a SecurityManager is installed, user needs link permissions for all libraries, i.e. for new RuntimePermission("loadLibrary.*");!

Exceptions
SecurityExceptionif user is not granted access for all libraries.

Definition at line 120 of file ProcAddressTable.java.

◆ toString()

final String com.jogamp.gluegen.runtime.ProcAddressTable.toString ( )

Definition at line 340 of file ProcAddressTable.java.

Member Data Documentation

◆ DEBUG

boolean com.jogamp.gluegen.runtime.ProcAddressTable.DEBUG
staticprotected

Definition at line 84 of file ProcAddressTable.java.

◆ DEBUG_PREFIX

String com.jogamp.gluegen.runtime.ProcAddressTable.DEBUG_PREFIX
staticprotected

Definition at line 85 of file ProcAddressTable.java.

◆ debugNum

int com.jogamp.gluegen.runtime.ProcAddressTable.debugNum
staticprotected

Definition at line 86 of file ProcAddressTable.java.


The documentation for this class was generated from the following file: