Package ghidra.program.model.data
Interface Union
-
- All Known Implementing Classes:
UnionDataType
public interface Union extends Composite
The union interface
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.program.model.data.Composite
Composite.AlignmentType, Composite.NamedAlignment
-
-
Field Summary
-
Fields inherited from interface ghidra.program.model.data.Composite
DEFAULT_ALIGNMENT_VALUE, NOT_PACKING
-
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 DataTypeComponentadd(DataType dataType)Adds a new datatype to the end of this composite.DataTypeComponentadd(DataType dataType, int length)Adds a new datatype to the end of this composite.DataTypeComponentadd(DataType dataType, int length, java.lang.String name, java.lang.String comment)Adds a new datatype to the end of this composite.voiddelete(int ordinal)Deletes the component at the given ordinal position.DataTypeComponent[]getComponents()Returns an array of Data Type Components that make up this data type.DataTypeComponentinsert(int ordinal, DataType dataType)Inserts a new datatype at the specified ordinal position in this composite.DataTypeComponentinsert(int ordinal, DataType dataType, int length)Inserts a new datatype at the specified ordinal position in this composite.DataTypeComponentinsert(int ordinal, DataType dataType, int length, java.lang.String name, java.lang.String comment)Inserts a new datatype at the specified ordinal position in this composite.-
Methods inherited from interface ghidra.program.model.data.Composite
add, dataTypeAlignmentChanged, delete, getComponent, getMinimumAlignment, getNumComponents, getPackingValue, isDefaultAligned, isInternallyAligned, isMachineAligned, isPartOf, realign, setDescription, setInternallyAligned, setMinimumAlignment, setPackingValue, setToDefaultAlignment, setToMachineAlignment
-
Methods inherited from interface ghidra.program.model.data.DataType
addParent, clone, copy, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, getAlignment, getCategoryPath, 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, setLastChangeTime, setLastChangeTimeInSourceArchive, setName, setNameAndCategory, setSourceArchive
-
-
-
-
Method Detail
-
add
DataTypeComponent add(DataType dataType)
Description copied from interface:CompositeAdds a new datatype to the end of this composite.- Specified by:
addin interfaceComposite- Parameters:
dataType- the datatype to add.- Returns:
- the DataTypeComponent created.
- See Also:
Composite.add(ghidra.program.model.data.DataType)
-
add
DataTypeComponent add(DataType dataType, int length)
Description copied from interface:CompositeAdds a new datatype to the end of this composite.- Specified by:
addin interfaceComposite- Parameters:
dataType- the datatype to add.length- the length to associate with the datatype.- Returns:
- the componentDataType created.
- See Also:
Composite.add(ghidra.program.model.data.DataType, int)
-
add
DataTypeComponent add(DataType dataType, int length, java.lang.String name, java.lang.String comment)
Description copied from interface:CompositeAdds a new datatype to the end of this composite.- Specified by:
addin interfaceComposite- Parameters:
dataType- the datatype to add.length- the length to associate with the datatype.name- the field name to associate with this component.comment- the comment to associate with this component.- Returns:
- the componentDataType created.
- See Also:
Composite.add(ghidra.program.model.data.DataType, int, java.lang.String, java.lang.String)
-
insert
DataTypeComponent insert(int ordinal, DataType dataType)
Description copied from interface:CompositeInserts a new datatype at the specified ordinal position in this composite.
Note: For an aligned structure the ordinal position will get adjusted automatically to provide the proper alignment.- Specified by:
insertin interfaceComposite- Parameters:
ordinal- the ordinal where the new datatype is to be inserted.dataType- the datatype to insert.- Returns:
- the componentDataType created.
- See Also:
Composite.insert(int, ghidra.program.model.data.DataType)
-
insert
DataTypeComponent insert(int ordinal, DataType dataType, int length)
Description copied from interface:CompositeInserts a new datatype at the specified ordinal position in this composite.
Note: For an aligned structure the ordinal position will get adjusted automatically to provide the proper alignment.- Specified by:
insertin interfaceComposite- Parameters:
ordinal- the ordinal where the new datatype is to be inserted.dataType- the datatype to insert.length- the length to associate with the datatype.- Returns:
- the componentDataType created.
- See Also:
Composite.insert(int, ghidra.program.model.data.DataType, int)
-
insert
DataTypeComponent insert(int ordinal, DataType dataType, int length, java.lang.String name, java.lang.String comment)
Description copied from interface:CompositeInserts a new datatype at the specified ordinal position in this composite.
Note: For an aligned structure the ordinal position will get adjusted automatically to provide the proper alignment.- Specified by:
insertin interfaceComposite- Parameters:
ordinal- the ordinal where the new datatype is to be inserted.dataType- the datatype to insert.length- the length to associate with the datatype.name- the field name to associate with this component.comment- the comment to associate with this component.- Returns:
- the componentDataType created.
- See Also:
Composite.insert(int, ghidra.program.model.data.DataType, int, java.lang.String, java.lang.String)
-
delete
void delete(int ordinal)
Description copied from interface:CompositeDeletes the component at the given ordinal position.
Note: For an aligned structure the delete will have no effect if the ordinal position is a component that provides alignment padding.- Specified by:
deletein interfaceComposite- Parameters:
ordinal- the ordinal of the component to be deleted.- See Also:
Composite.delete(int)
-
getComponents
DataTypeComponent[] getComponents()
Description copied from interface:CompositeReturns an array of Data Type Components that make up this data type. Returns an array of length 0 if there are no subcomponents.- Specified by:
getComponentsin interfaceComposite- See Also:
Composite.getComponents()
-
-