aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/DebugEmitter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/DebugEmitter.java')
-rw-r--r--src/java/com/jogamp/gluegen/DebugEmitter.java25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/java/com/jogamp/gluegen/DebugEmitter.java b/src/java/com/jogamp/gluegen/DebugEmitter.java
index 6381c8c..582a1d7 100644
--- a/src/java/com/jogamp/gluegen/DebugEmitter.java
+++ b/src/java/com/jogamp/gluegen/DebugEmitter.java
@@ -39,6 +39,7 @@
package com.jogamp.gluegen;
+import java.io.IOException;
import java.util.*;
import com.jogamp.gluegen.cgram.types.*;
@@ -46,9 +47,16 @@ import com.jogamp.gluegen.cgram.types.*;
/** Debug emitter which prints the parsing results to standard output. */
public class DebugEmitter implements GlueEmitter {
+ protected JavaConfiguration cfg;
@Override
- public void readConfigurationFile(final String filename) {}
+ public void readConfigurationFile(final String filename) throws IOException {
+ cfg = createConfig();
+ cfg.read(filename);
+ }
+
+ @Override
+ public JavaConfiguration getConfiguration() { return cfg; }
@Override
public void beginEmission(final GlueEmitterControls controls) {
@@ -110,10 +118,10 @@ public class DebugEmitter implements GlueEmitter {
}
@Override
- public void emitStruct(final CompoundType t, final String alternateName) {
+ public void emitStruct(final CompoundType t, final Type typedefType) {
String name = t.getName();
- if (name == null && alternateName != null) {
- name = alternateName;
+ if (name == null && typedefType != null) {
+ name = typedefType.getName();
}
System.out.println("Referenced type \"" + name + "\"");
@@ -121,4 +129,13 @@ public class DebugEmitter implements GlueEmitter {
@Override
public void endStructs() {}
+
+ /**
+ * Create the object that will read and store configuration information for
+ * this JavaEmitter.
+ */
+ protected JavaConfiguration createConfig() {
+ return new JavaConfiguration();
+ }
+
}