AbstractArrayListSorter
Short summary
The abstract implementation of an ArrayListSorter, to provide default implementations for setting comparator, the IObject methods. Provides the default implementation for sort and inverseSort.
| Access | Abstract | Final | Extends | Implements |
|---|---|---|---|---|
| INTERNAL | Yes | No | AbstractListSorter | CNM_CollectionInterfaces.IArrayListSorter |
UML Diagram
Methods
instantInverseSort
- Parameters:
size(UDINT): The size of the list to be sortedcontainer(POINTER TO CNM_CollectionInterfaces.CNM_AbstractObject.IObject): the container, that contains the list elementscomparator(CNM_CollectionInterfaces.CNM_AbstractObject.IComparator): the comparator that should be used for the sort. Must not be changed while sort is in processcurrentListVersion(__XWORD): the current version of the list, must change when the data in the list changes
- Return type: CNM_CollectionInterfaces.CNM_ReturnTypes.SingleExecutionResult
This method sorts the data structure instantly in descending order within one call. …
inverseSort
- Parameters:
execute(BOOL): control bit to start or abort the inverting, needs to be active until the ExecutionState is noz longer busysize(UDINT): The size of the list to be sortedcontainer(POINTER TO CNM_AbstractObject.IObject): the container, that contains the list elementscomparator(CNM_AbstractObject.IComparator): the comparator that should be used for the sort. Must not be changed while sort is in processcurrentListVersion(__XWORD): the current version of the list, must change when the data in the list changes
- Return type: CNM_ReturnTypes.SingleExecutionState
This method sorts the Sortable in the inverted order, so from great to low…
Abstract methods
instantSort
- Parameters:
size(UDINT): The size of the list to be sortedcontainer(POINTER TO CNM_CollectionInterfaces.CNM_AbstractObject.IObject): the container, that contains the list elementscomparator(CNM_CollectionInterfaces.CNM_AbstractObject.IComparator): the comparator that should be used for the sort. Must not be changed while sort is in processcurrentListVersion(__XWORD): the current version of the list, must change when the data in the list changes
- Return type: CNM_CollectionInterfaces.CNM_ReturnTypes.SingleExecutionResult
This method sorts the data structure instantly within one call. …
sort
- Parameters:
execute(BOOL): control bit to start or abort the sorting, needs to be active until the ExecutionState is SUCCESSsize(UDINT): The size of the list to be sortedcontainer(POINTER TO CNM_AbstractObject.IObject): the container, that contains the list elementscomparator(CNM_AbstractObject.IComparator): the comparator that should be used for the sort. Must not be changed while sort is in processcurrentListVersion(__XWORD): the current version of the list, must change when the data in the list changes
- Return type: CNM_ReturnTypes.SingleExecutionState
This method sorts the data structure. …
Code
Declaration
FUNCTION_BLOCK INTERNAL ABSTRACT AbstractArrayListSorter EXTENDS AbstractListSorter IMPLEMENTS CNM_CollectionInterfaces.IArrayListSorter