JUCE: DefaultElementComparator< ElementType > Class Template Reference

JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
DefaultElementComparator< ElementType > Class Template Reference
juce_core » containers

A simple ElementComparator class that can be used to sort an array of objects that support the '<' operator. More...

`#include <juce_ElementComparator.h>`

## Static Public Member Functions
static int | compareElements (ParameterType first, ParameterType second)

## Detailed Description

template<class ElementType>
class DefaultElementComparator< ElementType >

A simple ElementComparator class that can be used to sort an array of objects that support the '<' operator.

This will work for primitive types and objects that implement operator<().

Example:

Array<int> myArray;
DefaultElementComparator<int> sorter;
myArray.sort (sorter);
Array
Holds a resizable array of primitive or copy-by-value objects.
Definition juce_Array.h:57
Array::sort
void sort()
Sorts the array using a default comparison operation.
Definition juce_Array.h:1052
DefaultElementComparator
A simple ElementComparator class that can be used to sort an array of objects that support the '<' op...
Definition juce_ElementComparator.h:186

See also
  ElementComparator

## Member Function Documentation

## ◆ compareElements()

template<class ElementType >

static int DefaultElementComparator< ElementType >::compareElements | ( | ParameterType | first,
|  | ParameterType | second
| ) |  |
| static

The documentation for this class was generated from the following file:

- juce_ElementComparator.h