From a0abee0deb699fc97fc1146200c9057de15798d6 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 17 Jun 2023 06:58:51 +0200 Subject: GlueGen Struct [8]: Revised setter (resolved shrinking array, using 'subset' flag), added (detailed) JavaDoc in generated code Revised setter: A) int32_t val[10] -> setter for a subset change only, as-is with args[src, srcPos, destPos, length] - no new memory, reuse only - no special action to be performed B) int32_t* val -> setter with toggle 'subset' with args[subset, src, srcPos, destPos, length], - replace memory w/ 'subset==false' where it also may copy 'destPos' gap from old -> new - reuse memory w/ 'subset==true', where destPos+length <= elementCount C) const int32_t* val -> setter to replace referenced memory only args[src, srcPos, length] - always replaces memory, no copy of a gap (no destPos) Hence: - case (A) stays as is - case (B) will be revised and argument 'boolean subset' added - case (C) will be revised (simplified) and argument 'destPos' removed --- doc/GlueGen_Mapping.html | 507 ++++----------------- doc/GlueGen_Mapping.md | 71 ++- src/java/com/jogamp/gluegen/JavaEmitter.java | 267 +++++++---- src/java/com/jogamp/gluegen/cgram/types/Type.java | 18 +- .../gluegen/test/junit/generation/BaseClass.java | 336 +++++++++++++- 5 files changed, 672 insertions(+), 527 deletions(-) diff --git a/doc/GlueGen_Mapping.html b/doc/GlueGen_Mapping.html index 537ce89..57d2089 100644 --- a/doc/GlueGen_Mapping.html +++ b/doc/GlueGen_Mapping.html @@ -1,407 +1,22 @@ - - + + + + + + + GlueGen_Mapping.md + + + + -