Package ghidra.features.base.codecompare.panel

# Class FunctionComparisonState

java.lang.Object
ghidra.features.base.codecompare.panel.FunctionComparisonState

public class FunctionComparisonState extends Object
An object to share config state between providers and all views within those providers.

When a comparison provider updates its save state object, it should call `PluginTool.setConfigChanged(boolean)` so that tool knows there are settings to be saved.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FunctionComparisonState(PluginTool tool)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addUpdateCallback(Callback callback)`
  Adds a callback to this state that is notified when this state changes.
  `SaveState`
  `getPanelState()`
  Returns the state object for the provider
  `CodeComparisonViewState`
  `getViewState()`
  Returns the save state object for the views that live inside a provider
  `void`
  `readConfigState(SaveState saveState)`
  `void`
  `setChanged()`
  Signals to the tool that there are changes to the config state that can be saved.
  `void`
  `writeConfigState(SaveState saveState)`

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

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

- ## Constructor Details

  - ### FunctionComparisonState

    public FunctionComparisonState(PluginTool tool)

- ## Method Details

  - ### getPanelState

    public SaveState getPanelState()
    Returns the state object for the provider
    Returns:
      the state object for the provider

  - ### getViewState

    public CodeComparisonViewState getViewState()
    Returns the save state object for the views that live inside a provider
    Returns:
      the state

  - ### setChanged

    public void setChanged()
    Signals to the tool that there are changes to the config state that can be saved.

  - ### writeConfigState

    public void writeConfigState(SaveState saveState)

  - ### readConfigState

    public void readConfigState(SaveState saveState)

  - ### addUpdateCallback

    public void addUpdateCallback(Callback callback)
    Adds a callback to this state that is notified when this state changes.
    Parameters:
      `callback` - the callback