diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:31:44 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:31:44 -0800 |
commit | 9066cfe9886ac131c34d59ed0e2d287b0e3c0087 (patch) | |
tree | d88beb88001f2482911e3d28e43833b50e4b4e97 /opengl/tools/glgen/src/ParameterChecker.java | |
parent | d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 (diff) | |
download | frameworks_base-9066cfe9886ac131c34d59ed0e2d287b0e3c0087.zip frameworks_base-9066cfe9886ac131c34d59ed0e2d287b0e3c0087.tar.gz frameworks_base-9066cfe9886ac131c34d59ed0e2d287b0e3c0087.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'opengl/tools/glgen/src/ParameterChecker.java')
-rw-r--r-- | opengl/tools/glgen/src/ParameterChecker.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/opengl/tools/glgen/src/ParameterChecker.java b/opengl/tools/glgen/src/ParameterChecker.java new file mode 100644 index 0000000..df26acd --- /dev/null +++ b/opengl/tools/glgen/src/ParameterChecker.java @@ -0,0 +1,28 @@ + +import java.io.BufferedReader; +import java.util.HashMap; + +public class ParameterChecker { + + HashMap<String,String[]> map = new HashMap<String,String[]>(); + + public ParameterChecker(BufferedReader reader) throws Exception { + String s; + while ((s = reader.readLine()) != null) { + String[] tokens = s.split("\\s"); + map.put(tokens[0], tokens); + } + } + + public String[] getChecks(String functionName) { + String[] checks = map.get(functionName); + if (checks == null && + (functionName.endsWith("fv") || + functionName.endsWith("xv") || + functionName.endsWith("iv"))) { + functionName = functionName.substring(0, functionName.length() - 2); + checks = map.get(functionName); + } + return checks; + } +} |