Class SPVParsedHeader

All Implemented Interfaces:
Pointer

public class SPVParsedHeader extends Struct<SPVParsedHeader>

 struct spv_parsed_header_t {
     uint32_t magic;
     uint32_t version;
     uint32_t generator;
     uint32_t bound;
     uint32_t reserved;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • MAGIC

      public static final int MAGIC
      The struct member offsets.
    • VERSION

      public static final int VERSION
      The struct member offsets.
    • GENERATOR

      public static final int GENERATOR
      The struct member offsets.
    • BOUND

      public static final int BOUND
      The struct member offsets.
    • RESERVED

      public static final int RESERVED
      The struct member offsets.
  • Constructor Details

    • SPVParsedHeader

      public SPVParsedHeader(ByteBuffer container)
      Creates a SPVParsedHeader instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<SPVParsedHeader>
    • magic

      public int magic()
      Returns:
      the value of the magic field.
    • version

      public int version()
      Returns:
      the value of the version field.
    • generator

      public int generator()
      Returns:
      the value of the generator field.
    • bound

      public int bound()
      Returns:
      the value of the bound field.
    • create

      public static SPVParsedHeader create(long address)
      Returns a new SPVParsedHeader instance for the specified memory address.
    • createSafe

      public static @Nullable SPVParsedHeader createSafe(long address)
      Like create, but returns null if address is NULL.
    • create

      public static SPVParsedHeader.Buffer create(long address, int capacity)
      Create a SPVParsedHeader.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable SPVParsedHeader.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • nmagic

      public static int nmagic(long struct)
      Unsafe version of magic().
    • nversion

      public static int nversion(long struct)
      Unsafe version of version().
    • ngenerator

      public static int ngenerator(long struct)
      Unsafe version of generator().
    • nbound

      public static int nbound(long struct)
      Unsafe version of bound().
    • nreserved

      public static int nreserved(long struct)