From f321f151a652b9722af489a82793ac2802769638 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 18 Jul 2008 15:41:10 +0000 Subject: Added Config: 'NioDirectOnly [__ALL__|]' git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@103 a78bb65f-1512-4460-ba86-f6dc96a7bf27 --- src/java/com/sun/gluegen/JavaConfiguration.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/java/com/sun/gluegen/JavaConfiguration.java b/src/java/com/sun/gluegen/JavaConfiguration.java index b64361f..cfa2d8b 100644 --- a/src/java/com/sun/gluegen/JavaConfiguration.java +++ b/src/java/com/sun/gluegen/JavaConfiguration.java @@ -119,6 +119,7 @@ public class JavaConfiguration { private Set/**/ unimplemented = new HashSet(); private boolean forceNioOnly4All=false; private Set/**/ nioOnly = new HashSet(); + private boolean forceNioDirectOnly4All=false; private Set/**/ nioDirectOnly = new HashSet(); private Set/**/ manuallyImplement = new HashSet(); private Map/*>*/ customJavaCode = new HashMap(); @@ -442,6 +443,8 @@ public class JavaConfiguration { return forceNioOnly4All || nioOnly.contains(functionName); } + public boolean isForceNioDirectOnly4All() { return forceNioDirectOnly4All; } + public void addNioDirectOnly(String fname ) { nioDirectOnly.add(fname); } @@ -449,7 +452,7 @@ public class JavaConfiguration { variant, and no array variants, for void* and other C primitive pointers. */ public boolean nioDirectOnly(String functionName) { - return nioDirectOnly.contains(functionName); + return forceNioDirectOnly4All || nioDirectOnly.contains(functionName); } /** Returns true if the glue code for the given function will be @@ -831,7 +834,7 @@ public class JavaConfiguration { } else if (cmd.equalsIgnoreCase("NioDirectOnly")) { String funcName = readString("NioDirectOnly", tok, filename, lineNo); if(funcName.equals("__ALL__")) { - forceNioOnly4All=true; + forceNioDirectOnly4All=true; } else { addNioDirectOnly( funcName ); } -- cgit v1.2.3