aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-03-30 18:46:45 +0200
committerMichael Bien <[email protected]>2010-03-30 18:46:45 +0200
commit3946dbecf6018ddd7a404af60e7d7e9907491721 (patch)
treecb5bd3209426ce798b33e300416b7323f3cf9f3e
parent84e5ba7a4821469f43c0f4bbeaa8e383b203d050 (diff)
introduced internal NativeBuffer interface, this can be made public as soon we move to java language level 5.
removed accidentally commited verbose javac property in build-junit.xml.
-rw-r--r--make/build-junit.xml1
-rw-r--r--src/java/com/jogamp/gluegen/runtime/Int64Buffer.java2
-rw-r--r--src/java/com/jogamp/gluegen/runtime/NativeBuffer.java48
-rw-r--r--src/java/com/jogamp/gluegen/runtime/PointerBuffer.java2
4 files changed, 50 insertions, 3 deletions
diff --git a/make/build-junit.xml b/make/build-junit.xml
index 518d58a..c8e7b86 100644
--- a/make/build-junit.xml
+++ b/make/build-junit.xml
@@ -103,7 +103,6 @@
<javac destdir="${build_t.java}"
source="1.5" debug="true"
fork="yes"
- verbose="true"
debuglevel="lines,vars,source">
<classpath refid="junit.compile.classpath"/>
<src path="${test.base.dir}"/>
diff --git a/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java b/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java
index 98d0834..c110310 100644
--- a/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java
+++ b/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java
@@ -37,7 +37,7 @@ import java.nio.ByteBuffer;
* @author Michael Bien
* @author Sven Gothel
*/
-public abstract class Int64Buffer {
+public abstract class Int64Buffer implements NativeBuffer/*<PointerBuffer>*/ {
protected final ByteBuffer bb;
protected int capacity;
diff --git a/src/java/com/jogamp/gluegen/runtime/NativeBuffer.java b/src/java/com/jogamp/gluegen/runtime/NativeBuffer.java
new file mode 100644
index 0000000..d3587e3
--- /dev/null
+++ b/src/java/com/jogamp/gluegen/runtime/NativeBuffer.java
@@ -0,0 +1,48 @@
+
+/*
+ * Created on Tuesday, March 30 2010 18:22
+ */
+package com.jogamp.gluegen.runtime;
+
+import java.nio.ByteBuffer;
+
+/**
+ * Hardware independent container for various kinds of buffers.
+ *
+ * @author Michael Bien
+ * @author Sven Gothel
+ */
+/*public*/ interface NativeBuffer/*<B extends NativeBuffer>*/ { // make public as soon we support generics
+
+ public boolean hasRemaining();
+
+ public boolean isDirect();
+
+ public int limit();
+
+ public int position();
+
+ public int remaining();
+
+ public long[] array();
+
+ public int capacity();
+/*
+ public B rewind();
+
+ public B position(int newPos);
+
+ public B put(int index, long value);
+
+ public B put(long value);
+
+ public B put(B src);
+*/
+ public long get();
+
+ public long get(int idx);
+
+ public ByteBuffer getBuffer();
+
+
+}
diff --git a/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java b/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
index 3ee7b54..e68fd72 100644
--- a/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
+++ b/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
@@ -43,7 +43,7 @@ import java.util.HashMap;
* @author Michael Bien
* @author Sven Gothel
*/
-public abstract class PointerBuffer {
+public abstract class PointerBuffer implements NativeBuffer/*<PointerBuffer>*/ {
protected final ByteBuffer bb;
protected int capacity;