Package com.jogamp.gluegen.cgram.types
Class SizeThunk
- java.lang.Object
-
- com.jogamp.gluegen.cgram.types.SizeThunk
-
- All Implemented Interfaces:
TypeComparator.SemanticEqualityOp,Cloneable
public abstract class SizeThunk extends Object implements Cloneable, TypeComparator.SemanticEqualityOp
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.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SizeThunkadd(SizeThunk thunk1, SizeThunk thunk2)static SizeThunkalign(SizeThunk offsetThunk, SizeThunk alignmentThunk)Objectclone()abstract longcomputeAlignment(MachineDataInfo machDesc)abstract longcomputeSize(MachineDataInfo machDesc)static SizeThunkconstant(int constant)booleanequals(Object arg)booleanequalSemantics(TypeComparator.SemanticEqualityOp arg)Semantic equality test for Types exclusive its givenname.booleanhasFixedNativeSize()inthashCode()inthashCodeSemantics()Semantic hashcode for Types exclusive its givenname.static SizeThunkmax(SizeThunk thunk1, SizeThunk thunk2)static SizeThunkmul(SizeThunk thunk1, SizeThunk thunk2)static voidsetRelaxedEqualSemanticsTest(boolean v)
-
-
-
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
-
setRelaxedEqualSemanticsTest
public static void setRelaxedEqualSemanticsTest(boolean v)
-
hasFixedNativeSize
public final boolean hasFixedNativeSize()
-
computeSize
public abstract long computeSize(MachineDataInfo machDesc)
-
computeAlignment
public abstract long computeAlignment(MachineDataInfo machDesc)
-
hashCodeSemantics
public final int hashCodeSemantics()
Description copied from interface:TypeComparator.SemanticEqualityOpSemantic hashcode for Types exclusive its givenname.- Specified by:
hashCodeSemanticsin interfaceTypeComparator.SemanticEqualityOp- See Also:
TypeComparator.SemanticEqualityOp.equalSemantics(SemanticEqualityOp)
-
equalSemantics
public final boolean equalSemantics(TypeComparator.SemanticEqualityOp arg)
Description copied from interface:TypeComparator.SemanticEqualityOpSemantic equality test for Types exclusive its givenname.- Specified by:
equalSemanticsin interfaceTypeComparator.SemanticEqualityOp- See Also:
TypeComparator.SemanticEqualityOp.hashCodeSemantics()
-
constant
public static SizeThunk constant(int constant)
-
-