summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/cgram
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java19
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/CompoundType.java5
2 files changed, 22 insertions, 2 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java b/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java
index a924876..18477c1 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/AliasedSymbol.java
@@ -63,6 +63,9 @@ public interface AliasedSymbol {
/**
* Return all aliases for this symbol, i.e. original names, for this symbol.
* <p>
+ * Inclusive {@link #getOrigName() original-name}, if {@link #rename(String) renamed},
+ * </p>
+ * <p>
* Exclusive {@link #getName() current-name}.
* </p>
* <p>
@@ -71,8 +74,12 @@ public interface AliasedSymbol {
*/
Set<String> getAliasedNames();
/**
+ * Return the original-name as set at creation.
+ */
+ String getOrigName();
+ /**
* Return the current-name, which is the last {@link #rename(String) renamed-name} if issued,
- * or the original-name.
+ * or the {@link #getOrigName() original-name}.
*/
String getName();
/**
@@ -82,10 +89,12 @@ public interface AliasedSymbol {
String getAliasedString();
public static class AliasedSymbolImpl implements AliasedSymbol {
+ private final String origName;
private final HashSet<String> aliasedNames;
private String name;
public AliasedSymbolImpl(final String origName) {
+ this.origName = origName;
this.aliasedNames=new HashSet<String>();
this.name = origName;
}
@@ -112,6 +121,10 @@ public interface AliasedSymbol {
return aliasedNames;
}
@Override
+ public String getOrigName() {
+ return origName;
+ }
+ @Override
public String getName() {
return name;
}
@@ -143,6 +156,10 @@ public interface AliasedSymbol {
return null;
}
@Override
+ public String getOrigName() {
+ return name;
+ }
+ @Override
public String getName() {
return name;
}
diff --git a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
index c3aca40..c9c4223 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
@@ -84,7 +84,10 @@ public abstract class CompoundType extends MemoryLayoutType implements Cloneable
public String getAliasedString() {
return toString();
}
-
+ @Override
+ public String getOrigName() {
+ return getName();
+ }
/**
* @param structName struct name of this CompoundType, i.e. the "foo" in the
construct {@code struct foo { int a, ... };} or {@code struct foo;} <i>even</i> for anonymous structs.