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 SizeThunk
add(SizeThunk thunk1, SizeThunk thunk2)
static SizeThunk
align(SizeThunk offsetThunk, SizeThunk alignmentThunk)
Object
clone()
abstract long
computeAlignment(MachineDataInfo machDesc)
abstract long
computeSize(MachineDataInfo machDesc)
static SizeThunk
constant(int constant)
boolean
equals(Object arg)
boolean
equalSemantics(TypeComparator.SemanticEqualityOp arg)
Semantic equality test for Types exclusive its givenname
.boolean
hasFixedNativeSize()
int
hashCode()
int
hashCodeSemantics()
Semantic hashcode for Types exclusive its givenname
.static SizeThunk
max(SizeThunk thunk1, SizeThunk thunk2)
static SizeThunk
mul(SizeThunk thunk1, SizeThunk thunk2)
static void
setRelaxedEqualSemanticsTest(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.SemanticEqualityOp
Semantic hashcode for Types exclusive its givenname
.- Specified by:
hashCodeSemantics
in interfaceTypeComparator.SemanticEqualityOp
- See Also:
TypeComparator.SemanticEqualityOp.equalSemantics(SemanticEqualityOp)
-
equalSemantics
public final boolean equalSemantics(TypeComparator.SemanticEqualityOp arg)
Description copied from interface:TypeComparator.SemanticEqualityOp
Semantic equality test for Types exclusive its givenname
.- Specified by:
equalSemantics
in interfaceTypeComparator.SemanticEqualityOp
- See Also:
TypeComparator.SemanticEqualityOp.hashCodeSemantics()
-
constant
public static SizeThunk constant(int constant)
-
-