Class AbstractFunctionComparisonModel
java.lang.Object
ghidra.features.base.codecompare.model.AbstractFunctionComparisonModel
- All Implemented Interfaces:
FunctionComparisonModel
- Direct Known Subclasses:
AnyToAnyFunctionComparisonModel
,MatchedFunctionComparisonModel
public abstract class AbstractFunctionComparisonModel
extends Object
implements FunctionComparisonModel
Base class for implementers of the FunctionComparisonModel. Provides listener support and
tracking for the selected function for each side.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given listener to the list of those to be notified of model changes.protected abstract boolean
containsFunction
(Duo.Side side, Function function) protected void
getActiveFunction
(Duo.Side side) Returns the active (selected) function for the given side.void
Removes the given listener from the list of those to be notified of model changes.boolean
setActiveFunction
(Duo.Side side, Function function) Sets the function for the given side.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.features.base.codecompare.model.FunctionComparisonModel
getFunctions, isEmpty, removeFunction, removeFunctions, removeFunctions
-
Field Details
-
FUNCTION_COMPARATOR
-
activeFunctions
-
-
Constructor Details
-
AbstractFunctionComparisonModel
public AbstractFunctionComparisonModel()
-
-
Method Details
-
addFunctionComparisonModelListener
Description copied from interface:FunctionComparisonModel
Adds the given listener to the list of those to be notified of model changes.- Specified by:
addFunctionComparisonModelListener
in interfaceFunctionComparisonModel
- Parameters:
listener
- the listener to add
-
removeFunctionComparisonModelListener
Description copied from interface:FunctionComparisonModel
Removes the given listener from the list of those to be notified of model changes.- Specified by:
removeFunctionComparisonModelListener
in interfaceFunctionComparisonModel
- Parameters:
listener
- the listener to remove
-
setActiveFunction
Description copied from interface:FunctionComparisonModel
Sets the function for the given side. The function must be one of the functions from that side's set of functions- Specified by:
setActiveFunction
in interfaceFunctionComparisonModel
- Parameters:
side
- the side to set the function forfunction
- the function so set for the given side- Returns:
- true if the function was made active or false if the function does not exist for the given side
-
getActiveFunction
Description copied from interface:FunctionComparisonModel
Returns the active (selected) function for the given side.- Specified by:
getActiveFunction
in interfaceFunctionComparisonModel
- Parameters:
side
- the side to get the active function for- Returns:
- the active function for the given side
-
fireModelDataChanged
protected void fireModelDataChanged() -
containsFunction
-