#include <ListSort.hpp>
Public Types | |
| typedef Int(* | FnCompareObjects )(const T &rObj1, const T &rObj2) |
Static Public Member Functions | |
| static bool | sort (TSingleLinkedList< T > &rList) |
| Sort a single linked list. Also works for managed lists. | |
| static bool | sort (TArrayList< T > &rList) |
| Sort an arraylist. | |
| static Int | insertSorted (TSingleLinkedList< T > &rList, const T &rItem) |
| Insert sorted into a single linked list. Also works for managed lists. | |
| static Int | insertSorted (TArrayList< T > &rList, const T &rItem) |
| Insert sorted into an array list. | |
| static bool | sortCustom (TSingleLinkedList< T > &rList, FnCompareObjects pFnCompare) |
| Custom sort method for a single linked list. Also works for managed lists. | |
| static bool | sortCustom (TArrayList< T > &rList, FnCompareObjects pFnCompare) |
| Custom sort method for an array list. | |
Protected Member Functions | |
| TListSort () | |
| virtual | ~TListSort () |
This class is used to sort single linked lists and array lists
| typedef Int(* zeus::TListSort< T >::FnCompareObjects)(const T &rObj1, const T &rObj2) |
Function pointer definition to custom comparison of 2 objects. Return -1 for rObj1 < rObj2, 0 for rObj1 == rObj2 and 1 for rObj1 > rObj2.
| zeus::TListSort< T >::TListSort | ( | ) | [inline, protected] |
| virtual zeus::TListSort< T >::~TListSort | ( | ) | [inline, protected, virtual] |
| Int zeus::TListSort< T >::insertSorted | ( | TSingleLinkedList< T > & | rList, |
| const T & | rItem | ||
| ) | [static] |
Insert sorted into a single linked list. Also works for managed lists.
inserts an item into a list regarding the sorting
| Int zeus::TListSort< T >::insertSorted | ( | TArrayList< T > & | rList, |
| const T & | rItem | ||
| ) | [static] |
Insert sorted into an array list.
inserts an item into a list regarding the sorting
| bool zeus::TListSort< T >::sort | ( | TArrayList< T > & | rList ) | [static] |
Sort an arraylist.
sorts an array list
| rList | [IN]: The list. |
| bool zeus::TListSort< T >::sort | ( | TSingleLinkedList< T > & | rList ) | [static] |
Sort a single linked list. Also works for managed lists.
sorts a single linked list
| rList | [IN]: The list. |
| bool zeus::TListSort< T >::sortCustom | ( | TArrayList< T > & | rList, |
| FnCompareObjects | pFnCompare | ||
| ) | [static] |
Custom sort method for an array list.
Custom sorting of an array list.
| rList | [IN]: The list. |
| pFnCompare | [IN]: Comparison function. |
| bool zeus::TListSort< T >::sortCustom | ( | TSingleLinkedList< T > & | rList, |
| FnCompareObjects | pFnCompare | ||
| ) | [static] |
Custom sort method for a single linked list. Also works for managed lists.
Custom sorting of a single linked list.
| rList | [IN]: The list. |
| pFnCompare | [IN]: Comparison function. |