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 Details

    • createEquate

      Equate createEquate(String name, long value) throws DuplicateNameException, InvalidInputException
      Creates a new equate
      Parameters:
      name - the name to associate with the given value.
      value - the value to associate with the given name.
      Returns:
      the equate
      Throws:
      DuplicateNameException - thrown if name is already in use as an equate.
      InvalidInputException - if name contains blank characters, is zero length, or is null
    • removeEquate

      boolean removeEquate(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(String name)
      Returns the equate with the given name, null if no such equate exists
      Parameters:
      name - the of the equate to be retrieved
      Returns:
      the equate
    • 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

      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

      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.
      Returns:
      the iterator
    • getEquates

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

      Iterator<Equate> getEquates()
      Returns an iterator over all equates.
      Returns:
      the iterator
    • 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