GlueGen: com.jogamp.common.nio.ElementBuffer Class Reference

GlueGen v2.6.0 GlueGen, Native Binding Generator for Java™ (public API).

Public Member Functions | Static Public Member Functions | List of all members
com.jogamp.common.nio.ElementBuffer Class Reference

Hardware independent container holding an array of linearly aligned elements, while its `getDirectBufferAddress()` is-a pointer-type value, i.e. More...

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

## Public Member Functions

final ElementBuffer | put (final ElementBuffer src)
final ByteBuffer | getByteBuffer ()
| Returns the ByteBuffer, i.e. More...
final ByteBuffer | slice (final int offset, final int length)
| Returns a slice of this instance's ByteBuffer `[offset..offset+length)`, i.e. More...
final ByteBuffer | get (final int srcElemPos, final ByteBuffer destElemBytes, final int destElemPos, final int elemCount)
| Absolute get method. More...
final ByteBuffer | get (final int srcElemPos, final ByteBuffer destElemBytes)
| Absolute get method. More...
final ByteBuffer | get (final ByteBuffer destElemBytes)
| Relative get method. More...
final ElementBuffer | get (final ByteBuffer[] destElements, int destElemPos, int elemCount)
| Relative bulk get method. More...
final ElementBuffer | get (final int srcElemPos, final byte[] dest, final int destElemPos, final int elemCount)
| Absolute get method. More...
final ElementBuffer | get (final int srcElemPos, final short[] dest, final int destElemPos, final int elemCount)
| Absolute get method. More...
final ElementBuffer | get (final int srcElemPos, final char[] dest, final int destElemPos, final int elemCount)
| Absolute get method. More...
final ElementBuffer | get (final int srcElemPos, final int[] dest, final int destElemPos, final int elemCount)
| Absolute get method. More...
final ElementBuffer | get (final int srcElemPos, final float[] dest, final int destElemPos, final int elemCount)
| Absolute get method. More...
final ElementBuffer | get (final int srcElemPos, final long[] dest, final int destElemPos, final int elemCount)
| Absolute get method. More...
final ElementBuffer | get (final int srcElemPos, final double[] dest, final int destElemPos, final int elemCount)
| Absolute get method. More...
final ElementBuffer | put (final ByteBuffer srcElemBytes, final int srcElemPos, final int destElemPos, final int elemCount)
| Absolute put method. More...
final ElementBuffer | put (final int destElemPos, final ByteBuffer srcElemBytes)
| Absolute put method. More...
final ElementBuffer | put (final ByteBuffer srcElemBytes)
| Relative put method. More...
final ElementBuffer | put (final ByteBuffer[] srcElements, int offset, int length)
| Relative bulk put method. More...
final ElementBuffer | put (final byte[] src, final int srcElemPos, final int destElemPos, final int elemCount)
| Absolute put method. More...
final ElementBuffer | put (final short[] src, final int srcElemPos, final int destElemPos, final int elemCount)
| Absolute put method. More...
final ElementBuffer | put (final char[] src, final int srcElemPos, final int destElemPos, final int elemCount)
| Absolute put method. More...
final ElementBuffer | put (final int[] src, final int srcElemPos, final int destElemPos, final int elemCount)
| Absolute put method. More...
final ElementBuffer | put (final float[] src, final int srcElemPos, final int destElemPos, final int elemCount)
| Absolute put method. More...
final ElementBuffer | put (final long[] src, final int srcElemPos, final int destElemPos, final int elemCount)
| Absolute put method. More...
final ElementBuffer | put (final double[] src, final int srcElemPos, final int destElemPos, final int elemCount)
| Absolute put method. More...
String | toString ()
Public Member Functions inherited from com.jogamp.common.nio.AbstractBuffer< ElementBuffer >
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 ElementBuffer | allocate (final int elementSize, final int elemCount)
| Returns a non direct PointerBuffer in native order, having a backup array. More...
static ElementBuffer | allocateDirect (final int elementSize, final int elemCount)
| Returns a direct PointerBuffer in native order, w/o backup array. More...
static ElementBuffer | wrap (final int elementSize, final ByteBuffer src)
static ElementBuffer | wrap (final int elementSize, final ByteBuffer src, final int srcByteOffset, final int elemCount)
static ElementBuffer | derefPointer (final int elementSize, final long aptr, final int elemCount)
static ElementBuffer | derefPointer (final int elementSize, final ByteBuffer ptrSrc, final int ptrSrcByteOffset, final int elemCount)

## Additional Inherited Members

Static Public Attributes inherited from com.jogamp.common.nio.AbstractBuffer< ElementBuffer >
static final int | POINTER_SIZE
| Platform dependent pointer size in bytes, i.e. More...
Protected Member Functions inherited from com.jogamp.common.nio.AbstractBuffer< ElementBuffer >
| 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 ()
Protected Attributes inherited from com.jogamp.common.nio.AbstractBuffer< ElementBuffer >
final Buffer | buffer
final int | elementSize
final int | capacity
int | limit
int | position

## Detailed Description

Hardware independent container holding an array of linearly aligned elements, while its `getDirectBufferAddress()` is-a pointer-type value, i.e.

the element-array address.

An instance maps an array of linearly aligned elements, represented as bytes.

Definition at line 46 of file ElementBuffer.java.

## Member Function Documentation

## ◆ allocate()

static ElementBuffer com.jogamp.common.nio.ElementBuffer.allocate | ( | final int | elementSize,
|  | final int | elemCount
| ) |  |

static

Returns a non direct PointerBuffer in native order, having a backup array.

Definition at line 53 of file ElementBuffer.java.

## ◆ allocateDirect()

static ElementBuffer com.jogamp.common.nio.ElementBuffer.allocateDirect | ( | final int | elementSize,
|  | final int | elemCount
| ) |  |

static

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

Definition at line 58 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ derefPointer() [1/2]

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

static

Definition at line 85 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ derefPointer() [2/2]

static ElementBuffer com.jogamp.common.nio.ElementBuffer.derefPointer | ( | final int | elementSize,
|  | final long | aptr,
|  | final int | elemCount
| ) |  |

static

Definition at line 75 of file ElementBuffer.java.

Here is the caller graph for this function:

## ◆ get() [1/11]

final ByteBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final ByteBuffer | destElemBytes | ) |

Relative get method.

Copy the element-bytes at the current position and increment the position by one, storing the element-bytes into `destElemBytes`.

Definition at line 150 of file ElementBuffer.java.

## ◆ get() [2/11]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final ByteBuffer[] | destElements,
|  | int | destElemPos,
|  | int | elemCount
| ) |  |

Relative bulk get method.

Copy the element-bytes `[ position .. position+elemCount [` to the destination array `[ destElements[destElemPos] .. destElements[destElemPos+elemCount] [` and increment the position by `elemCount`.

Definition at line 159 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ get() [3/11]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final int | srcElemPos,
|  | final byte[] | dest,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute get method.

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

Definition at line 174 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ get() [4/11]

final ByteBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final int | srcElemPos,
|  | final ByteBuffer | destElemBytes
| ) |  |

Absolute get method.

Copy the element-bytes from this buffer at the given element-index `srcElemPos`, storing them into `destElemBytes`.

Definition at line 146 of file ElementBuffer.java.

## ◆ get() [5/11]

final ByteBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final int | srcElemPos,
|  | final ByteBuffer | destElemBytes,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute get method.

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

Definition at line 130 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ get() [6/11]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final int | srcElemPos,
|  | final char[] | dest,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute get method.

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

Definition at line 203 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ get() [7/11]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final int | srcElemPos,
|  | final double[] | dest,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute get method.

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

Definition at line 255 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ get() [8/11]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final int | srcElemPos,
|  | final float[] | dest,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute get method.

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

Definition at line 229 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ get() [9/11]

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

Absolute get method.

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

Definition at line 216 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ get() [10/11]

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

Absolute get method.

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

Definition at line 242 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ get() [11/11]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.get | ( | final int | srcElemPos,
|  | final short[] | dest,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute get method.

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

Definition at line 190 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ getByteBuffer()

final ByteBuffer com.jogamp.common.nio.ElementBuffer.getByteBuffer | ( |  | ) |

Returns the ByteBuffer, i.e.

`getBuffer()` w/o casting.

Definition at line 106 of file ElementBuffer.java.

Here is the caller graph for this function:

## ◆ put() [1/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final byte[] | src,
|  | final int | srcElemPos,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute put method.

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

Definition at line 313 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [2/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final ByteBuffer | srcElemBytes | ) |

Relative put method.

Put the element-bytes at the current position and increment the position by one.

Definition at line 290 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [3/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final ByteBuffer | srcElemBytes,
|  | final int | srcElemPos,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute put method.

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

Definition at line 270 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [4/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final ByteBuffer[] | srcElements,
|  | int | offset,
|  | int | length
| ) |  |

Relative bulk put method.

Put the element-bytes `[ srcElements[offset] .. srcElements[offset+length] [` at the current position and increment the position by `length`.

Definition at line 298 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [5/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final char[] | src,
|  | final int | srcElemPos,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute put method.

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

Definition at line 342 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [6/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final double[] | src,
|  | final int | srcElemPos,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute put method.

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

Definition at line 394 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [7/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final ElementBuffer | src | ) |

Definition at line 90 of file ElementBuffer.java.

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

## ◆ put() [8/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final float[] | src,
|  | final int | srcElemPos,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute put method.

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

Definition at line 368 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [9/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final int | destElemPos,
|  | final ByteBuffer | srcElemBytes
| ) |  |

Absolute put method.

Put element-bytes from `srcElemBytes` into the given element-index `destElemPos`

Definition at line 286 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [10/12]

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

Absolute put method.

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

Definition at line 355 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [11/12]

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

Absolute put method.

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

Definition at line 381 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ put() [12/12]

final ElementBuffer com.jogamp.common.nio.ElementBuffer.put | ( | final short[] | src,
|  | final int | srcElemPos,
|  | final int | destElemPos,
|  | final int | elemCount
| ) |  |

Absolute put method.

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

Definition at line 329 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ slice()

final ByteBuffer com.jogamp.common.nio.ElementBuffer.slice | ( | final int | offset,
|  | final int | length
| ) |  |

Returns a slice of this instance's ByteBuffer `[offset..offset+length)`, i.e.

referencing the underlying bytes.

Parameters

  offset | starting element-index within this buffer
  length | element count

Returns
  slice of this instance's ByteBuffer

Definition at line 116 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ toString()

String com.jogamp.common.nio.ElementBuffer.toString | ( |  | ) |

Definition at line 408 of file ElementBuffer.java.

Here is the call graph for this function:

## ◆ wrap() [1/2]

static ElementBuffer com.jogamp.common.nio.ElementBuffer.wrap | ( | final int | elementSize,
|  | final ByteBuffer | src
| ) |  |

static

Definition at line 62 of file ElementBuffer.java.

## ◆ wrap() [2/2]

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

static

Definition at line 65 of file ElementBuffer.java.

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

- src/java/com/jogamp/common/nio/ElementBuffer.java