Package ghidra.program.model.pcode

# Class PackedEncodeOverlay

java.lang.Object
ghidra.program.model.pcode.PackedEncode
ghidra.program.model.pcode.PackedEncodeOverlay

All Implemented Interfaces:
  `Encoder`, `PatchEncoder`

public class PackedEncodeOverlay extends PackedEncode
Alter address space encoding for a specific overlay space. Any space that matches the overlay space is encoded as the overlayed space. This causes addresses in the overlay space to be converted into the underlying space.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PackedEncodeOverlay(OverlayAddressSpace spc)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setOverlay(OverlayAddressSpace spc)`
  `void`
  `writeSpace(AttributeId attribId, AddressSpace spc)`
  Write an address space reference into the encoding The address space is associated with the given AttributeId annotation and the current open element.
  `void`
  `writeSpaceId(AttributeId attribId, long spaceId)`
  Write a given raw spaceid (as returned by AddressSpace.getSpaceID()) as an attribute.

  ### Methods inherited from class ghidra.program.model.pcode.PackedEncode

  `clear, closeElement, isEmpty, openElement, patchIntegerAttribute, size, writeBool, writeSignedInteger, writeString, writeStringIndexed, writeTo, writeUnsignedInteger`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PackedEncodeOverlay

    public PackedEncodeOverlay(OverlayAddressSpace spc) throws AddressFormatException
    Throws:
      `AddressFormatException`

- ## Method Details

  - ### setOverlay

    public void setOverlay(OverlayAddressSpace spc) throws AddressFormatException
    Throws:
      `AddressFormatException`

  - ### writeSpace

    public void writeSpace(AttributeId attribId, AddressSpace spc) throws IOException
    Description copied from interface: `Encoder`
    Write an address space reference into the encoding The address space is associated with the given AttributeId annotation and the current open element.
    Specified by:
      `writeSpace` in interface `Encoder`
    Overrides:
      `writeSpace` in class `PackedEncode`
    Parameters:
      `attribId` - is the given AttributeId annotation
      `spc` - is the address space to encode
    Throws:
      `IOException` - for errors in the underlying stream

  - ### writeSpaceId

    public void writeSpaceId(AttributeId attribId, long spaceId)
    Description copied from interface: `PatchEncoder`
    Write a given raw spaceid (as returned by AddressSpace.getSpaceID()) as an attribute. The effect is the same as if writeSpace() was called with the AddressSpace matching the spaceid, i.e. the decoder will read this as just space attribute.
    Specified by:
      `writeSpaceId` in interface `PatchEncoder`
    Overrides:
      `writeSpaceId` in class `PackedEncode`
    Parameters:
      `attribId` - is the attribute
      `spaceId` - is the given spaceid