Search in sources :

Example 1 with BaseTypeCategory

use of com.google.security.zynamics.binnavi.disassembly.types.BaseTypeCategory in project binnavi by google.

the class ViewReferencesTableModel method addTypeSubstitutionToTree.

/**
   * Adds a {@link TypeSubstitution type substitution} for the given {@link INaviInstruction
   * instruction} to the tree.
   *
   * @param operandNode The {@link INaviOperandTreeNode operand node} which holds the
   *        {@link TypeSubstitution type substitution}.
   * @param instruction The {@link INaviInstruction instruction} which holds the
   *        {@link INaviOperandTreeNode operand node}.
   */
private void addTypeSubstitutionToTree(final INaviOperandTreeNode operandNode, final INaviInstruction instruction) {
    final TypeSubstitution typeSubstitution = operandNode.getTypeSubstitution();
    final BaseTypeCategory category = typeSubstitution.getBaseType().getCategory();
    if (category == BaseTypeCategory.STRUCT || category == BaseTypeCategory.ARRAY || category == BaseTypeCategory.UNION) {
        addCompoundTypeSubstitutionToTree(operandNode, instruction, typeSubstitution);
    } else {
        addBaseType(typeSubstitution.getBaseType());
        BaseTypeTreeNode currentNode = baseTypeToTreeNode.get(typeSubstitution.getBaseType());
        insertNodeInto(multiIndex.putTypeSubstitution(typeSubstitution, instruction), currentNode, currentNode.getChildCount());
    }
}
Also used : TypeSubstitution(com.google.security.zynamics.binnavi.disassembly.types.TypeSubstitution) BaseTypeTreeNode(com.google.security.zynamics.binnavi.Gui.GraphWindows.types.BaseTypeTreeNode) BaseTypeCategory(com.google.security.zynamics.binnavi.disassembly.types.BaseTypeCategory)

Aggregations

BaseTypeTreeNode (com.google.security.zynamics.binnavi.Gui.GraphWindows.types.BaseTypeTreeNode)1 BaseTypeCategory (com.google.security.zynamics.binnavi.disassembly.types.BaseTypeCategory)1 TypeSubstitution (com.google.security.zynamics.binnavi.disassembly.types.TypeSubstitution)1