com.jogamp.common.nio
Class PointerBuffer
java.lang.Object
com.jogamp.common.nio.AbstractBuffer<B>
com.jogamp.common.nio.AbstractLongBuffer<PointerBuffer>
com.jogamp.common.nio.PointerBuffer
- All Implemented Interfaces:
- NativeBuffer<PointerBuffer>
public abstract class PointerBuffer
- extends AbstractLongBuffer<PointerBuffer>
Hardware independent container for native pointer arrays.
The native values (NIO direct ByteBuffer) might be 32bit or 64bit wide,
depending of the CPU pointer width.
- Author:
- Michael Bien, Sven Gothel
dataMap
protected HashMap<Long,Buffer> dataMap
PointerBuffer
protected PointerBuffer(ByteBuffer bb)
allocate
public static PointerBuffer allocate(int size)
allocateDirect
public static PointerBuffer allocateDirect(int size)
wrap
public static PointerBuffer wrap(ByteBuffer src)
elementSize
public static int elementSize()
put
public final PointerBuffer put(PointerBuffer src)
- Description copied from class:
AbstractLongBuffer
- Relative bulk get method. Copy the source values
src[position .. capacity] [
to this buffer and increment the position by capacity-position
.
- Specified by:
put
in interface NativeBuffer<PointerBuffer>
- Overrides:
put
in class AbstractLongBuffer<PointerBuffer>
referenceBuffer
public final PointerBuffer referenceBuffer(int index,
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.
referenceBuffer
public final PointerBuffer referenceBuffer(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.
getReferencedBuffer
public final Buffer getReferencedBuffer(int index)
getReferencedBuffer
public final Buffer getReferencedBuffer()
toString
public String toString()
- Overrides:
toString
in class AbstractBuffer<PointerBuffer>