Package ghidra.program.model.data
Interface ProgramBasedDataTypeManager
- All Superinterfaces:
DataTypeManager
,DomainFileBasedDataTypeManager
,FileBasedDataTypeManager
- All Known Implementing Classes:
ProgramBasedDataTypeManagerDB
,ProgramDataTypeManager
Extends DataTypeManager to include methods specific to a data type manager for
a program.
-
Field Summary
Fields inherited from interface ghidra.program.model.data.DataTypeManager
BAD_DATATYPE_ID, BUILT_IN_ARCHIVE_KEY, BUILT_IN_ARCHIVE_UNIVERSAL_ID, BUILT_IN_DATA_TYPES_NAME, DEFAULT_DATATYPE_ID, LOCAL_ARCHIVE_KEY, LOCAL_ARCHIVE_UNIVERSAL_ID, NULL_DATATYPE_ID
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAllSettings
(Data data) Clear all settings for the given data.boolean
clearSetting
(Data data, String name) Clear the specified setting for the given datavoid
deleteAddressRange
(Address startAddr, Address endAddr, TaskMonitor monitor) Removes all settings in the rangeString[]
getInstanceSettingsNames
(Data data) Returns all the instance Settings names used for the specified datagetLongSettingsValue
(Data data, String name) Get the long value for data instance settings.Get the program instance associated with this datatype managergetSettings
(Data data, String name) Gets the value for data instance settings in Object form.getStringSettingsValue
(Data data, String name) Get the String value for data instance settings.boolean
isChangeAllowed
(Data data, SettingsDefinition settingsDefinition) Determine if a settings change is permitted for the specified settingsDefinition.boolean
isEmptySetting
(Data data) Returns true if no settings are set for the given datavoid
moveAddressRange
(Address fromAddr, Address toAddr, long length, TaskMonitor monitor) Move the settings in the range to the new start addressboolean
setLongSettingsValue
(Data data, String name, long value) Set the long value for data instance settings.boolean
setSettings
(Data data, String name, Object value) Set the Object value for data instance settings.boolean
setStringSettingsValue
(Data data, String name, String value) Set the string value for data instance settings.Methods inherited from interface ghidra.program.model.data.DataTypeManager
addDataType, addDataTypeManagerListener, addDataTypes, addInvalidatedListener, allowsDefaultBuiltInSettings, allowsDefaultComponentSettings, associateDataTypeWithArchive, close, contains, containsCategory, createCategory, disassociate, endTransaction, findDataType, findDataTypeForID, findDataTypes, findDataTypes, findEnumValueNames, flushEvents, getAddressMap, getAllComposites, getAllDataTypes, getAllDataTypes, getAllFunctionDefinitions, getAllStructures, getCallingConvention, getCategory, getCategory, getCategoryCount, getDataOrganization, getDataType, getDataType, getDataType, getDataType, getDataType, getDataTypeCount, getDataTypes, getDataTypesContaining, getDefaultCallingConvention, getDefinedCallingConventionNames, getFavorites, getID, getKnownCallingConventionNames, getLastChangeTimeForMyManager, getLocalSourceArchive, getName, getPointer, getPointer, getProgramArchitecture, getProgramArchitectureSummary, getResolvedID, getRootCategory, getSourceArchive, getSourceArchives, getType, getUniqueName, getUniversalID, isFavorite, isUpdatable, openTransaction, remove, removeDataTypeManagerListener, removeInvalidatedListener, removeSourceArchive, replaceDataType, resolve, resolveSourceArchive, setFavorite, setName, startTransaction, updateSourceArchiveName, updateSourceArchiveName, withTransaction, withTransaction
Methods inherited from interface ghidra.program.model.data.DomainFileBasedDataTypeManager
getDomainFile
Methods inherited from interface ghidra.program.model.data.FileBasedDataTypeManager
getPath
-
Method Details
-
getProgram
Program getProgram()Get the program instance associated with this datatype manager- Returns:
- program instance associated with this datatype manager
-
isChangeAllowed
Determine if a settings change is permitted for the specified settingsDefinition.- Parameters:
data
- data code unitsettingsDefinition
- settings definition- Returns:
- true if change permitted else false
-
setLongSettingsValue
Set the long value for data instance settings.- Parameters:
data
- data code unitname
- settings namevalue
- value of setting- Returns:
- true if the settings actually changed
-
setStringSettingsValue
Set the string value for data instance settings.- Parameters:
data
- data code unitname
- settings namevalue
- value of setting- Returns:
- true if the settings actually changed
-
setSettings
Set the Object value for data instance settings.- Parameters:
data
- data code unitname
- the name of the settingsvalue
- the value for the settings, must be either a String, byte[] or Long- Returns:
- true if the settings were updated
-
getLongSettingsValue
Get the long value for data instance settings.- Parameters:
data
- data code unitname
- settings name- Returns:
- null if the named setting was not found
-
getStringSettingsValue
Get the String value for data instance settings.- Parameters:
data
- data code unitname
- settings name- Returns:
- null if the named setting was not found
-
getSettings
Gets the value for data instance settings in Object form.- Parameters:
data
- data code unitname
- the name of settings.- Returns:
- the settings object
-
clearSetting
Clear the specified setting for the given data- Parameters:
data
- data code unitname
- settings name- Returns:
- true if the settings were cleared
-
clearAllSettings
Clear all settings for the given data.- Parameters:
data
- data code unit
-
getInstanceSettingsNames
Returns all the instance Settings names used for the specified data- Parameters:
data
- data code unit- Returns:
- the names
-
isEmptySetting
Returns true if no settings are set for the given data- Parameters:
data
- data code unit- Returns:
- true if not settings
-
moveAddressRange
void moveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor) throws CancelledException Move the settings in the range to the new start address- Parameters:
fromAddr
- start address from where to movetoAddr
- new Address to move tolength
- number of addresses to movemonitor
- progress monitor- Throws:
CancelledException
- if the operation was cancelled
-
deleteAddressRange
void deleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor) throws CancelledException Removes all settings in the range- Parameters:
startAddr
- the first address in the range.endAddr
- the last address in the range.monitor
- the progress monitor- Throws:
CancelledException
- if the user cancelled the operation.
-