Package ghidra.program.model.pcode

# Class EquateSymbol

java.lang.Object
ghidra.program.model.pcode.HighSymbol
ghidra.program.model.pcode.EquateSymbol

public class EquateSymbol extends HighSymbol

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `FORMAT_BIN`
  `static final int`
  `FORMAT_CHAR`
  `static final int`
  `FORMAT_DEC`
  `static final int`
  `FORMAT_DEFAULT`
  `static final int`
  `FORMAT_DOUBLE`
  `static final int`
  `FORMAT_FLOAT`
  `static final int`
  `FORMAT_HEX`
  `static final int`
  `FORMAT_OCT`

  ### Fields inherited from class ghidra.program.model.pcode.HighSymbol

  `category, categoryIndex, dtmanage, entryList, function, ID_BASE, name, type`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EquateSymbol(long uniqueId, int conv, long val, HighFunction func, Address addr, long hash)`
  `EquateSymbol(long uniqueId, String nm, long val, HighFunction func, Address addr, long hash)`
  `EquateSymbol(HighFunction func)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `convertName(String nm, long val)`
  Determine what format a given equate name is in.
  `void`
  `decode(Decoder decoder)`
  Decode this symbol object and its associated mappings from the stream.
  `void`
  `encode(Encoder encoder)`
  Encode the symbol description as an element to the stream.
  `int`
  `getConvert()`
  `long`
  `getValue()`

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

  `addMapEntry, decodeHeader, decodeMapSym, encodeHeader, encodeMapSym, getCategoryIndex, getDataType, getFirstUseOffset, getFirstWholeMap, getHighFunction, getHighVariable, getId, getName, getNamespace, getPCAddress, getProgram, getSize, getStorage, getSymbol, isGlobal, isHiddenReturn, isIsolated, isNameLocked, isParameter, isReadOnly, isThisPointer, isTypeLocked, setCategory, setNameLock, setTypeLock`

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

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

- ## Field Details

  - ### FORMAT_DEFAULT

    public static final int FORMAT_DEFAULT
    See Also:
      - Constant Field Values

  - ### FORMAT_HEX

    public static final int FORMAT_HEX
    See Also:
      - Constant Field Values

  - ### FORMAT_DEC

    public static final int FORMAT_DEC
    See Also:
      - Constant Field Values

  - ### FORMAT_OCT

    public static final int FORMAT_OCT
    See Also:
      - Constant Field Values

  - ### FORMAT_BIN

    public static final int FORMAT_BIN
    See Also:
      - Constant Field Values

  - ### FORMAT_CHAR

    public static final int FORMAT_CHAR
    See Also:
      - Constant Field Values

  - ### FORMAT_FLOAT

    public static final int FORMAT_FLOAT
    See Also:
      - Constant Field Values

  - ### FORMAT_DOUBLE

    public static final int FORMAT_DOUBLE
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### EquateSymbol

    public EquateSymbol(HighFunction func)

  - ### EquateSymbol

    public EquateSymbol(long uniqueId, String nm, long val, HighFunction func, Address addr, long hash)

  - ### EquateSymbol

    public EquateSymbol(long uniqueId, int conv, long val, HighFunction func, Address addr, long hash)

- ## Method Details

  - ### getValue

    public long getValue()

  - ### getConvert

    public int getConvert()

  - ### decode

    public void decode(Decoder decoder) throws DecoderException
    Description copied from class: `HighSymbol`
    Decode this symbol object and its associated mappings from the stream.
    Overrides:
      `decode` in class `HighSymbol`
    Parameters:
      `decoder` - is the stream decoder
    Throws:
      `DecoderException` - for invalid encodings

  - ### encode

    public void encode(Encoder encoder) throws IOException
    Description copied from class: `HighSymbol`
    Encode the symbol description as an element to the stream. This does NOT save the mappings.
    Overrides:
      `encode` in class `HighSymbol`
    Parameters:
      `encoder` - is the stream encoder
    Throws:
      `IOException` - for errors in the underlying stream

  - ### convertName

    public static int convertName(String nm, long val)
    Determine what format a given equate name is in. Integer format conversions are stored using an Equate object, where the name of the equate is the actual conversion String. So the only way to tell what kind of conversion is being performed is by examining the name of the equate. The format code of the conversion is returned, or if the name is not a conversion, FORMAT_DEFAULT is returned indicating a normal String equate.
    Parameters:
      `nm` - is the name of the equate
      `val` - is the value being equated
    Returns:
      the format code for the conversion or FORMAT_DEFAULT if not a conversion