aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/cgram
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-16 01:10:46 +0200
committerSven Gothel <[email protected]>2023-06-16 01:10:46 +0200
commit0a9105dd3ebbcf4b98664e50333334bff677031c (patch)
treef88ee400fa386e6f98b1336c2428f8ebcd6a3c72 /src/java/com/jogamp/gluegen/cgram
parentf1678c4ac8b85c85d11b737d08dcfe31b388e021 (diff)
GlueGen Struct [3]: Adopt to CodeUnit Abstraction (replacing plain PrintWriter...)
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/CompoundType.java10
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) {