Interface Mapping<L extends MemoryLayout>

All Known Subinterfaces:
DataMapping<L>, GroupBinder<L,T>, GroupMapping<L>, IntegerMapping<L>, Mapping.Byte, Mapping.CLong, Mapping.Int, Mapping.Long, Mapping.Short, Mapping.Size, PrimitiveMapping<L>, StructBinder<T>, UnionBinder<T>
All Known Implementing Classes:
Mapping.Boolean, Mapping.Char, Mapping.Double, Mapping.Float, Mapping.Opaque, Mapping.Pointer, Mapping.Sequence, Mapping.Struct, Mapping.Union

public interface Mapping<L extends MemoryLayout>
  • Method Details

    • layout

      L layout()
      Returns the layout associated with this mapping.
      Returns:
      the memory layout
    • typedef

      Mapping<L> typedef(String name)
      Creates a new instance of this mapping with the specified type name.
      Returns:
      the new mapping
    • cconst

      Mapping<L> cconst()
      Creates a new instance of this mapping with the C const qualifier
      Returns:
      the new mapping
    • p

      default Mapping.Pointer p()
      Creates a pointer mapping that targets this mapping.
      Returns:
      the pointer mapping
    • createOpaque

      static Mapping.Opaque createOpaque(String name)
      Creates an opaque mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createBoolean

      static Mapping.Boolean createBoolean(String name)
      Creates a boolean mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createByte

      static Mapping.Byte createByte(String name, boolean signed)
      Creates a byte mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createChar

      static Mapping.Char createChar(String name)
      Creates a char mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createShort

      static Mapping.Short createShort(String name, boolean signed)
      Creates a short mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createInt

      static Mapping.Int createInt(String name, boolean signed)
      Creates an int mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createLong

      static Mapping.Long createLong(String name, boolean signed)
      Creates a long mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createCLong

      static Mapping.CLong createCLong(String name, boolean signed)
      Creates a C long mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createSize

      static Mapping.Size createSize(String name, boolean signed)
      Creates a size_t integer mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createFloat

      static Mapping.Float createFloat(String name)
      Creates a float mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping
    • createDouble

      static Mapping.Double createDouble(String name)
      Creates a double mapping with the specified name.
      Parameters:
      name - the type name
      Returns:
      the new mapping