#include <DS_List.h>
Public Member Functions | |
| List () | |
| Default constructor. | |
| ~List () | |
| Destructor. | |
| List (const List &original_copy) | |
| List & | operator= (const List &original_copy) |
| Assign one list to another. | |
| list_type & | operator[] (const unsigned int position) const |
| void | Push (const list_type input) |
| list_type & | Pop (void) |
| void | Insert (const list_type input, const unsigned int position) |
| void | Insert (const list_type input) |
| void | Replace (const list_type input, const list_type filler, const unsigned int position) |
| void | Replace (const list_type input) |
| void | RemoveAtIndex (const unsigned int position) |
| void | RemoveAtIndexFast (const unsigned int position) |
| void | RemoveFromEnd (const unsigned num=1) |
| Delete the element at the end of the list. | |
| unsigned int | GetIndexOf (const list_type input) const |
| unsigned int | Size (void) const |
| |
| void | Clear (bool doNotDeallocateSmallBlocks=false) |
| Clear the list. | |
| void | Compress (void) |
| DataStructures::List< list_type >::List | ( | const List< list_type > & | original_copy | ) |
Copy constructor
| [in] | original_copy | The list to duplicate |
| list_type & DataStructures::List< list_type >::operator[] | ( | const unsigned int | position | ) | const [inline] |
Access an element by its index in the array
| [in] | position | The index into the array. |
| void DataStructures::List< list_type >::Push | ( | const list_type | input | ) |
Push an element at the end of the stack
| [in] | input | The new element. |
| list_type & DataStructures::List< list_type >::Pop | ( | void | ) | [inline] |
| void DataStructures::List< list_type >::Insert | ( | const list_type | input, | |
| const unsigned int | position | |||
| ) |
Insert an element at position position in the list
| [in] | input | The new element. |
| [in] | position | The position of the new element. |
| void DataStructures::List< list_type >::Insert | ( | const list_type | input | ) |
Insert at the end of the list.
| [in] | input | The new element. |
| void DataStructures::List< list_type >::Replace | ( | const list_type | input, | |
| const list_type | filler, | |||
| const unsigned int | position | |||
| ) | [inline] |
Replace the value at position by input. If the size of the list is less than position, it increase the capacity of the list and fill slot with filler.
| [in] | input | The element to replace at position position. |
| [in] | filler | The element use to fill new allocated capacity. |
| [in] | position | The position of input in the list. |
| void DataStructures::List< list_type >::Replace | ( | const list_type | input | ) | [inline] |
Replace the last element of the list by input .
| [in] | input | The element used to replace the last element. |
| void DataStructures::List< list_type >::RemoveAtIndex | ( | const unsigned int | position | ) |
Delete the element at position position.
| [in] | position | The index of the element to delete |
| void DataStructures::List< list_type >::RemoveAtIndexFast | ( | const unsigned int | position | ) |
Delete the element at position position.
| [in] | position | The index of the element to delete |
| unsigned int DataStructures::List< list_type >::GetIndexOf | ( | const list_type | input | ) | const |
Returns the index of the specified item or MAX_UNSIGNED_LONG if not found
| [in] | input | The element to check for |
| MAX_UNSIGNED_LONG | The object is not in the list | |
| [Integer] | The index of the element in the list |
| void DataStructures::List< list_type >::Compress | ( | void | ) |
Frees overallocated members, to use the minimum memory necessary
1.5.1-p1