aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/JavaConfiguration.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-07-18 15:32:57 +0000
committerSven Gothel <[email protected]>2008-07-18 15:32:57 +0000
commit95617805768e0100f8691eb1b3afd1761e406cd1 (patch)
treed8e9f5e3d5fa5dd937443142ede706c6cb156c9c /src/java/com/sun/gluegen/JavaConfiguration.java
parentc020a396e0cab63fa2b4d283decbea7d20ce3511 (diff)
Adden Config: 'NioOnly [__ALL__|<FuncName>]', fixed other __ALL__ logic
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@102 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/JavaConfiguration.java')
-rw-r--r--src/java/com/sun/gluegen/JavaConfiguration.java28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/java/com/sun/gluegen/JavaConfiguration.java b/src/java/com/sun/gluegen/JavaConfiguration.java
index a6ed790..b64361f 100644
--- a/src/java/com/sun/gluegen/JavaConfiguration.java
+++ b/src/java/com/sun/gluegen/JavaConfiguration.java
@@ -117,6 +117,8 @@ public class JavaConfiguration {
private Set/*<Pattern>*/ ignoreNots = new HashSet();
private Set/*<Pattern>*/ unignores = new HashSet();
private Set/*<Pattern>*/ unimplemented = new HashSet();
+ private boolean forceNioOnly4All=false;
+ private Set/*<String>*/ nioOnly = new HashSet();
private Set/*<String>*/ nioDirectOnly = new HashSet();
private Set/*<String>*/ manuallyImplement = new HashSet();
private Map/*<String,List<String>>*/ customJavaCode = new HashMap();
@@ -431,6 +433,18 @@ public class JavaConfiguration {
return (List) argumentsAreString.get(functionName);
}
+ public boolean isForceNioOnly4All() { return forceNioOnly4All; }
+
+ public void addNioOnly(String fname ) {
+ nioOnly.add(fname);
+ }
+ public boolean nioOnly(String functionName) {
+ return forceNioOnly4All || nioOnly.contains(functionName);
+ }
+
+ public void addNioDirectOnly(String fname ) {
+ nioDirectOnly.add(fname);
+ }
/** Returns true if the given function should only create a java.nio
variant, and no array variants, for <code>void*</code> and other
C primitive pointers. */
@@ -807,8 +821,20 @@ public class JavaConfiguration {
readClassJavadoc(tok, filename, lineNo);
// Warning: make sure delimiters are reset at the top of this loop
// because readClassJavadoc changes them.
+ } else if (cmd.equalsIgnoreCase("NioOnly")) {
+ String funcName = readString("NioOnly", tok, filename, lineNo);
+ if(funcName.equals("__ALL__")) {
+ forceNioOnly4All=true;
+ } else {
+ addNioOnly( funcName );
+ }
} else if (cmd.equalsIgnoreCase("NioDirectOnly")) {
- nioDirectOnly.add(readString("NioDirectOnly", tok, filename, lineNo));
+ String funcName = readString("NioDirectOnly", tok, filename, lineNo);
+ if(funcName.equals("__ALL__")) {
+ forceNioOnly4All=true;
+ } else {
+ addNioDirectOnly( funcName );
+ }
} else if (cmd.equalsIgnoreCase("EmitStruct")) {
forcedStructs.add(readString("EmitStruct", tok, filename, lineNo));
} else if (cmd.equalsIgnoreCase("StructPackage")) {