Interface IStructureType

All Superinterfaces:
ICodeItem, ICodeType, INativeItem, INativeItemListenable, INativeType
All Known Subinterfaces:
IClassType

@Ser public interface IStructureType extends INativeType
Type item representing a structure or union (structure wit overlapping fields).

Fields manipulation (addition, removal, etc.) can be done via the structure's controlling type manager.

  • Method Details

    • isStructure

      boolean isStructure()
      Determine whether this type is a structure (not a union).
      Returns:
    • isUnion

      boolean isUnion()
      Determine whether this type is a union (not a structure).
      Returns:
    • getPadding

      int getPadding()
      Retrieve the structure's fields alignment, aka fields padding/packing.

      This value should not be negative. It is 0 if this object represents a union (no padding). In the general case, the value is Integer.MAX_VALUE to indicate that structure fields are aligned on the size of their underlying primitive types, i.e. "natural" padding. Example: a 4-byte integer field would be aligned on a 4-byte boundary. A padding value is value indicates that members are byte-aligned (i.e. not aligned); a padding value of 2 indicates members are aligned on at most 2-bytes, etc.

      Returns:
    • getAlignment

      int getAlignment()
      Retrieve the structure's actual global alignment. It may be bigger than the alignment set when the structure was created (if any was provided).
      Returns:
    • getFieldsCount

      int getFieldsCount()
      Get the number of fields.
      Returns:
    • getFields

      List<? extends IStructureTypeField> getFields()
      Get the list of true (non-synthetic) fields.
      Returns:
    • getIndexOfField

      int getIndexOfField(IStructureTypeField field)
      Get the index of the provided field.
      Parameters:
      field -
      Returns:
    • getFieldsWithGaps

      List<? extends IStructureTypeField> getFieldsWithGaps()
      Get a complete list of fields as well as gaps in-between fields (synthetic fields).
      Returns:
    • getField

      IStructureTypeField getField(int index)
    • getFieldByName

      IStructureTypeField getFieldByName(String name)
    • getFieldAt

      IStructureTypeField getFieldAt(int offset)
    • getFieldAt

      IStructureTypeField getFieldAt(int offset, int bitstart)
    • getFieldOver

      IStructureTypeField getFieldOver(int offset)
    • getFieldAfter

      IStructureTypeField getFieldAfter(int offset)
    • isCircular

      boolean isCircular(INativeType type)