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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given listener to the list of those to be notified of model changes.protected abstract booleancontainsFunction(Duo.Side side, Function function) protected voidgetActiveFunction(Duo.Side side) Returns the active (selected) function for the given side.voidRemoves the given listener from the list of those to be notified of model changes.booleansetActiveFunction(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, waitMethods 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:FunctionComparisonModelAdds the given listener to the list of those to be notified of model changes.- Specified by:
addFunctionComparisonModelListenerin interfaceFunctionComparisonModel- Parameters:
listener- the listener to add
-
removeFunctionComparisonModelListener
Description copied from interface:FunctionComparisonModelRemoves the given listener from the list of those to be notified of model changes.- Specified by:
removeFunctionComparisonModelListenerin interfaceFunctionComparisonModel- Parameters:
listener- the listener to remove
-
setActiveFunction
Description copied from interface:FunctionComparisonModelSets the function for the given side. The function must be one of the functions from that side's set of functions- Specified by:
setActiveFunctionin 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:FunctionComparisonModelReturns the active (selected) function for the given side.- Specified by:
getActiveFunctionin interfaceFunctionComparisonModel- Parameters:
side- the side to get the active function for- Returns:
- the active function for the given side
-
fireModelDataChanged
protected void fireModelDataChanged() -
containsFunction
-