Interface EquateTable

  • All Known Implementing Classes:
    EquateManager

    public interface EquateTable
    EquateTable manages all equates for program. An equate defines a relationship between a scalar value and a string whereby the scalar may be represented by the string. All equates are defined by the user and remain until explicitly removed by the user.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void applyEnum​(AddressSetView addrSet, Enum dataType, TaskMonitor monitor, boolean shouldDoOnSubOps)
      Creates equates and/or adds references for scalars in the given address set using the given data type.
      Equate createEquate​(java.lang.String name, long value)
      Creates a new equate
      void deleteAddressRange​(Address start, Address end, TaskMonitor monitor)
      Removes all equates defined in the given range.
      Equate getEquate​(Address reference, int opndPosition, long value)
      Returns the first equate found that is associated with the given value at the given reference address and operand position;
      Equate getEquate​(java.lang.String name)
      Returns the equate with the given name, null if no such equate exists.
      AddressIterator getEquateAddresses()
      Returns an address iterator over all the addresses where equates have been set.
      AddressIterator getEquateAddresses​(Address start)
      Return an address iterator over each address with an equate reference starting at the start address.
      AddressIterator getEquateAddresses​(AddressSetView asv)
      Return an address iterator over each address with an equate reference that is in the specified address set.
      java.util.Iterator<Equate> getEquates()
      Returns an iterator over all equates.
      java.util.List<Equate> getEquates​(long value)
      Returns all equates defined for value.
      java.util.List<Equate> getEquates​(Address reference)
      Returns the equates (one for each scalar and opIndex) at the given reference address.
      java.util.List<Equate> getEquates​(Address reference, int opndPosition)
      Returns the equates (one for each scalar) at the given reference address and operand position; For an instruction a given operand can have multiple scalars.
      boolean removeEquate​(java.lang.String name)
      Removes the equate from the program.
    • Method Detail

      • applyEnum

        void applyEnum​(AddressSetView addrSet,
                       Enum dataType,
                       TaskMonitor monitor,
                       boolean shouldDoOnSubOps)
                throws CancelledException
        Creates equates and/or adds references for scalars in the given address set using the given data type. The data type given must be an enumeration data type.
        Parameters:
        addrSet - the address set to use.
        dataType - the data type to use.
        monitor - task monitor to cancel the remove operation
        shouldDoOnSubOps - true if the enum should be applied inside sub-operands as well.
        Throws:
        CancelledException - if the operation is cancelled
        java.lang.IllegalArgumentException - if the dataType is null or not an enum.
      • removeEquate

        boolean removeEquate​(java.lang.String name)
        Removes the equate from the program.
        Parameters:
        name - the name of the equate to remove.
        Returns:
        true if the equate existed, false otherwise.
      • deleteAddressRange

        void deleteAddressRange​(Address start,
                                Address end,
                                TaskMonitor monitor)
                         throws CancelledException
        Removes all equates defined in the given range.
        Parameters:
        start - start of the range
        end - end of the range
        monitor - task monitor to cancel the remove operation
        Throws:
        CancelledException - if the operation was cancelled.
      • getEquate

        Equate getEquate​(java.lang.String name)
        Returns the equate with the given name, null if no such equate exists.
        Parameters:
        name - the of the equate to be retrieved.
      • getEquate

        Equate getEquate​(Address reference,
                         int opndPosition,
                         long value)
        Returns the first equate found that is associated with the given value at the given reference address and operand position;
        Parameters:
        reference - address where the equate is used.
        opndPosition - the operand index of the operand where the equate is used.
        value - the value where the equate is used.
        Returns:
        the equate or null if there is no such equate.
      • getEquates

        java.util.List<Equate> getEquates​(Address reference,
                                          int opndPosition)
        Returns the equates (one for each scalar) at the given reference address and operand position; For an instruction a given operand can have multiple scalars.
        Parameters:
        reference - address where the equate is used.
        opndPosition - the operand index of the operand where the equate is used.
        Returns:
        the list of equates or empty list if there is no such equate.
      • getEquates

        java.util.List<Equate> getEquates​(Address reference)
        Returns the equates (one for each scalar and opIndex) at the given reference address. For an instruction a given operand can have multiple scalars.
        Parameters:
        reference - address where the equate is used.
        Returns:
        the list of equates or empty list if there is no such equate.
      • getEquateAddresses

        AddressIterator getEquateAddresses()
        Returns an address iterator over all the addresses where equates have been set.
      • getEquates

        java.util.List<Equate> getEquates​(long value)
        Returns all equates defined for value.
        Parameters:
        value - the value to get all equates for.
      • getEquates

        java.util.Iterator<Equate> getEquates()
        Returns an iterator over all equates.
      • getEquateAddresses

        AddressIterator getEquateAddresses​(Address start)
        Return an address iterator over each address with an equate reference starting at the start address.
        Parameters:
        start - start address
        Returns:
        an AddressIterator over addresses with defined equate references
      • getEquateAddresses

        AddressIterator getEquateAddresses​(AddressSetView asv)
        Return an address iterator over each address with an equate reference that is in the specified address set.
        Parameters:
        asv - the address set
        Returns:
        AddressIterator over addresses with defined equate references