Package ghidra.program.model.data

# Interface TypeDef

All Superinterfaces:
  `DataType`

All Known Implementing Classes:
  `AbstractPointerTypedefBuiltIn`, `IBO32DataType`, `IBO64DataType`, `PointerTypedef`, `TypedefDataType`

public interface TypeDef extends DataType
The typedef interface

- ## Field Summary

  ### Fields inherited from interface ghidra.program.model.data.DataType

  `CONFLICT_SUFFIX, DEFAULT, NO_LAST_CHANGE_TIME, NO_SOURCE_SYNC_TIME, TYPEDEF_ATTRIBUTE_PREFIX, TYPEDEF_ATTRIBUTE_SUFFIX, VOID`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `enableAutoNaming()`
  Enable auto-naming for this typedef.
  `DataType`
  `getBaseDataType()`
  Returns the non-typedef dataType that this typedef is based on, following chains of typedefs as necessary.
  `DataType`
  `getDataType()`
  Returns the dataType that this typedef is based on.
  `default boolean`
  `hasSameTypeDefSettings(TypeDef dt)`
  Compare the settings of two datatypes which correspond to a `TypeDefSettingsDefinition`.
  `boolean`
  `isAutoNamed()`
  Determine if this datatype use auto-naming (e.g., see `PointerTypedef`).
  `default boolean`
  `isPointer()`
  Determine if this is a Pointer-TypeDef

  ### Methods inherited from interface ghidra.program.model.data.DataType

  `addParent, clone, copy, dataTypeAlignmentChanged, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, encodeRepresentation, encodeValue, getAlignedLength, getAlignment, getCategoryPath, getDataOrganization, getDataTypeManager, getDataTypePath, getDefaultAbbreviatedLabelPrefix, getDefaultLabelPrefix, getDefaultLabelPrefix, getDefaultOffcutLabelPrefix, getDefaultSettings, getDescription, getDisplayName, getDocs, getLastChangeTime, getLastChangeTimeInSourceArchive, getLength, getMnemonic, getName, getParents, getPathName, getRepresentation, getSettingsDefinitions, getSourceArchive, getTypeDefSettingsDefinitions, getUniversalID, getValue, getValueClass, hasLanguageDependantLength, isDeleted, isEncodable, isEquivalent, isNotYetDefined, isZeroLength, removeParent, replaceWith, setCategoryPath, setDescription, setLastChangeTime, setLastChangeTimeInSourceArchive, setName, setNameAndCategory, setSourceArchive`

- ## Method Details

  - ### isAutoNamed

    boolean isAutoNamed()
    Determine if this datatype use auto-naming (e.g., see `PointerTypedef`). If true, any change to associated `TypeDefSettingsDefinition` settings or naming of the pointer-referenced datatype will cause a automatic renaming of this datatype.
    Returns:
      true if auto-named, else false.

  - ### enableAutoNaming

    void enableAutoNaming()
    Enable auto-naming for this typedef. This will force naming to reflect the name of associated datatype plus an attribute list which corresponds to any `TypeDefSettingsDefinition` settings which may be set.

  - ### getDataType

    DataType getDataType()
    Returns the dataType that this typedef is based on. This could be another typedef
    Returns:
      the datatype which this typedef is based on (may be another `TypeDef`).

  - ### getBaseDataType

    DataType getBaseDataType()
    Returns the non-typedef dataType that this typedef is based on, following chains of typedefs as necessary.
    Returns:
      the datatype which this typedef is based on (will not be another `TypeDef`).

  - ### isPointer

    default boolean isPointer()
    Determine if this is a Pointer-TypeDef
    Returns:
      true if base datatype is a pointer

  - ### hasSameTypeDefSettings

    default boolean hasSameTypeDefSettings(TypeDef dt)
    Compare the settings of two datatypes which correspond to a `TypeDefSettingsDefinition`.

    NOTE: It is required that both datatypes present their settings definitions in the same order (see `DataType.getSettingsDefinitions()`) to be considered the same.

    Parameters:
      `dt` - other typedef to compare with
    Returns:
      true if both datatypes have the same settings defined which correspond to `TypeDefSettingsDefinition` and have the same values, else false.