Package cppclassanalyzer.data.typeinfo
Class AbstractClassTypeInfoDB
java.lang.Object
ghidra.program.database.DatabaseObject
cppclassanalyzer.data.typeinfo.ClassTypeInfoDB
cppclassanalyzer.data.typeinfo.AbstractClassTypeInfoDB
- All Implemented Interfaces:
ClassTypeInfo,TypeInfo
- Direct Known Subclasses:
GnuClassTypeInfoDB,VsClassTypeInfoDB
public abstract class AbstractClassTypeInfoDB extends ClassTypeInfoDB
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractClassTypeInfoDB.TypeId -
Field Summary
Fields Modifier and Type Field Description static StringCLASS_TYPEINFO_TABLE_NAMEprotected ProgramRttiRecordManagermanagerFields inherited from class cppclassanalyzer.data.typeinfo.ClassTypeInfoDB
INVALID_KEYFields inherited from class ghidra.program.database.DatabaseObject
keyFields inherited from interface ghidra.app.cmd.data.rtti.TypeInfo
SYMBOL_NAME, TYPENAME_SYMBOL_NAME -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractClassTypeInfoDB(ProgramRttiRecordManager manager, ArchivedClassTypeInfo type, ClassTypeInfoRecord record)protectedAbstractClassTypeInfoDB(ProgramRttiRecordManager manager, ClassTypeInfoRecord record)protectedAbstractClassTypeInfoDB(ProgramRttiRecordManager manager, ClassTypeInfo type, ClassTypeInfoRecord record) -
Method Summary
Modifier and Type Method Description protected AddressdecodeAddress(long addr)protected longencodeAddress(Address addr)booleanequals(Object o)protected abstract voidfillModelData(ClassTypeInfoRecord record)protected abstract voidfillModelData(ClassTypeInfo type, ClassTypeInfoRecord record)AddressgetAddress()Gets the address of this TypeInfo structure.static intgetBaseCount(ClassTypeInfoRecord record)protected abstract long[]getBaseKeys()static long[]getBaseKeys(ClassTypeInfoRecord record)Map<ClassTypeInfo,Integer>getBaseOffsets()Gets a map of this types bases and offsetsprotected abstract AbstractCppClassBuildergetClassBuilder()protected static byte[]getClassData(ClassTypeInfoRecord record)StructuregetClassDataType()Gets the underlying structure of the class for this ClassTypeInfolonggetClassDataTypeId()Gets the id for this type's class data typeDataTypegetDataType()Gets corresponding structure for this TypeInfo ModelGhidraClassgetGhidraClass()Gets the corresponding Ghidra Class for this TypeInfo and creates it if none exists.StringgetIdentifier()Gets The TypeInfo's Identifier Stringprotected static StringgetIdentifier(byte id)ClassTypeInfoManagerDBgetManager()Gets the manager containing this typeStringgetName()Gets name for the TypeInfo DataType Modelprotected abstract int[]getOffsets()ProgramgetProgram()protected abstract StringgetPureVirtualFunctionName()protected ClassTypeInfogetRawType()protected ClassTypeInfoRecordgetRecord()AbstractClassTypeInfoDB.TypeIdgetTypeId()StringgetTypeName()Gets The TypeInfo's typename stringVtablegetVtable()Gets the TypeInfo's Vtable Modelprotected booleangetVtableSearched()inthashCode()booleanisAbstract()Determines if the represented class is an abstract basebooleanisModifiable()Checks if this type is modifiableprotected booleanisVtableSearched()protected booleanrefresh()protected booleanrefresh(ClassTypeInfoRecord record)protected booleanrefresh(DBRecord record)voidrefreshDataType()voidsetClassDataType(Structure struct)voidsetVtable(Vtable vtable)protected voidsetVtableSearched()StringtoString()protected static voidupdateKeys(long[] keys, LongIntHashtable keyMap)static voidupdateRecord(ClassTypeInfoRecord record, LongIntHashtable keyMap)Methods inherited from class cppclassanalyzer.data.typeinfo.ClassTypeInfoDB
checkIsValid, getParentModels, getSuperClassDataTypeMethods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setInvalid, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.app.cmd.data.rtti.ClassTypeInfo
findVtable, findVtable, getFullName, getRepresentedDataType, getSymbolPath, getUniqueTypeName, getVirtualParents, hasParent, isExternalMethods inherited from interface ghidra.app.cmd.data.rtti.TypeInfo
getNamespace
-
Field Details
-
CLASS_TYPEINFO_TABLE_NAME
- See Also:
- Constant Field Values
-
manager
-
-
Constructor Details
-
AbstractClassTypeInfoDB
-
AbstractClassTypeInfoDB
protected AbstractClassTypeInfoDB(ProgramRttiRecordManager manager, ClassTypeInfo type, ClassTypeInfoRecord record) -
AbstractClassTypeInfoDB
protected AbstractClassTypeInfoDB(ProgramRttiRecordManager manager, ArchivedClassTypeInfo type, ClassTypeInfoRecord record)
-
-
Method Details
-
getBaseKeys
protected abstract long[] getBaseKeys() -
getOffsets
protected abstract int[] getOffsets() -
getPureVirtualFunctionName
-
getClassBuilder
-
fillModelData
-
fillModelData
-
encodeAddress
-
decodeAddress
-
getRawType
-
getManager
Description copied from class:ClassTypeInfoDBGets the manager containing this type- Specified by:
getManagerin classClassTypeInfoDB- Returns:
- the manager containing this type
-
getBaseOffsets
Description copied from class:ClassTypeInfoDBGets a map of this types bases and offsets- Specified by:
getBaseOffsetsin classClassTypeInfoDB- Returns:
- a map of bases to offsets
-
getClassData
-
getIdentifier
-
getVtableSearched
protected boolean getVtableSearched() -
getBaseCount
-
getBaseKeys
-
getTypeId
-
updateKeys
-
updateRecord
-
equals
-
hashCode
public final int hashCode() -
refresh
protected final boolean refresh()- Specified by:
refreshin classDatabaseObject
-
refresh
- Overrides:
refreshin classDatabaseObject
-
isVtableSearched
protected boolean isVtableSearched() -
setVtableSearched
protected void setVtableSearched() -
refresh
-
getProgram
-
getName
Description copied from interface:TypeInfoGets name for the TypeInfo DataType Model- Returns:
- the TypeInfo's name
-
getGhidraClass
Description copied from interface:ClassTypeInfoGets the corresponding Ghidra Class for this TypeInfo and creates it if none exists.- Returns:
- The class representation of this TypeInfo instance
-
getTypeName
Description copied from interface:TypeInfoGets The TypeInfo's typename string- Returns:
- the TypeInfo's typename
-
getRecord
-
getIdentifier
Description copied from interface:TypeInfoGets The TypeInfo's Identifier String- Returns:
- the TypeInfo's ID_STRING field
- See Also:
TypeInfoModel.ID_STRING
-
getDataType
Description copied from interface:TypeInfoGets corresponding structure for this TypeInfo Model- Returns:
- the type_info or subclasses DataType
-
getAddress
Description copied from interface:TypeInfoGets the address of this TypeInfo structure.- Returns:
- the TypeInfo's address.
-
getVtable
Description copied from interface:ClassTypeInfoGets the TypeInfo's Vtable Model- Returns:
- The TypeInfo's Vtable Model or
Vtable.NO_VTABLEif none exists
-
setVtable
-
getClassDataType
Description copied from interface:ClassTypeInfoGets the underlying structure of the class for this ClassTypeInfo- Returns:
- the structure datatype for this class
-
refreshDataType
public void refreshDataType() -
setClassDataType
-
getClassDataTypeId
public long getClassDataTypeId()Description copied from class:ClassTypeInfoDBGets the id for this type's class data type- Specified by:
getClassDataTypeIdin classClassTypeInfoDB- Returns:
- the class data type's id
-
isAbstract
public final boolean isAbstract()Description copied from interface:ClassTypeInfoDetermines if the represented class is an abstract base- Returns:
- true if abstract
-
toString
-
isModifiable
public final boolean isModifiable()Description copied from class:ClassTypeInfoDBChecks if this type is modifiable- Specified by:
isModifiablein classClassTypeInfoDB- Returns:
- true if this type is modifiable
-