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 class
AbstractClassTypeInfoDB.TypeId
-
Field Summary
Fields Modifier and Type Field Description static String
CLASS_TYPEINFO_TABLE_NAME
protected ProgramRttiRecordManager
manager
Fields inherited from class cppclassanalyzer.data.typeinfo.ClassTypeInfoDB
INVALID_KEY
Fields inherited from class ghidra.program.database.DatabaseObject
key
Fields inherited from interface ghidra.app.cmd.data.rtti.TypeInfo
SYMBOL_NAME, TYPENAME_SYMBOL_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractClassTypeInfoDB(ProgramRttiRecordManager manager, ArchivedClassTypeInfo type, ClassTypeInfoRecord record)
protected
AbstractClassTypeInfoDB(ProgramRttiRecordManager manager, ClassTypeInfoRecord record)
protected
AbstractClassTypeInfoDB(ProgramRttiRecordManager manager, ClassTypeInfo type, ClassTypeInfoRecord record)
-
Method Summary
Modifier and Type Method Description protected Address
decodeAddress(long addr)
protected long
encodeAddress(Address addr)
boolean
equals(Object o)
protected abstract void
fillModelData(ClassTypeInfoRecord record)
protected abstract void
fillModelData(ClassTypeInfo type, ClassTypeInfoRecord record)
Address
getAddress()
Gets the address of this TypeInfo structure.static int
getBaseCount(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 AbstractCppClassBuilder
getClassBuilder()
protected static byte[]
getClassData(ClassTypeInfoRecord record)
Structure
getClassDataType()
Gets the underlying structure of the class for this ClassTypeInfolong
getClassDataTypeId()
Gets the id for this type's class data typeDataType
getDataType()
Gets corresponding structure for this TypeInfo ModelGhidraClass
getGhidraClass()
Gets the corresponding Ghidra Class for this TypeInfo and creates it if none exists.String
getIdentifier()
Gets The TypeInfo's Identifier Stringprotected static String
getIdentifier(byte id)
ClassTypeInfoManagerDB
getManager()
Gets the manager containing this typeString
getName()
Gets name for the TypeInfo DataType Modelprotected abstract int[]
getOffsets()
Program
getProgram()
protected abstract String
getPureVirtualFunctionName()
protected ClassTypeInfo
getRawType()
protected ClassTypeInfoRecord
getRecord()
AbstractClassTypeInfoDB.TypeId
getTypeId()
String
getTypeName()
Gets The TypeInfo's typename stringVtable
getVtable()
Gets the TypeInfo's Vtable Modelprotected boolean
getVtableSearched()
int
hashCode()
boolean
isAbstract()
Determines if the represented class is an abstract baseboolean
isModifiable()
Checks if this type is modifiableprotected boolean
isVtableSearched()
protected boolean
refresh()
protected boolean
refresh(ClassTypeInfoRecord record)
protected boolean
refresh(DBRecord record)
void
refreshDataType()
void
setClassDataType(Structure struct)
void
setVtable(Vtable vtable)
protected void
setVtableSearched()
String
toString()
protected static void
updateKeys(long[] keys, LongIntHashtable keyMap)
static void
updateRecord(ClassTypeInfoRecord record, LongIntHashtable keyMap)
Methods inherited from class cppclassanalyzer.data.typeinfo.ClassTypeInfoDB
checkIsValid, getParentModels, getSuperClassDataType
Methods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setInvalid, validate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ghidra.app.cmd.data.rtti.ClassTypeInfo
findVtable, findVtable, getFullName, getRepresentedDataType, getSymbolPath, getUniqueTypeName, getVirtualParents, hasParent, isExternal
Methods 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:ClassTypeInfoDB
Gets the manager containing this type- Specified by:
getManager
in classClassTypeInfoDB
- Returns:
- the manager containing this type
-
getBaseOffsets
Description copied from class:ClassTypeInfoDB
Gets a map of this types bases and offsets- Specified by:
getBaseOffsets
in 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:
refresh
in classDatabaseObject
-
refresh
- Overrides:
refresh
in classDatabaseObject
-
isVtableSearched
protected boolean isVtableSearched() -
setVtableSearched
protected void setVtableSearched() -
refresh
-
getProgram
-
getName
Description copied from interface:TypeInfo
Gets name for the TypeInfo DataType Model- Returns:
- the TypeInfo's name
-
getGhidraClass
Description copied from interface:ClassTypeInfo
Gets 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:TypeInfo
Gets The TypeInfo's typename string- Returns:
- the TypeInfo's typename
-
getRecord
-
getIdentifier
Description copied from interface:TypeInfo
Gets The TypeInfo's Identifier String- Returns:
- the TypeInfo's ID_STRING field
- See Also:
TypeInfoModel.ID_STRING
-
getDataType
Description copied from interface:TypeInfo
Gets corresponding structure for this TypeInfo Model- Returns:
- the type_info or subclasses DataType
-
getAddress
Description copied from interface:TypeInfo
Gets the address of this TypeInfo structure.- Returns:
- the TypeInfo's address.
-
getVtable
Description copied from interface:ClassTypeInfo
Gets the TypeInfo's Vtable Model- Returns:
- The TypeInfo's Vtable Model or
Vtable.NO_VTABLE
if none exists
-
setVtable
-
getClassDataType
Description copied from interface:ClassTypeInfo
Gets 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:ClassTypeInfoDB
Gets the id for this type's class data type- Specified by:
getClassDataTypeId
in classClassTypeInfoDB
- Returns:
- the class data type's id
-
isAbstract
public final boolean isAbstract()Description copied from interface:ClassTypeInfo
Determines if the represented class is an abstract base- Returns:
- true if abstract
-
toString
-
isModifiable
public final boolean isModifiable()Description copied from class:ClassTypeInfoDB
Checks if this type is modifiable- Specified by:
isModifiable
in classClassTypeInfoDB
- Returns:
- true if this type is modifiable
-