#include <list.h>
Implements a list item for use in a List_c
Creates a ListItem given data. This method will allocate storage for the data passed in.
- Parameters
-
data | A pointer to data to copy |
len | Length of data to copy |
Creates a ListItem without allocating internal storage.
Destroys a ListItem, deallocating any storage the item has allocated
void AllocateItemData |
( |
int |
size | ) |
|
Allocates the specified amount of data for the item. Does not deallocate the old data!
- Parameters
-
size | Size of the data to allocate |
- Returns
- The data member of this ListItem.
Set the data associated with this item. This merely changes the value of the Data pointer, it does not allocate or copy data
- Parameters
-
item | The new data for this item |
- Returns
- What the data member of this ListItem is pointing to (a double indirection)
- Returns
- The ListItem after this in the list, or NULL if there is no next ListItem
Set the Next ListItem in the List
- Parameters
-
pNext | Pointer to the item that will become this item's next item |
- Returns
- The ListItem before this in the list, or NULL if there is no previous ListItem
Set the Previous ListItem in the List
- Parameters
-
pPrev | Pointer to the item that will become this item's previous item |
void Priority |
( |
int |
priority | ) |
|
Change the priority of this list item. NOTE: Changing an item's priority does not resort the list.
- Parameters
-
priority | The new priority of the list item |
Item priority, used for priority queue behavior
The documentation for this class was generated from the following file: