Package ghidra.program.model.data
Interface TypeDef
- All Superinterfaces:
DataType
- All Known Implementing Classes:
AbstractPointerTypedefBuiltIn
,IBO32DataType
,IBO64DataType
,PointerTypedef
,TypedefDataType
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 TypeMethodDescriptionvoid
Enable auto-naming for this typedef.Returns the non-typedef dataType that this typedef is based on, following chains of typedefs as necessary.Returns the dataType that this typedef is based on.default boolean
Compare the settings of two datatypes which correspond to aTypeDefSettingsDefinition
.boolean
Determine if this datatype use auto-naming (e.g., seePointerTypedef
).default boolean
Determine if this is a Pointer-TypeDefMethods 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., seePointerTypedef
). If true, any change to associatedTypeDefSettingsDefinition
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 anyTypeDefSettingsDefinition
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
Compare the settings of two datatypes which correspond to aTypeDefSettingsDefinition
.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.
-