GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.common.nio.PointerBuffer Class Reference

Hardware independent container holding an array of native pointer, while its getDirectBufferAddress() is-a pointer-pointer type value. More...

Inheritance diagram for com.jogamp.common.nio.PointerBuffer:
Collaboration diagram for com.jogamp.common.nio.PointerBuffer:

Public Member Functions

final PointerBuffer duplicate ()
 
final PointerBuffer put (final PointerBuffer src)
 
final long get (final int idx)
 Absolute get method. More...
 
final long get ()
 Relative get method. More...
 
final PointerBuffer get (final int srcElemPos, final long[] dest, final int destElemPos, final int elemCount)
 Absolute get method. More...
 
final PointerBuffer get (final long[] dest, final int destElemPos, final int elemCount)
 Relative bulk get method. More...
 
final PointerBuffer put (final int idx, final long v)
 Absolute put method. More...
 
final PointerBuffer put (final long value)
 Relative put method. More...
 
final PointerBuffer put (final long[] src, final int srcElemPos, final int destElemPos, final int elemCount)
 Absolute put method. More...
 
final PointerBuffer put (final long[] src, final int srcElemPos, final int elemCount)
 Relative bulk put method. More...
 
final PointerBuffer referenceBuffer (final int index, final Buffer bb)
 Put the address of the given direct Buffer at the given position of this pointer array. More...
 
final PointerBuffer referenceBuffer (final Buffer bb)
 Put the address of the given direct Buffer at the end of this pointer array. More...
 
final Buffer getReferencedBuffer (final int index)
 
final Buffer getReferencedBuffer ()
 
String toString ()
 
- Public Member Functions inherited from com.jogamp.common.nio.AbstractBuffer< PointerBuffer >
final int elementSize ()
 
final int capacity ()
 
final int limit ()
 
final B limit (final int newLim)
 
final int position ()
 
final B position (final int newPos)
 
final int remaining ()
 
final boolean hasRemaining ()
 
final B clear ()
 
final B flip ()
 
final B rewind ()
 
final Buffer getBuffer ()
 
final boolean isDirect ()
 
long getDirectBufferAddress ()
 
void storeDirectAddress (final ByteBuffer directDest)
 
void storeDirectAddress (final ByteBuffer directDest, final int destBytePos)
 
final boolean hasArray ()
 
final int arrayOffset ()
 
Object array () throws UnsupportedOperationException
 
String toString ()
 

Static Public Member Functions

static PointerBuffer allocate (final int size)
 Returns a non direct PointerBuffer, having a backup array. More...
 
static PointerBuffer allocateDirect (final int size)
 Returns a direct PointerBuffer in native order, w/o backup array. More...
 
static PointerBuffer wrap (final ByteBuffer src)
 Wraps given ByteBuffer src up to it ByteBuffer#capacity()/POINTER_SIZE pointers. More...
 
static PointerBuffer wrap (final ByteBuffer src, final int srcByteOffset, final int elemCount)
 Wraps given ByteBuffer src @ srcByteOffset to contain elemCount pointers. More...
 
static PointerBuffer derefPointer (final long aptr, final int elemCount)
 
static PointerBuffer derefPointer (final ByteBuffer ptrSrc, final int ptrSrcByteOffset, final int elemCount)
 

Protected Attributes

LongObjectHashMap dataMap = null
 
- Protected Attributes inherited from com.jogamp.common.nio.AbstractBuffer< PointerBuffer >
final Buffer buffer
 
final int elementSize
 
final int capacity
 
int limit
 
int position
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.common.nio.AbstractBuffer< PointerBuffer >
static final int POINTER_SIZE
 Platform dependent pointer size in bytes, i.e. More...
 
- Protected Member Functions inherited from com.jogamp.common.nio.AbstractBuffer< PointerBuffer >
 AbstractBuffer (final Buffer buffer, final int elementSize, final int capacity)
 capacity and elementSize should be match the equation w/ target buffer type More...
 
String toSubString ()
 

Detailed Description

Hardware independent container holding an array of native pointer, while its getDirectBufferAddress() is-a pointer-pointer type value.

An instance maps an array of pointers of referenced Buffer objects, represented as longs.

The native values (NIO direct ByteBuffer) might be 32bit or 64bit wide, depending of the CPU pointer width, see POINTER_SIZE.

Author
Sven Gothel
Michael Bien

Definition at line 55 of file PointerBuffer.java.

Member Function Documentation

◆ allocate()

static PointerBuffer com.jogamp.common.nio.PointerBuffer.allocate ( final int  size)
static

Returns a non direct PointerBuffer, having a backup array.

Definition at line 81 of file PointerBuffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocateDirect()

static PointerBuffer com.jogamp.common.nio.PointerBuffer.allocateDirect ( final int  size)
static

Returns a direct PointerBuffer in native order, w/o backup array.

Definition at line 90 of file PointerBuffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ derefPointer() [1/2]

static PointerBuffer com.jogamp.common.nio.PointerBuffer.derefPointer ( final ByteBuffer  ptrSrc,
final int  ptrSrcByteOffset,
final int  elemCount 
)
static

Definition at line 126 of file PointerBuffer.java.

Here is the call graph for this function:

◆ derefPointer() [2/2]

static PointerBuffer com.jogamp.common.nio.PointerBuffer.derefPointer ( final long  aptr,
final int  elemCount 
)
static

Definition at line 116 of file PointerBuffer.java.

Here is the caller graph for this function:

◆ duplicate()

final PointerBuffer com.jogamp.common.nio.PointerBuffer.duplicate ( )
Returns
new PointerBuffer sharing the same buffer data of this instance (identity), but having an independent position.

Definition at line 134 of file PointerBuffer.java.

Here is the call graph for this function:

◆ get() [1/4]

final long com.jogamp.common.nio.PointerBuffer.get ( )

Relative get method.

Get the pointer value at the current position and increment the position by one.

Definition at line 190 of file PointerBuffer.java.

◆ get() [2/4]

final long com.jogamp.common.nio.PointerBuffer.get ( final int  idx)

Absolute get method.

Get the pointer value at the given index

Definition at line 179 of file PointerBuffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [3/4]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.get ( final int  srcElemPos,
final long[]  dest,
final int  destElemPos,
final int  elemCount 
)

Absolute get method.

Get element-bytes for elemCount elements from this buffer at srcElemPos into dest at the given element-index destElemPos

Definition at line 197 of file PointerBuffer.java.

Here is the call graph for this function:

◆ get() [4/4]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.get ( final long[]  dest,
final int  destElemPos,
final int  elemCount 
)

Relative bulk get method.

Copy the pointer values [ position .. position+elemCount [ to the destination array [ dest[destElemPos] .. dest[destElemPos+elemCount] [ and increment the position by elemCount.

Definition at line 224 of file PointerBuffer.java.

◆ getReferencedBuffer() [1/2]

final Buffer com.jogamp.common.nio.PointerBuffer.getReferencedBuffer ( )

Definition at line 322 of file PointerBuffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getReferencedBuffer() [2/2]

final Buffer com.jogamp.common.nio.PointerBuffer.getReferencedBuffer ( final int  index)

Definition at line 314 of file PointerBuffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put() [1/5]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.put ( final int  idx,
final long  v 
)

Absolute put method.

Put the pointer value at the given index

Definition at line 231 of file PointerBuffer.java.

Here is the call graph for this function:

◆ put() [2/5]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.put ( final long  value)

Relative put method.

Put the pointer value at the current position and increment the position by one.

Definition at line 243 of file PointerBuffer.java.

Here is the call graph for this function:

◆ put() [3/5]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.put ( final long[]  src,
final int  srcElemPos,
final int  destElemPos,
final int  elemCount 
)

Absolute put method.

Put element-bytes for elemCount elements from src at srcElemPos into this buffer at the given element-index destElemPos

Definition at line 250 of file PointerBuffer.java.

Here is the call graph for this function:

◆ put() [4/5]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.put ( final long[]  src,
final int  srcElemPos,
final int  elemCount 
)

Relative bulk put method.

Put the pointer values [ src[srcElemPos] .. src[srcElemPos+elemCount] [ at the current position and increment the position by elemCount.

Definition at line 275 of file PointerBuffer.java.

Here is the call graph for this function:

◆ put() [5/5]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.put ( final PointerBuffer  src)

Definition at line 149 of file PointerBuffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ referenceBuffer() [1/2]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.referenceBuffer ( final Buffer  bb)

Put the address of the given direct Buffer at the end of this pointer array.

Adding a reference of the given direct Buffer to this object.

Definition at line 308 of file PointerBuffer.java.

Here is the call graph for this function:

◆ referenceBuffer() [2/2]

final PointerBuffer com.jogamp.common.nio.PointerBuffer.referenceBuffer ( final int  index,
final Buffer  bb 
)

Put the address of the given direct Buffer at the given position of this pointer array.

Adding a reference of the given direct Buffer to this object.

Exceptions
IllegalArgumentExceptionif bb is null or not a direct buffer

Definition at line 287 of file PointerBuffer.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

String com.jogamp.common.nio.PointerBuffer.toString ( )

Definition at line 329 of file PointerBuffer.java.

Here is the call graph for this function:

◆ wrap() [1/2]

static PointerBuffer com.jogamp.common.nio.PointerBuffer.wrap ( final ByteBuffer  src)
static

Wraps given ByteBuffer src up to it ByteBuffer#capacity()/POINTER_SIZE pointers.

Definition at line 95 of file PointerBuffer.java.

Here is the caller graph for this function:

◆ wrap() [2/2]

static PointerBuffer com.jogamp.common.nio.PointerBuffer.wrap ( final ByteBuffer  src,
final int  srcByteOffset,
final int  elemCount 
)
static

Wraps given ByteBuffer src @ srcByteOffset to contain elemCount pointers.

Parameters
src
srcByteOffset
elemCount
Returns

Definition at line 105 of file PointerBuffer.java.

Member Data Documentation

◆ dataMap

LongObjectHashMap com.jogamp.common.nio.PointerBuffer.dataMap = null
protected

Definition at line 56 of file PointerBuffer.java.


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