JogAmp GlueGen Code Generator

GlueGen Data Type Mapping

Gluegen has build-in types (terminal symbols) for:

type java bits native-x32 bitsnative-x64 bitstype signed origin
void 0 0 0 void void ANSI-C
char 8 8 8 integersigned or unsignedANSI-C
short 16 16 16 integersigned or unsignedANSI-C
int 32 32 32 integersigned or unsignedANSI-C
long 64 32 321 integersigned or unsignedWindows
long 64 32 64 integersigned or unsignedUnix
float 32 32 32 float signed ANSI-C
double 64 64 64 double signed ANSI-C
__int32 32 32 32 integersigned or unsignedwindows
int32_t 32 32 32 integersigned stdint.h
wchar_t 32 32 32 integersigned stddef.h
uint32_t 32 32 32 integerunsigned stdint.h
__int64 64 64 64 integersigned or unsignedwindows
int64_t 64 64 64 integersigned stdint.h
uint64_t 64 64 64 integerunsigned stdint.h
ptrdiff_t 64 32 64 integersigned stddef.h
intptr_t 64 32 64 integersigned stdint.h
size_t 64 32 64 integerunsigned stddef.h
uintptr_t 64 32 64 integerunsigned stdint.h

Warning: Try to avoid unspecified bit sized types, especially long, since it differs on Unix and Windows!
Note 1: Type long will result in broken code on Windows, since we don't differentiate the OS and it's bit size is ambiguous.

GlueGen Platform Header Files

GlueGen provides convenient platform headers,
which can be included in your C header files for native compilation and GlueGen code generation.

Example:
   #include <gluegen_stdint.h>
   #include <gluegen_stddef.h>
 
   uint64_t test64;
   size_t size1;
   ptrdiff_t ptr1;
  

To compile this file you have to include the following folder to your compilers system includes, ie -I:
    gluegen/make/stub_includes/platform
  

To generate code for this file you have to include the following folder to your GlueGen includeRefid element:
    gluegen/make/stub_includes/gluegen
  

GlueGen Pre-Defined Macros

To identity a GlueGen code generation run, GlueGen defines the following macros:
     #define __GLUEGEN__ 2