Package cppclassanalyzer.data.manager
Class ArchiveClassTypeInfoManager
java.lang.Object
ghidra.program.database.data.DataTypeManagerDB
ghidra.program.model.data.StandAloneDataTypeManager
cppclassanalyzer.data.manager.ArchiveClassTypeInfoManager
- All Implemented Interfaces:
ClassTypeInfoManager
,FileArchiveClassTypeInfoManager
,ErrorHandler
,DataTypeManager
,FileBasedDataTypeManager
public final class ArchiveClassTypeInfoManager extends StandAloneDataTypeManager implements FileArchiveClassTypeInfoManager
-
Field Summary
Fields inherited from class ghidra.program.model.data.StandAloneDataTypeManager
name
Fields inherited from class ghidra.program.database.data.DataTypeManagerDB
dataOrganization, dbHandle, defaultListener, sourceArchiveAdapter, universalID
Fields inherited from interface cppclassanalyzer.data.ClassTypeInfoManager
INVALID_KEY
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 Type Method Description void
close()
static ArchiveClassTypeInfoManager
createManager(ClassTypeInfoManagerService plugin, File file)
Icon
getIcon(boolean expanded)
Gets the icon for this manager to be used in theTypeInfoArchiveGTree
String
getPath()
ClassTypeInfoManagerPlugin
getPlugin()
TypeInfoTreeNodeManager
getTreeNodeManager()
Gets theTypeInfoTreeNodeManager
for this ClassTypeInfoManagerClassTypeInfoDB
getType(long key)
Gets the ClassTypeInfo for the corresponding database keyClassTypeInfoDB
getType(Function fun)
Gets the ClassTypeInfo for the correspondingFunction
ClassTypeInfoDB
getType(GhidraClass gc)
Gets the ClassTypeInfo for the correspondingGhidraClass
ClassTypeInfoDB
getType(String symbolName)
Gets the ClassTypeInfo with the specified symbol.ClassTypeInfoDB
getType(String name, Namespace namespace)
Gets the ClassTypeInfo with the specified name andNamespace
int
getTypeCount()
Gets the number of managed ClassTypeInfosIterable<ClassTypeInfoDB>
getTypes()
Gets an iterable over all the managed ClassTypeInfosStream<ClassTypeInfoDB>
getTypeStream()
Gets a stream of all the managed ClassTypeInfosboolean
isChanged()
Checks if data in the manager has been changedboolean
isModifiable()
Checks if the manager can be changedstatic ArchiveClassTypeInfoManager
open(ClassTypeInfoManagerService plugin, File file, boolean openForUpdate)
static FileArchiveClassTypeInfoManager
openIfManagerArchive(ClassTypeInfoManagerPlugin plugin, Archive archive)
void
populate(ProgramClassTypeInfoManager manager, TaskMonitor monitor)
ArchivedClassTypeInfo
resolve(GnuClassTypeInfoDB type)
ArchivedClassTypeInfo
resolve(ClassTypeInfo type)
Returns a ClassTypeInfo that is managed by this ClassTypeInfoManager.void
save()
Saves all changed dataMethods inherited from class ghidra.program.model.data.StandAloneDataTypeManager
deleteDataTypeIDs, endTransaction, finalize, flushEvents, getDomainFileID, getName, getType, replaceDataTypeIDs, setName, startTransaction
Methods inherited from class ghidra.program.database.data.DataTypeManagerDB
addDataType, addDataTypeManagerListener, addDataTypes, addDataTypeToDelete, addInvalidatedListener, associateDataTypeWithArchive, categoryCreated, categoryMoved, categoryRemoved, categoryRenamed, clearAllSettings, clearSetting, clearSettings, contains, containsCategory, createCategory, dataTypeAdded, dataTypeChanged, dataTypeDeleted, dataTypeMoved, dataTypeNameChanged, dataTypeReplaced, dbError, deleteAddressRange, disassociate, dispose, doSourceArchiveUpdates, favoritesChanged, findDataType, findDataTypeForID, findDataTypes, findDataTypes, findEnumValueNames, fixupComposites, getAllComposites, getAllDataTypes, getAllDataTypes, getAllStructures, getByteSettingsValue, getCategory, getCategory, getCategoryCount, getDataOrganization, getDataType, getDataType, getDataType, getDataType, getDataType, getDataTypeCount, getDataTypes, getDataTypes, getDataTypesContaining, getFavorites, getID, getLastChangeTimeForMyManager, getLocalSourceArchive, getLongSettingsValue, getNames, getPointer, getPointer, getResolvedID, getRootCategory, getSettings, getSourceArchive, getSourceArchive, getSourceArchives, getStringSettingsValue, getUniqueName, getUniqueName, getUniversalID, getUnusedConflictName, invalidateCache, isCreatingDataType, isEmptySetting, isFavorite, isTransactionActive, isUpdatable, moveAddressRange, remove, removeDataTypeManagerListener, removeInvalidatedListener, removeSourceArchive, replaceDataType, replaceSourceArchive, resolve, resolveSourceArchive, setByteSettingsValue, setFavorite, setLongSettingsValue, setSettings, setStringSettingsValue, sourceArchiveAdded, sourceArchiveChanged, updateID, updateSourceArchiveName, updateSourceArchiveName
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cppclassanalyzer.data.ClassTypeInfoManager
addListener, getName, removeListener
Methods inherited from interface ghidra.program.model.data.DataTypeManager
addDataType, addDataTypeManagerListener, addDataTypes, addInvalidatedListener, associateDataTypeWithArchive, contains, containsCategory, createCategory, dataTypeChanged, disassociate, endTransaction, findDataType, findDataTypeForID, findDataTypes, findDataTypes, findEnumValueNames, flushEvents, getAllComposites, getAllDataTypes, getAllDataTypes, getAllStructures, getCategory, getCategory, getCategoryCount, getDataOrganization, getDataType, getDataType, getDataType, getDataType, getDataType, getDataTypeCount, getDataTypes, getDataTypesContaining, getFavorites, getID, getLastChangeTimeForMyManager, getLocalSourceArchive, getName, getPointer, getPointer, getResolvedID, getRootCategory, getSourceArchive, getSourceArchives, getType, getUniqueName, getUniversalID, isFavorite, isUpdatable, remove, removeDataTypeManagerListener, removeInvalidatedListener, removeSourceArchive, replaceDataType, resolve, resolveSourceArchive, setFavorite, setName, startTransaction, updateSourceArchiveName, updateSourceArchiveName
Methods inherited from interface db.util.ErrorHandler
dbError
-
Method Details
-
getPlugin
- Specified by:
getPlugin
in interfaceFileArchiveClassTypeInfoManager
-
createManager
public static ArchiveClassTypeInfoManager createManager(ClassTypeInfoManagerService plugin, File file) throws IOException- Throws:
IOException
-
getPath
- Specified by:
getPath
in interfaceFileBasedDataTypeManager
- Overrides:
getPath
in classStandAloneDataTypeManager
-
isModifiable
public boolean isModifiable()Description copied from interface:FileArchiveClassTypeInfoManager
Checks if the manager can be changed- Specified by:
isModifiable
in interfaceFileArchiveClassTypeInfoManager
- Returns:
- true if the manager can be changed
-
open
public static ArchiveClassTypeInfoManager open(ClassTypeInfoManagerService plugin, File file, boolean openForUpdate) throws IOException- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceDataTypeManager
- Overrides:
close
in classStandAloneDataTypeManager
-
isChanged
public boolean isChanged()Description copied from interface:FileArchiveClassTypeInfoManager
Checks if data in the manager has been changed- Specified by:
isChanged
in interfaceFileArchiveClassTypeInfoManager
- Overrides:
isChanged
in classDataTypeManagerDB
- Returns:
- true if data has been changed
-
save
public void save()Description copied from interface:FileArchiveClassTypeInfoManager
Saves all changed data- Specified by:
save
in interfaceFileArchiveClassTypeInfoManager
-
resolve
Description copied from interface:ClassTypeInfoManager
Returns a ClassTypeInfo that is managed by this ClassTypeInfoManager. If one does not currently exist a new one is created.- Specified by:
resolve
in interfaceClassTypeInfoManager
- Parameters:
type
- the type to resolve- Returns:
- the equivalent type managed by this ClassTypeInfoManager
-
resolve
-
getTypeStream
Description copied from interface:ClassTypeInfoManager
Gets a stream of all the managed ClassTypeInfos- Specified by:
getTypeStream
in interfaceClassTypeInfoManager
- Returns:
- a stream of all the managed ClassTypeInfos
-
getType
Description copied from interface:ClassTypeInfoManager
Gets the ClassTypeInfo for the correspondingGhidraClass
- Specified by:
getType
in interfaceClassTypeInfoManager
- Parameters:
gc
- the GhidraClass- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
getType
Description copied from interface:ClassTypeInfoManager
Gets the ClassTypeInfo for the correspondingFunction
- Specified by:
getType
in interfaceClassTypeInfoManager
- Parameters:
fun
- the function- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
getType
Description copied from interface:ClassTypeInfoManager
Gets the ClassTypeInfo with the specified name andNamespace
- Specified by:
getType
in interfaceClassTypeInfoManager
- Parameters:
name
- the type's namenamespace
- the type's namespace- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
getType
Description copied from interface:ClassTypeInfoManager
Gets the ClassTypeInfo with the specified symbol. The supplied symbol should be mangled.- Specified by:
getType
in interfaceClassTypeInfoManager
- Parameters:
symbolName
- the mangled symbol name- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
populate
public void populate(ProgramClassTypeInfoManager manager, TaskMonitor monitor) throws CancelledException- Throws:
CancelledException
-
getTypeCount
public int getTypeCount()Description copied from interface:ClassTypeInfoManager
Gets the number of managed ClassTypeInfos- Specified by:
getTypeCount
in interfaceClassTypeInfoManager
- Returns:
- the number of managed ClassTypeInfos
-
getTypes
Description copied from interface:ClassTypeInfoManager
Gets an iterable over all the managed ClassTypeInfos- Specified by:
getTypes
in interfaceClassTypeInfoManager
- Returns:
- an iterable over all the managed ClassTypeInfos
-
getIcon
Description copied from interface:ClassTypeInfoManager
Gets the icon for this manager to be used in theTypeInfoArchiveGTree
- Specified by:
getIcon
in interfaceClassTypeInfoManager
- Parameters:
expanded
- true if the manager tree node is expanded- Returns:
- the icon to be used in the tree
-
getTreeNodeManager
Description copied from interface:ClassTypeInfoManager
Gets theTypeInfoTreeNodeManager
for this ClassTypeInfoManager- Specified by:
getTreeNodeManager
in interfaceClassTypeInfoManager
- Returns:
- this manager's TypeInfoTreeNodeManager
-
getType
Description copied from interface:ClassTypeInfoManager
Gets the ClassTypeInfo for the corresponding database key- Specified by:
getType
in interfaceClassTypeInfoManager
- Parameters:
key
- the database key- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
openIfManagerArchive
public static FileArchiveClassTypeInfoManager openIfManagerArchive(ClassTypeInfoManagerPlugin plugin, Archive archive) throws IOException- Throws:
IOException
-