Package ghidra.program.model.data
Interface Dynamic
-
- All Superinterfaces:
BuiltInDataType
,DataType
,ExtensionPoint
- All Known Implementing Classes:
AbstractStringDataType
,AIFFDataType
,AlignmentDataType
,AUDataType
,BadDataType
,BitmapResourceDataType
,CountedDynamicDataType
,DialogResourceDataType
,DynamicDataType
,GifDataType
,GroupIconResourceDataType
,HTMLResourceDataType
,IconMaskResourceDataType
,IconResourceDataType
,IndexedDynamicDataType
,JPEGDataType
,MenuResourceDataType
,MissingBuiltInDataType
,MUIResourceDataType
,PascalString255DataType
,PascalStringDataType
,PascalUnicodeDataType
,PERichTableDataType
,PngDataType
,RepeatCountDataType
,RepeatedDynamicDataType
,RepeatedStringDataType
,RTTI0DataType
,RTTI1DataType
,RTTI2DataType
,RTTI3DataType
,RTTI4DataType
,RTTIDataType
,StringDataType
,StringUTF8DataType
,StructuredDynamicDataType
,TerminatedStringDataType
,TerminatedUnicode32DataType
,TerminatedUnicodeDataType
,Unicode32DataType
,UnicodeDataType
,WAVEDataType
,WEVTResourceDataType
public interface Dynamic extends BuiltInDataType
A DataType class that must compute its length based upon actual data. This type may be referred to directly within a listing (including pointers). This type may only appear within a structure if canSpecifyLength() returns true. A pointer to this type can always appear within a structure. TypeDef to this data-type should not be allowed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Field Summary
-
Fields inherited from interface ghidra.program.model.data.DataType
CONFLICT_SUFFIX, DEFAULT, NO_LAST_CHANGE_TIME, NO_SOURCE_SYNC_TIME, VOID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canSpecifyLength()
Returns true if a user-specified length can be usedint
getLength(MemBuffer buf, int maxLength)
Compute the length for this data-type which corresponds to the specified memory location.DataType
getReplacementBaseType()
Returns a suitable replacement base data-type for pointers and arrays when exporting to C code-
Methods inherited from interface ghidra.program.model.data.BuiltInDataType
getCTypeDeclaration
-
Methods inherited from interface ghidra.program.model.data.DataType
addParent, clone, copy, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, getAlignment, getCategoryPath, getDataOrganization, getDataTypeManager, getDataTypePath, getDefaultAbbreviatedLabelPrefix, getDefaultLabelPrefix, getDefaultLabelPrefix, getDefaultOffcutLabelPrefix, getDefaultSettings, getDescription, getDisplayName, getDocs, getLastChangeTime, getLastChangeTimeInSourceArchive, getLength, getMnemonic, getName, getParents, getPathName, getRepresentation, getSettingsDefinitions, getSourceArchive, getUniversalID, getValue, getValueClass, isDeleted, isDynamicallySized, isEquivalent, isNotYetDefined, removeParent, replaceWith, setCategoryPath, setDefaultSettings, setDescription, setLastChangeTime, setLastChangeTimeInSourceArchive, setName, setNameAndCategory, setSourceArchive
-
-
-
-
Method Detail
-
getLength
int getLength(MemBuffer buf, int maxLength)
Compute the length for this data-type which corresponds to the specified memory location.- Parameters:
buf
- memory locationmaxLength
- maximum number of bytes to consume in computing length, or -1 for unspecified.- Returns:
- data length or -1 if it could not be determined. Returned length may exceed maxLength if data-type does not supported constrained lengths.
-
canSpecifyLength
boolean canSpecifyLength()
Returns true if a user-specified length can be used
-
getReplacementBaseType
DataType getReplacementBaseType()
Returns a suitable replacement base data-type for pointers and arrays when exporting to C code- Returns:
- suitable base data-type for this Dynamic data-type
-
-