Package ghidra.program.model.data
Interface CompositeInternal
- All Known Subinterfaces:
StructureInternal
,UnionInternal
- All Known Implementing Classes:
CompositeDataTypeImpl
,StructureDataType
,UnionDataType
Interface for common methods in Structure and Union
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
ComponentComparator
provides ability to compare two DataTypeComponent objects based upon their ordinal.static class
OffsetComparator
provides ability to compare an Integer offset with a DataTypeComponent object.static class
OrdinalComparator
provides ability to compare an Integer ordinal with a DataTypeComponent object. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final int
The stored minimum alignment value which indicates the default alignment should be used based upon the packing and component alignment requirements.static final int
The stored packing value which corresponds to a composite that will automatically pack based upon the alignment requirements of its components.static final String
static final String
static final int
The stored minimum alignment value which indicates the machine alignment should be used as the minimum alignment (as defined by the currentDataOrganization.getMachineAlignment()
).static final int
The stored packing value which corresponds to a composite whose packing has been disabled.static final String
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 TypeMethodDescriptionstatic String
getAlignmentAndPackingString
(Composite composite) static String
getMinAlignmentString
(Composite composite) static String
getPackingString
(Composite composite) int
Get the minimum alignment setting for this Composite which contributes to the actual computed alignment value (seeComposite.getAlignment()
.int
Gets the current packing value (typically a power of 2).static String
Dump composite and its components for use inObject.toString()
representation.Methods inherited from interface ghidra.program.model.data.Composite
add, add, add, add, addBitField, align, dataTypeAlignmentChanged, delete, delete, getAlignment, getAlignmentType, getComponent, getComponents, getDefinedComponents, getExplicitMinimumAlignment, getExplicitPackingValue, getNumComponents, getNumDefinedComponents, getPackingType, hasDefaultPacking, hasExplicitMinimumAlignment, hasExplicitPackingValue, insert, insert, insert, isDefaultAligned, isMachineAligned, isPackingEnabled, isPartOf, pack, repack, setDescription, setExplicitMinimumAlignment, setExplicitPackingValue, setPackingEnabled, setToDefaultAligned, setToDefaultPacking, setToMachineAligned
Methods inherited from interface ghidra.program.model.data.DataType
addParent, clone, copy, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, encodeRepresentation, encodeValue, getAlignedLength, 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, setLastChangeTime, setLastChangeTimeInSourceArchive, setName, setNameAndCategory, setSourceArchive
-
Field Details
-
ALIGN_NAME
- See Also:
-
PACKING_NAME
- See Also:
-
DISABLED_PACKING_NAME
- See Also:
-
DEFAULT_PACKING_NAME
- See Also:
-
DEFAULT_PACKING
static final int DEFAULT_PACKINGThe stored packing value which corresponds to a composite that will automatically pack based upon the alignment requirements of its components. A positive pack value will also pack in a similar fashion but will use the pack value as a maximum alignment for each component. SeegetStoredPackingValue()
.- See Also:
-
NO_PACKING
static final int NO_PACKINGThe stored packing value which corresponds to a composite whose packing has been disabled. In the case of structures this will permit explicit component placement by offset within the structure and undefined filler components will be used. This is the initial state of all newly instantiated structures. SeegetStoredPackingValue()
.- See Also:
-
DEFAULT_ALIGNMENT
static final int DEFAULT_ALIGNMENTThe stored minimum alignment value which indicates the default alignment should be used based upon the packing and component alignment requirements. SeegetStoredMinimumAlignment()
.- See Also:
-
MACHINE_ALIGNMENT
static final int MACHINE_ALIGNMENTThe stored minimum alignment value which indicates the machine alignment should be used as the minimum alignment (as defined by the currentDataOrganization.getMachineAlignment()
). SeegetStoredMinimumAlignment()
.- See Also:
-
-
Method Details
-
getStoredPackingValue
int getStoredPackingValue() -
getStoredMinimumAlignment
int getStoredMinimumAlignment()Get the minimum alignment setting for this Composite which contributes to the actual computed alignment value (seeComposite.getAlignment()
.- Returns:
- the minimum alignment setting for this Composite or a reserved value to indicate
either
DEFAULT_ALIGNMENT
orMACHINE_ALIGNMENT
.
-
toString
Dump composite and its components for use inObject.toString()
representation.- Parameters:
composite
- composite instance to be dumped- Returns:
- formatted dump as string
-
getAlignmentAndPackingString
-
getMinAlignmentString
-
getPackingString
-