Package ghidra.app.plugin.languages.sleigh

# Class SleighLanguages

java.lang.Object
ghidra.app.plugin.languages.sleigh.SleighLanguages

public class SleighLanguages extends Object
A collection of utility functions for traversing constructors and Pcode operations of SLEIGH languages

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected static class`
  `SleighLanguages.ConsVisitForPcode`
  An internal visitor The `traverseAllPcodeOps(SleighLanguage, PcodeOpEntryVisitor)` method uses this visitor to traverse every constructor a given language.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SleighLanguages()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `traverseAllPcodeOps(SleighLanguage lang, PcodeOpEntryVisitor visitor)`
  Traverse the Pcode operations of a given SLEIGH language During traversal, if a "NOP" constructor, i.e., one having no Pcode operations, is encountered, the callback is still invoked at least once, with a null Pcode operation.
  `static int`
  `traverseConstructors(SleighLanguage lang, ConstructorEntryVisitor visitor)`
  Traverse the constructors of a given SLEIGH language
  `static int`
  `traverseConstructors(SubtableSymbol subtable, SubtableEntryVisitor visitor)`
  Traverse the constructors of a given table

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

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

- ## Constructor Details

  - ### SleighLanguages

    public SleighLanguages()

- ## Method Details

  - ### traverseConstructors

    public static int traverseConstructors(SleighLanguage lang, ConstructorEntryVisitor visitor)
    Traverse the constructors of a given SLEIGH language
    Parameters:
      `lang` - the language
      `visitor` - a callback for each constructor visited
    Returns:
      a value from `VisitorResults`

  - ### traverseConstructors

    public static int traverseConstructors(SubtableSymbol subtable, SubtableEntryVisitor visitor)
    Traverse the constructors of a given table
    Parameters:
      `subtable` - the table
      `visitor` - a callback for each constructor visited
    Returns:
      a value from `VisitorResults`

  - ### traverseAllPcodeOps

    public static int traverseAllPcodeOps(SleighLanguage lang, PcodeOpEntryVisitor visitor)
    Traverse the Pcode operations of a given SLEIGH language During traversal, if a "NOP" constructor, i.e., one having no Pcode operations, is encountered, the callback is still invoked at least once, with a null Pcode operation. This is so NOP constructors are not overlooked by this traversal.
    Parameters:
      `lang` - the language
      `visitor` - a callback for each Pcode operation visited
    Returns:
      a value from `VisitorResults`