Package cppclassanalyzer.data.manager
Class ClassTypeInfoManagerDB
java.lang.Object
cppclassanalyzer.data.manager.ClassTypeInfoManagerDB
- All Implemented Interfaces:
ClassTypeInfoManager,ProgramClassTypeInfoManager,TypeInfoManager,ErrorHandler,ManagerDB
- Direct Known Subclasses:
ItaniumAbiClassTypeInfoManager,VsClassTypeInfoManager
public abstract class ClassTypeInfoManagerDB extends Object implements ManagerDB, ProgramClassTypeInfoManager
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classClassTypeInfoManagerDB.RttiRecordWorker -
Field Summary
Fields Modifier and Type Field Description protected ClassTypeInfoManagerServicepluginprotected ProgramDBprogramprotected TypeInfoTreeNodeManagertreeNodeManagerprotected ClassTypeInfoManagerDB.RttiRecordWorkerworkerFields inherited from interface cppclassanalyzer.data.ClassTypeInfoManager
INVALID_KEY -
Constructor Summary
Constructors Modifier Constructor Description protectedClassTypeInfoManagerDB(ClassTypeInfoManagerService service, ProgramDB program) -
Method Summary
Modifier and Type Method Description booleancontainsRecord(AbstractVtableDB vtable)voiddbError(IOException e)AddressdecodeAddress(long offset)voiddeleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor)longencodeAddress(Address address)IcongetIcon(boolean expanded)Gets the icon for this manager to be used in theTypeInfoArchiveGTreeStringgetName()Gets the name of this managerprotected static ClassTypeInfoDatabaseTablegetNewClassTable(DBHandle handle)ProgramDBgetProgram()Gets the programTypeInfoTreeNodeManagergetTreeNodeManager()Gets theTypeInfoTreeNodeManagerfor this ClassTypeInfoManagerClassTypeInfoDBgetType(long key)Gets the ClassTypeInfo for the corresponding database keyClassTypeInfoDBgetType(Address address)Gets the ClassTypeInfo at the specified addressClassTypeInfoDBgetType(Function fun)Gets the ClassTypeInfo for the correspondingFunctionClassTypeInfoDBgetType(GhidraClass gc)Gets the ClassTypeInfo for the correspondingGhidraClassAbstractClassTypeInfoDBgetType(UniversalID id)Gets the type with a class data type that has the provided idClassTypeInfoDBgetType(String name)Gets the ClassTypeInfo with the specified symbol.ClassTypeInfoDBgetType(String name, Namespace namespace)Gets the ClassTypeInfo with the specified name andNamespaceintgetTypeCount()Gets the number of managed ClassTypeInfosTypeInfogetTypeInfo(Address address)Get the TypeInfo at the addressTypeInfogetTypeInfo(Address address, boolean resolve)Gets the Type info at the specified address.longgetTypeKey(Address address)Iterable<ClassTypeInfoDB>getTypes(boolean reverse)Gets an iterable over all the managed ClassTypeInfos in the specified directionStream<ClassTypeInfoDB>getTypeStream(boolean reverse)Gets a stream of all the managed ClassTypeInfos in the specified directionVtablegetVtable(Address address)Gets the Vtable at the specified addressintgetVtableCount()Gets the number of managed VtablesIterable<Vtable>getVtableIterable(boolean reverse)Gets an iterable over all the managed Vtables in the specified directionlonggetVtableKey(Address address)Stream<Vtable>getVtableStream()Gets a stream of all the managed Vtablesprotected abstract ClassTypeInfoManagerDB.RttiRecordWorkergetWorker(ProgramRttiTablePair tables, ProgramRttiCachePair caches)voidinvalidateCache(boolean all)voidmoveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor)voidprogramReady(int openMode, int currentRevision, TaskMonitor monitor)AbstractClassTypeInfoDBresolve(ArchivedClassTypeInfo type)Returns a ClassTypeInfo that is managed by this ClassTypeInfoManager.Vtableresolve(ArchivedGnuVtable vtable)Returns a Vtable that is managed by this ClassTypeInfoManager.AbstractClassTypeInfoDBresolve(ClassTypeInfo type)Returns a ClassTypeInfo that is managed by this ClassTypeInfoManager.Vtableresolve(Vtable vtable)Returns a Vtable that is managed by this ProgramClassTypeInfoManager.voidsetProgram(ProgramDB program)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cppclassanalyzer.data.ProgramClassTypeInfoManager
addListener, getTypes, getTypeStream, getVtables, removeListenerMethods inherited from interface cppclassanalyzer.data.TypeInfoManager
isTypeInfo
-
Field Details
-
plugin
-
program
-
worker
-
treeNodeManager
-
-
Constructor Details
-
ClassTypeInfoManagerDB
-
-
Method Details
-
getWorker
protected abstract ClassTypeInfoManagerDB.RttiRecordWorker getWorker(ProgramRttiTablePair tables, ProgramRttiCachePair caches) -
getNewClassTable
- Throws:
IOException
-
getName
Description copied from interface:ClassTypeInfoManagerGets the name of this manager- Specified by:
getNamein interfaceClassTypeInfoManager- Returns:
- the managers name
-
getIcon
Description copied from interface:ClassTypeInfoManagerGets the icon for this manager to be used in theTypeInfoArchiveGTree- Specified by:
getIconin interfaceClassTypeInfoManager- Parameters:
expanded- true if the manager tree node is expanded- Returns:
- the icon to be used in the tree
-
getTypeKey
-
getVtableKey
-
decodeAddress
-
encodeAddress
-
containsRecord
-
getProgram
Description copied from interface:ProgramClassTypeInfoManagerGets the program- Specified by:
getProgramin interfaceProgramClassTypeInfoManager- Returns:
- the program
-
setProgram
- Specified by:
setProgramin interfaceManagerDB
-
programReady
public void programReady(int openMode, int currentRevision, TaskMonitor monitor) throws IOException, CancelledException- Specified by:
programReadyin interfaceManagerDB- Throws:
IOExceptionCancelledException
-
invalidateCache
public final void invalidateCache(boolean all)- Specified by:
invalidateCachein interfaceManagerDB
-
deleteAddressRange
public void deleteAddressRange(Address startAddr, Address endAddr, TaskMonitor monitor) throws CancelledException- Specified by:
deleteAddressRangein interfaceManagerDB- Throws:
CancelledException
-
moveAddressRange
public void moveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor) throws AddressOverflowException, CancelledException- Specified by:
moveAddressRangein interfaceManagerDB- Throws:
AddressOverflowExceptionCancelledException
-
getType
Description copied from interface:ProgramClassTypeInfoManagerGets the ClassTypeInfo at the specified address- Specified by:
getTypein interfaceProgramClassTypeInfoManager- Parameters:
address- the address of the ClassTypeInfo- Returns:
- the ClassTypeInfo or null if invalid
-
getVtable
Description copied from interface:ProgramClassTypeInfoManagerGets the Vtable at the specified address- Specified by:
getVtablein interfaceProgramClassTypeInfoManager- Parameters:
address- the address of the vtable- Returns:
- the vtable at the address or null if none is present
-
getType
Description copied from interface:ClassTypeInfoManagerGets the ClassTypeInfo for the correspondingGhidraClass- Specified by:
getTypein interfaceClassTypeInfoManager- Parameters:
gc- the GhidraClass- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
getType
Description copied from interface:ClassTypeInfoManagerGets the ClassTypeInfo for the correspondingFunction- Specified by:
getTypein interfaceClassTypeInfoManager- Parameters:
fun- the function- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
getType
Description copied from interface:ClassTypeInfoManagerGets the ClassTypeInfo with the specified symbol. The supplied symbol should be mangled.- Specified by:
getTypein interfaceClassTypeInfoManager- Parameters:
name- the mangled symbol name- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
getType
Description copied from interface:ClassTypeInfoManagerGets the ClassTypeInfo with the specified name andNamespace- Specified by:
getTypein interfaceClassTypeInfoManager- Parameters:
name- the type's namenamespace- the type's namespace- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
resolve
Description copied from interface:ClassTypeInfoManagerReturns a ClassTypeInfo that is managed by this ClassTypeInfoManager. If one does not currently exist a new one is created.- Specified by:
resolvein interfaceClassTypeInfoManager- Parameters:
type- the type to resolve- Returns:
- the equivalent type managed by this ClassTypeInfoManager
-
resolve
Description copied from interface:ProgramClassTypeInfoManagerReturns a Vtable that is managed by this ProgramClassTypeInfoManager. If one does not currently exist a new one is created.- Specified by:
resolvein interfaceProgramClassTypeInfoManager- Parameters:
vtable- the vtable to resolve- Returns:
- the equivalent vtable managed by this ProgramClassTypeInfoManager
-
resolve
Description copied from interface:ProgramClassTypeInfoManagerReturns a ClassTypeInfo that is managed by this ClassTypeInfoManager. If the ArchivedClassTypeInfo hasn't already been resolved the type will be created and all required data will be added to the program.- Specified by:
resolvein interfaceProgramClassTypeInfoManager- Parameters:
type- the type to resolve- Returns:
- the equivalent type managed by this ClassTypeInfoManager
-
resolve
Description copied from interface:ProgramClassTypeInfoManagerReturns a Vtable that is managed by this ClassTypeInfoManager. If the ArchivedGnuVtable hasn't already been resolved the vtable will be created and all required data will be added to the program.- Specified by:
resolvein interfaceProgramClassTypeInfoManager- Parameters:
vtable- the vtable to resolve- Returns:
- the equivalent vtable managed by this ClassTypeInfoManager
-
getTypeCount
public int getTypeCount()Description copied from interface:ClassTypeInfoManagerGets the number of managed ClassTypeInfos- Specified by:
getTypeCountin interfaceClassTypeInfoManager- Returns:
- the number of managed ClassTypeInfos
-
getVtableCount
public int getVtableCount()Description copied from interface:ProgramClassTypeInfoManagerGets the number of managed Vtables- Specified by:
getVtableCountin interfaceProgramClassTypeInfoManager- Returns:
- the number of managed Vtables
-
getTypes
Description copied from interface:ProgramClassTypeInfoManagerGets an iterable over all the managed ClassTypeInfos in the specified direction- Specified by:
getTypesin interfaceProgramClassTypeInfoManager- Parameters:
reverse- true if the types should be provided in reverse- Returns:
- an iterable over all the managed ClassTypeInfos
-
getVtableIterable
Description copied from interface:ProgramClassTypeInfoManagerGets an iterable over all the managed Vtables in the specified direction- Specified by:
getVtableIterablein interfaceProgramClassTypeInfoManager- Parameters:
reverse- true if the Vtables should be provided in reverse- Returns:
- an iterable over all the managed Vtables
-
getTypeStream
Description copied from interface:ProgramClassTypeInfoManagerGets a stream of all the managed ClassTypeInfos in the specified direction- Specified by:
getTypeStreamin interfaceProgramClassTypeInfoManager- Parameters:
reverse- true if the types should be provided in reverse- Returns:
- a stream of all the managed ClassTypeInfos
-
getVtableStream
Description copied from interface:ProgramClassTypeInfoManagerGets a stream of all the managed Vtables- Specified by:
getVtableStreamin interfaceProgramClassTypeInfoManager- Returns:
- a stream of all the managed Vtables
-
getTypeInfo
Description copied from interface:TypeInfoManagerGet the TypeInfo at the address- Specified by:
getTypeInfoin interfaceTypeInfoManager- Parameters:
address- the address of the TypeInfo- Returns:
- the TypeInfo at the specified address or null if none exists.
-
getTypeInfo
Description copied from interface:ProgramClassTypeInfoManagerGets the Type info at the specified address. If the TypeInfo is a ClassTypeInfo it can be resolved if requested.- Specified by:
getTypeInfoin interfaceProgramClassTypeInfoManager- Parameters:
address- the address of the TypeInforesolve- true to resolve the TypeInfo if it happens to be a ClassTypeInfo- Returns:
- the TypeInfo at the address
-
getTreeNodeManager
Description copied from interface:ClassTypeInfoManagerGets theTypeInfoTreeNodeManagerfor this ClassTypeInfoManager- Specified by:
getTreeNodeManagerin interfaceClassTypeInfoManager- Returns:
- this manager's TypeInfoTreeNodeManager
-
dbError
- Specified by:
dbErrorin interfaceErrorHandler
-
getType
Description copied from interface:ClassTypeInfoManagerGets the ClassTypeInfo for the corresponding database key- Specified by:
getTypein interfaceClassTypeInfoManager- Parameters:
key- the database key- Returns:
- the ClassTypeInfo or null if it doesn't exist
-
getType
Description copied from interface:ProgramClassTypeInfoManagerGets the type with a class data type that has the provided id- Specified by:
getTypein interfaceProgramClassTypeInfoManager- Parameters:
id- the universal id- Returns:
- the type with the corresponding data type id or null
-