Package ghidra.app.util.pcode

# Interface PcodeFormatter<T>

All Known Implementing Classes:
  `AbstractPcodeFormatter`, `AttributedStringPcodeFormatter`, `PcodeFrame.MyFormatter`, `PcodeProgram.MyFormatter`, `StringPcodeFormatter`

public interface PcodeFormatter<T>

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default T`
  `formatOps(Language language, AddressFactory addrFactory, List<PcodeOp> pcodeOps)`
  Format the pcode ops with a specified `AddressFactory`.
  `default T`
  `formatOps(Language language, List<PcodeOp> pcodeOps)`
  Format the p-code ops
  `T`
  `formatTemplates(Language language, List<OpTpl> pcodeOpTemplates)`
  Format the p-code op templates
  `static OpTpl`
  `getPcodeOpTemplateLog(AddressFactory addrFactory, PcodeOp pcodeOp)`
  Convert one p-code op into a template, without re-writing relative branches.
  `static List<OpTpl>`
  `getPcodeOpTemplates(AddressFactory addrFactory, List<PcodeOp> pcodeOps)`
  Convert flattened p-code ops into templates.
  `static List<OpTpl>`
  `getPcodeOpTemplatesLog(AddressFactory addrFactory, List<PcodeOp> pcodeOps)`
  Convert flattened p-code ops into templates, without re-writing relative branches.
  `static VarnodeTpl`
  `getVarnodeTpl(AddressFactory addrFactory, Varnode v)`

- ## Method Details

  - ### formatOps

    default T formatOps(Language language, List<PcodeOp> pcodeOps)
    Format the p-code ops
    Parameters:
      `language` - the language generating the p-code
      `pcodeOps` - the p-code ops
    Returns:
      the formatted result

  - ### formatOps

    default T formatOps(Language language, AddressFactory addrFactory, List<PcodeOp> pcodeOps)
    Format the pcode ops with a specified `AddressFactory`. For use when the pcode ops can reference program-specific address spaces.
    Parameters:
      `language` - the language generating the p-code
      `addrFactory` - addressFactory to use when generating pcodeop templates
      `pcodeOps` - p-code ops to format
    Returns:
      the formatted result

  - ### formatTemplates

    T formatTemplates(Language language, List<OpTpl> pcodeOpTemplates)
    Format the p-code op templates
    Parameters:
      `language` - the language generating the p-code
      `pcodeOpTemplates` - the templates
    Returns:
      the formatted result

  - ### getPcodeOpTemplateLog

    static OpTpl getPcodeOpTemplateLog(AddressFactory addrFactory, PcodeOp pcodeOp)
    Convert one p-code op into a template, without re-writing relative branches.
    Parameters:
      `addrFactory` - the language's address factory
      `pcodeOp` - the p-code op to convert
    Returns:
      p-code op template

  - ### getPcodeOpTemplatesLog

    static List<OpTpl> getPcodeOpTemplatesLog(AddressFactory addrFactory, List<PcodeOp> pcodeOps)
    Convert flattened p-code ops into templates, without re-writing relative branches.
    Parameters:
      `addrFactory` - the language's address factory
      `pcodeOps` - the p-code ops to convert
    Returns:
      p-code op templates

  - ### getPcodeOpTemplates

    static List<OpTpl> getPcodeOpTemplates(AddressFactory addrFactory, List<PcodeOp> pcodeOps)
    Convert flattened p-code ops into templates.
    Parameters:
      `addrFactory` - the language's address factory
      `pcodeOps` - the p-code ops to convert
    Returns:
      p-code op templates

  - ### getVarnodeTpl

    static VarnodeTpl getVarnodeTpl(AddressFactory addrFactory, Varnode v)