|
ORIGINAL
|
Base class for comparison. More...
#include <comparator.h>


Public Member Functions | |
| virtual | ~comparator ()=default |
| Virtual destructor for the comparator class. | |
| virtual bool | compare (const TYPE &t1, const TYPE &t2) const =0 |
| Pure virtual compare method for comparing two elements. | |
| bool | operator() (const TYPE &t1, const TYPE &t2) const |
| Function call operator for comparing two elements using the compare method. | |
Base class for comparison.
| TYPE | Type of the elements being compared |
This class provides the interface for comparing two elements of type TYPE. Derived classes must implement the compare method to perform the actual comparison logic.
|
pure virtual |
Pure virtual compare method for comparing two elements.
| t1 | The first element to compare. |
| t2 | The second element to compare. |
true if t1 has a higher priority than t2, otherwise false.The compare method must be implemented in derived classes. It is used to determine the priority of two elements, where true indicates that t1 is considered to have a higher priority than t2, and false means t2 has higher priority or they are equal.
Implemented in original::increaseComparator< K_TYPE >, original::increaseComparator< TYPE >, original::decreaseComparator< TYPE >, original::equalComparator< TYPE >, original::notEqualComparator< TYPE >, original::increaseNotStrictComparator< TYPE >, and original::decreaseNotStrictComparator< TYPE >.
| auto original::comparator< TYPE >::operator() | ( | const TYPE & | t1, |
| const TYPE & | t2 | ||
| ) | const |
Function call operator for comparing two elements using the compare method.
| t1 | The first element to compare. |
| t2 | The second element to compare. |