GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.gluegen.cgram.types.SizeThunk Class Referenceabstract

Provides a level of indirection between the definition of a type's size and the absolute value of this size. More...

Inheritance diagram for com.jogamp.gluegen.cgram.types.SizeThunk:
Collaboration diagram for com.jogamp.gluegen.cgram.types.SizeThunk:

Public Member Functions

Object clone ()
 
final boolean hasFixedNativeSize ()
 
abstract long computeSize (MachineDataInfo machDesc)
 
abstract long computeAlignment (MachineDataInfo machDesc)
 
final int hashCode ()
 
final boolean equals (final Object arg)
 
final int hashCodeSemantics ()
 Semantic hashcode for Types exclusive its given name. More...
 
final boolean equalSemantics (final SemanticEqualityOp arg)
 Semantic equality test for Types exclusive its given name. More...
 
int hashCodeSemantics ()
 Semantic hashcode for Types exclusive its given name. More...
 
boolean equalSemantics (final SemanticEqualityOp arg)
 Semantic equality test for Types exclusive its given name. More...
 

Static Public Member Functions

static void setRelaxedEqualSemanticsTest (final boolean v)
 
static SizeThunk add (final SizeThunk thunk1, final SizeThunk thunk2)
 
static SizeThunk mul (final SizeThunk thunk1, final SizeThunk thunk2)
 
static SizeThunk align (final SizeThunk offsetThunk, final SizeThunk alignmentThunk)
 
static SizeThunk max (final SizeThunk thunk1, final SizeThunk thunk2)
 
static SizeThunk constant (final int constant)
 

Static Public Attributes

static final SizeThunk INT8
 
static final SizeThunk INT16
 
static final SizeThunk INT32
 
static final SizeThunk INTxx
 
static final SizeThunk LONG
 
static final SizeThunk INT64
 
static final SizeThunk FLOAT
 
static final SizeThunk DOUBLE
 
static final SizeThunk POINTER
 

Detailed Description

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.

Definition at line 51 of file SizeThunk.java.

Member Function Documentation

◆ add()

static SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.add ( final SizeThunk  thunk1,
final SizeThunk  thunk2 
)
static

Definition at line 264 of file SizeThunk.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ align()

static SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.align ( final SizeThunk  offsetThunk,
final SizeThunk  alignmentThunk 
)
static

Definition at line 314 of file SizeThunk.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clone()

Object com.jogamp.gluegen.cgram.types.SizeThunk.clone ( )

Definition at line 65 of file SizeThunk.java.

◆ computeAlignment()

abstract long com.jogamp.gluegen.cgram.types.SizeThunk.computeAlignment ( MachineDataInfo  machDesc)
abstract
Here is the caller graph for this function:

◆ computeSize()

abstract long com.jogamp.gluegen.cgram.types.SizeThunk.computeSize ( MachineDataInfo  machDesc)
abstract
Here is the caller graph for this function:

◆ constant()

static SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.constant ( final int  constant)
static

Definition at line 390 of file SizeThunk.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ equals()

final boolean com.jogamp.gluegen.cgram.types.SizeThunk.equals ( final Object  arg)

Definition at line 86 of file SizeThunk.java.

Here is the caller graph for this function:

◆ equalSemantics()

final boolean com.jogamp.gluegen.cgram.types.SizeThunk.equalSemantics ( final SemanticEqualityOp  arg)

Semantic equality test for Types exclusive its given name.

See also
hashCodeSemantics()

Implements com.jogamp.gluegen.cgram.types.TypeComparator.SemanticEqualityOp.

Definition at line 105 of file SizeThunk.java.

Here is the caller graph for this function:

◆ hasFixedNativeSize()

final boolean com.jogamp.gluegen.cgram.types.SizeThunk.hasFixedNativeSize ( )

Definition at line 73 of file SizeThunk.java.

Here is the caller graph for this function:

◆ hashCode()

final int com.jogamp.gluegen.cgram.types.SizeThunk.hashCode ( )

Definition at line 79 of file SizeThunk.java.

Here is the caller graph for this function:

◆ hashCodeSemantics()

final int com.jogamp.gluegen.cgram.types.SizeThunk.hashCodeSemantics ( )

Semantic hashcode for Types exclusive its given name.

See also
equalSemantics(SemanticEqualityOp)

Implements com.jogamp.gluegen.cgram.types.TypeComparator.SemanticEqualityOp.

Definition at line 98 of file SizeThunk.java.

Here is the caller graph for this function:

◆ max()

static SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.max ( final SizeThunk  thunk1,
final SizeThunk  thunk2 
)
static

Definition at line 365 of file SizeThunk.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mul()

static SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.mul ( final SizeThunk  thunk1,
final SizeThunk  thunk2 
)
static

Definition at line 289 of file SizeThunk.java.

Here is the call graph for this function:

◆ setRelaxedEqualSemanticsTest()

static void com.jogamp.gluegen.cgram.types.SizeThunk.setRelaxedEqualSemanticsTest ( final boolean  v)
static

Definition at line 55 of file SizeThunk.java.

Member Data Documentation

◆ DOUBLE

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.DOUBLE
static
Initial value:
= new SizeThunk(true) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.doubleSizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.doubleAlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 8; }
@Override
protected int hashCodeSemanticsImpl() { return magic_float64; }
}
Machine data description for alignment and size onle, see com.jogamp.gluegen.
abstract long computeAlignment(MachineDataInfo machDesc)
abstract long computeSize(MachineDataInfo machDesc)

Definition at line 232 of file SizeThunk.java.

◆ FLOAT

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.FLOAT
static
Initial value:
= new SizeThunk(true) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.floatSizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.floatAlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 7; }
@Override
protected int hashCodeSemanticsImpl() { return magic_float32; }
}

Definition at line 217 of file SizeThunk.java.

◆ INT16

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.INT16
static
Initial value:
= new SizeThunk(true) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.int16SizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.int16AlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 2; }
@Override
protected int hashCodeSemanticsImpl() { return relaxedEqSem ? magic_int32 : magic_int16; }
}

Definition at line 142 of file SizeThunk.java.

◆ INT32

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.INT32
static
Initial value:
= new SizeThunk(true) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.int32SizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.int32AlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 3; }
@Override
protected int hashCodeSemanticsImpl() { return magic_int32; }
}

Definition at line 157 of file SizeThunk.java.

◆ INT64

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.INT64
static
Initial value:
= new SizeThunk(true) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.int64SizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.int64AlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 6; }
@Override
protected int hashCodeSemanticsImpl() { return magic_long64; }
}

Definition at line 202 of file SizeThunk.java.

◆ INT8

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.INT8
static
Initial value:
= new SizeThunk(true) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.int8SizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.int8AlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 1; }
@Override
protected int hashCodeSemanticsImpl() { return relaxedEqSem ? magic_int32 : magic_int08; }
}

Definition at line 127 of file SizeThunk.java.

◆ INTxx

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.INTxx
static
Initial value:
= new SizeThunk(false) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.intSizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.intAlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 4; }
@Override
protected int hashCodeSemanticsImpl() { return relaxedEqSem ? magic_int32 : magic_intxx; }
}

Definition at line 172 of file SizeThunk.java.

◆ LONG

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.LONG
static
Initial value:
= new SizeThunk(false) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.longSizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.longAlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 5; }
@Override
protected int hashCodeSemanticsImpl() { return relaxedEqSem ? magic_long64 : magic_longxx; }
}

Definition at line 187 of file SizeThunk.java.

◆ POINTER

final SizeThunk com.jogamp.gluegen.cgram.types.SizeThunk.POINTER
static
Initial value:
= new SizeThunk(false) {
@Override
public long computeSize(final MachineDataInfo machDesc) {
return machDesc.pointerSizeInBytes();
}
@Override
public long computeAlignment(final MachineDataInfo machDesc) {
return machDesc.pointerAlignmentInBytes();
}
@Override
protected int hashCodeImpl() { return 9; }
@Override
protected int hashCodeSemanticsImpl() { return magic_aptr64; }
}

Definition at line 247 of file SizeThunk.java.


The documentation for this class was generated from the following file: