LibCDS
LinkedList Struct Reference

The implementation for doubly linked list. More...

Data Fields

LinkedListDatapData
 The container private information. More...
 
int32_t(* push_front )(struct _LinkedList *, Item)
 Push an item to the head of the list. More...
 
int32_t(* push_back )(struct _LinkedList *, Item)
 Push an item to the tail of the list. More...
 
int32_t(* insert )(struct _LinkedList *, Item, int32_t)
 Insert an item to the designated index of the list. More...
 
int32_t(* pop_front )(struct _LinkedList *)
 Pop an item from the head of the list. More...
 
int32_t(* pop_back )(struct _LinkedList *)
 Pop an item from the tail of the list. More...
 
int32_t(* delete )(struct _LinkedList *, int32_t)
 Delete an item from the designated index of the list. More...
 
int32_t(* set_front )(struct _LinkedList *, Item)
 Replace an item at the head of the list. More...
 
int32_t(* set_back )(struct _LinkedList *, Item)
 Replace an item at the tail of the list. More...
 
int32_t(* set_at )(struct _LinkedList *, Item, int32_t)
 Replace an item at the designated index of the list. More...
 
int32_t(* get_front )(struct _LinkedList *, Item *)
 Get an item from the head of the list. More...
 
int32_t(* get_back )(struct _LinkedList *, Item *)
 Get an item from the tail of the list. More...
 
int32_t(* get_at )(struct _LinkedList *, Item *, int32_t)
 Get an item from the designated index of the list. More...
 
int32_t(* size )(struct _LinkedList *)
 Return the number of stored items. More...
 
int32_t(* reverse )(struct _LinkedList *)
 Reverse the list. More...
 
int32_t(* iterate )(struct _LinkedList *, bool, Item *)
 Iterate through the list till the tail end. More...
 
int32_t(* reverse_iterate )(struct _LinkedList *, bool, Item *)
 Reversely iterate through the list till the head end. More...
 
int32_t(* replace )(struct _LinkedList *, Item)
 Immediately replace the item at a specific iteration. More...
 
int32_t(* set_destroy )(struct _LinkedList *, void(*)(Item))
 Set the custom item resource clean method. More...
 

Detailed Description

The implementation for doubly linked list.

Definition at line 14 of file linked_list.h.

Field Documentation

LinkedListData* LinkedList::pData

The container private information.

Definition at line 16 of file linked_list.h.

int32_t(* LinkedList::push_front)(struct _LinkedList *, Item)

Push an item to the head of the list.

See Also
LinkedListPushFront

Definition at line 20 of file linked_list.h.

int32_t(* LinkedList::push_back)(struct _LinkedList *, Item)

Push an item to the tail of the list.

See Also
LinkedListPushBack

Definition at line 24 of file linked_list.h.

int32_t(* LinkedList::insert)(struct _LinkedList *, Item, int32_t)

Insert an item to the designated index of the list.

See Also
LinkedListInsert

Definition at line 28 of file linked_list.h.

int32_t(* LinkedList::pop_front)(struct _LinkedList *)

Pop an item from the head of the list.

See Also
LinkedListPopFront

Definition at line 32 of file linked_list.h.

int32_t(* LinkedList::pop_back)(struct _LinkedList *)

Pop an item from the tail of the list.

See Also
LinkedListPopBack

Definition at line 36 of file linked_list.h.

int32_t(* LinkedList::delete)(struct _LinkedList *, int32_t)

Delete an item from the designated index of the list.

See Also
LinkedListDelete

Definition at line 40 of file linked_list.h.

int32_t(* LinkedList::set_front)(struct _LinkedList *, Item)

Replace an item at the head of the list.

See Also
LinkedListSetFront

Definition at line 44 of file linked_list.h.

int32_t(* LinkedList::set_back)(struct _LinkedList *, Item)

Replace an item at the tail of the list.

See Also
LinkedListSetBack

Definition at line 48 of file linked_list.h.

int32_t(* LinkedList::set_at)(struct _LinkedList *, Item, int32_t)

Replace an item at the designated index of the list.

See Also
LinkedListSetAt

Definition at line 52 of file linked_list.h.

int32_t(* LinkedList::get_front)(struct _LinkedList *, Item *)

Get an item from the head of the list.

See Also
LinkedListGetFront

Definition at line 56 of file linked_list.h.

int32_t(* LinkedList::get_back)(struct _LinkedList *, Item *)

Get an item from the tail of the list.

See Also
LinkedListGetBack

Definition at line 60 of file linked_list.h.

int32_t(* LinkedList::get_at)(struct _LinkedList *, Item *, int32_t)

Get an item from the designated index of the list.

See Also
LinkedListGetAt

Definition at line 64 of file linked_list.h.

int32_t(* LinkedList::size)(struct _LinkedList *)

Return the number of stored items.

See Also
LinkedListSize

Definition at line 68 of file linked_list.h.

int32_t(* LinkedList::reverse)(struct _LinkedList *)

Reverse the list.

See Also
LinkedListReverse

Definition at line 72 of file linked_list.h.

int32_t(* LinkedList::iterate)(struct _LinkedList *, bool, Item *)

Iterate through the list till the tail end.

See Also
LinkedListIterate

Definition at line 76 of file linked_list.h.

int32_t(* LinkedList::reverse_iterate)(struct _LinkedList *, bool, Item *)

Reversely iterate through the list till the head end.

See Also
LinkedListReverseIterate

Definition at line 80 of file linked_list.h.

int32_t(* LinkedList::replace)(struct _LinkedList *, Item)

Immediately replace the item at a specific iteration.

See Also
LinkedListReplace

Definition at line 84 of file linked_list.h.

int32_t(* LinkedList::set_destroy)(struct _LinkedList *, void(*)(Item))

Set the custom item resource clean method.

See Also
LinkedListSetDestroy

Definition at line 88 of file linked_list.h.