Generic sorting functions. More...
#include <kanzi/core/legacy/util/collection/kzc_comparator.hpp>
#include <kanzi/core/legacy/kzs_types.hpp>
Macros | |
#define | kzcSortArray(buffer_param, length_param, comparator_param) |
Sorts the given buffer of elementCount elements with the given comparator. More... | |
#define | kzcSortArrayWithContext(buffer_param, length_param, comparator_param, context_param) |
Sorts the given buffer of elementCount elements with the given comparator and given context. More... | |
Functions | |
void | kzcSort (void *buffer, kzUint elementCount, kzUint elementSize, KzcComparatorFunction comparator) |
Sorts the given buffer of elementCount elements, each of size elementSize, with the given comparator. More... | |
void | kzcSortWithContext (void *buffer, kzUint elementCount, kzUint elementSize, KzcComparatorWithContextFunction comparator, const void *context) |
Sorts the given buffer of elementCount elements, each of size elementSize, with the given comparator. More... | |
Generic sorting functions.
Copyright 2008-2017 by Rightware. All rights reserved.
#define kzcSortArray | ( | buffer_param, | |
length_param, | |||
comparator_param | |||
) |
Sorts the given buffer of elementCount elements with the given comparator.
Size of the elements is determined automatically.
#define kzcSortArrayWithContext | ( | buffer_param, | |
length_param, | |||
comparator_param, | |||
context_param | |||
) |
Sorts the given buffer of elementCount elements with the given comparator and given context.
Size of the elements is determined automatically.
void kzcSort | ( | void * | buffer, |
kzUint | elementCount, | ||
kzUint | elementSize, | ||
KzcComparatorFunction | comparator | ||
) |
Sorts the given buffer of elementCount elements, each of size elementSize, with the given comparator.
Unstable sorting method.
void kzcSortWithContext | ( | void * | buffer, |
kzUint | elementCount, | ||
kzUint | elementSize, | ||
KzcComparatorWithContextFunction | comparator, | ||
const void * | context | ||
) |
Sorts the given buffer of elementCount elements, each of size elementSize, with the given comparator.
Additionally an arbitrary context can be given as parameter, which is passed to the comparator. Unstable sorting method.