diff options
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r-- | src/java/com/jogamp/gluegen/cgram/types/CompoundType.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java index 56bcdda..fea2446 100644 --- a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java +++ b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java @@ -179,6 +179,16 @@ public abstract class CompoundType extends MemoryLayoutType implements Cloneable return fields.get(i); } + /** Returns the <i>name</i> matching field of this type. */ + public Field getField(final String name) { + for(final Field f : fields ) { + if( f.getName().equals(name) ) { + return f; + } + } + return null; + } + /** Adds a field to this type. */ public void addField(final Field f) { if (bodyParsed) { |