com.jogamp.gluegen.cgram.types

## Class SizeThunk

- java.lang.Object
- - com.jogamp.gluegen.cgram.types.SizeThunk

- All Implemented Interfaces:
    Cloneable

      public abstract class SizeThunk
      extends Object
      implements Cloneable

  Provides a level of indirection between the definition of a type's size and the absolute value of this size. Necessary when generating glue code for two different CPU architectures (e.g., 32-bit and 64-bit) from the same internal representation of the various types involved.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SizeThunk` | `DOUBLE`
    `static SizeThunk` | `FLOAT`
    `static SizeThunk` | `INT16`
    `static SizeThunk` | `INT32`
    `static SizeThunk` | `INT64`
    `static SizeThunk` | `INT8`
    `static SizeThunk` | `INTxx`
    `static SizeThunk` | `LONG`
    `static SizeThunk` | `POINTER`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SizeThunk` | `add(SizeThunk thunk1, SizeThunk thunk2)`
    `static SizeThunk` | `align(SizeThunk offsetThunk, SizeThunk alignmentThunk)`
    `Object` | `clone()`
    `abstract long` | `computeAlignment(MachineDescription machDesc)`
    `abstract long` | `computeSize(MachineDescription machDesc)`
    `static SizeThunk` | `constant(int constant)`
    `boolean` | `hasFixedNativeSize()`
    `static SizeThunk` | `max(SizeThunk thunk1, SizeThunk thunk2)`
    `static SizeThunk` | `mul(SizeThunk thunk1, SizeThunk thunk2)`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INT8

          public static final SizeThunk INT8

    - #### INT16

          public static final SizeThunk INT16

    - #### INT32

          public static final SizeThunk INT32

    - #### INTxx

          public static final SizeThunk INTxx

    - #### LONG

          public static final SizeThunk LONG

    - #### INT64

          public static final SizeThunk INT64

    - #### FLOAT

          public static final SizeThunk FLOAT

    - #### DOUBLE

          public static final SizeThunk DOUBLE

    - #### POINTER

          public static final SizeThunk POINTER

  - ### Method Detail

    - #### clone

          public Object clone()

      Overrides:
        `clone` in class `Object`

    - #### hasFixedNativeSize

          public final boolean hasFixedNativeSize()

    - #### computeSize

          public abstract long computeSize(MachineDescription machDesc)

    - #### computeAlignment

          public abstract long computeAlignment(MachineDescription machDesc)

    - #### add

          public static SizeThunk add(SizeThunk thunk1,
                      SizeThunk thunk2)

    - #### mul

          public static SizeThunk mul(SizeThunk thunk1,
                      SizeThunk thunk2)

    - #### align

          public static SizeThunk align(SizeThunk offsetThunk,
                        SizeThunk alignmentThunk)

    - #### max

          public static SizeThunk max(SizeThunk thunk1,
                      SizeThunk thunk2)

    - #### constant

          public static SizeThunk constant(int constant)