7#ifndef __STRATEGY_SORTSTRATEGY_H__
8#define __STRATEGY_SORTSTRATEGY_H__
SortOptions
Represents the difference sorting strategies supported.
@ Sort_ByAge
Sort numerically by age in ascending order.
@ Sort_ByHeight
Sort numerically by height in ascending order.
@ Sort_ByName
Sort alphabetically name in ascending order.
void SortStrategy_Initialize(SortStrategy *strategy, SortOptions sortOption, bool reversedSort)
Initialize a SortStrategy object with the desired strategy.
bool(* CompareFunction)(const EntryInformation *, const EntryInformation *)
Alias for a function that compares two EntryInformation objects to determine if the left comes before...
Represents an individual with a Name, Age, and Height.
int Age
Age of this individual, in years.
const char * Name
Name of this individual.
int Height
Height of this individual, in inches.
Represents the strategy to use for sorting EntryInformation objects.
bool reversedSort
True if to reverse the order of the sort.
const char * name
Name of the strategy (for display purposes)
CompareFunction compareFunction
Compare function that determines the order of two entries.