|
|
list.c File ReferenceImplementation of the functions operating on Tlist. More... #include "list.h" #include "error.h" #include "defines.h" #include <stdlib.h> #include <string.h> Go to the source code of this file.
Detailed DescriptionImplementation of the functions operating on Tlist. Definition in file list.c. Function DocumentationPrivate function to delete an element from the list.
Definition at line 44 of file list.c. References Tbuf::data, Tlist::first, Tlist::last, Tbuf::next, Tlist::num_ele, and Tbuf::previous. Referenced by DeleteAllItems(), DeleteCurrent(), ExtractCurrent(), ExtractFirst(), and ExtractLast().
Here is the caller graph for this function:
Private function to add an element from the list.
Definition at line 71 of file list.c. References Tbuf::data, Tlist::ele_size, Tlist::first, Tlist::last, NEW, Tbuf::next, Tlist::num_ele, and Tbuf::previous. Referenced by AddBehindCurrent(), AddFirstElement(), AddInFrontOfCurrent(), and AddLastElement().
Here is the caller graph for this function:
Initializes an empty list for data with a given size.
Definition at line 135 of file list.c. References Tlist::ele_size, Tlist::first, Tlist::last, and Tlist::num_ele. Referenced by InitListOfBoxes(), and ReadListOfBoxes().
Here is the caller graph for this function:
Deletes a list and frees all the allocated memory in all the nodes still in the list.
Definition at line 153 of file list.c. References DeleteAllItems().
Here is the call graph for this function:
Delete all the elements stored in the list.
Definition at line 162 of file list.c. References Tlist::first, Tbuf::next, and PrivDelEle(). Referenced by DeleteList().
Here is the call graph for this function:
Here is the caller graph for this function:
Gets the number of elements in the list.
Definition at line 180 of file list.c. References Tlist::num_ele. Referenced by ListOfBoxesBB(), ListOfBoxesCluster(), main(), and SaveListOfBoxes().
Here is the caller graph for this function:
Checks if a list is empty.
Definition at line 188 of file list.c. References Tlist::num_ele.
Adds an element at the head of the list.
Definition at line 196 of file list.c. References Tlist::first, PrivAddElement(), and TRUE. Referenced by MPI_SolveCuikSystem(), and ReverseListOfBoxes().
Here is the call graph for this function:
Here is the caller graph for this function:
Adds an element at the tail of the list.
Definition at line 206 of file list.c. References FALSE, Tlist::last, and PrivAddElement(). Referenced by ConcatListOfBoxes(), CopyListOfBoxes(), Heap2List(), ListOfBoxesCluster(), LoadListOfBoxes(), PostProcessBox(), ReadListOfBoxes(), and SampleCuikSystemInBox().
Here is the call graph for this function:
Here is the caller graph for this function:
Copies the first element from the list into the given pointer and remove the element from the list.
Definition at line 212 of file list.c. References Tbuf::data, Tlist::ele_size, Error(), Tlist::first, Tbuf::next, and PrivDelEle().
Here is the call graph for this function:
Copies the last element from the list into the given pointer and remove the element from the list.
Definition at line 228 of file list.c. References Tbuf::data, Tlist::ele_size, Error(), Tlist::last, Tbuf::next, and PrivDelEle().
Here is the call graph for this function:
Determines if a given element is already in the list.
Definition at line 244 of file list.c. References Tbuf::data, FALSE, Tlist::first, and Tbuf::next.
Prints the list as a set of pointers. Mainly used for debug.
Definition at line 261 of file list.c. References Tbuf::data, Tlist::first, and Tbuf::next. Generates an iterator linked to a list. Note that this constructor does not point the interator to any particular position in the list (not the first, not the last,...).
Definition at line 284 of file list.c. References Titerator::current, and Titerator::list. Referenced by AddList2Heap(), AnimateWorld(), ConcatListOfBoxes(), CopyListOfBoxes(), DeleteListOfBoxes(), ListOfBoxesBB(), ListOfBoxesCluster(), ListOfBoxesMaxDiagonal(), ListOfBoxesMaxSize(), ListOfBoxesVolume(), LoadCSState(), main(), PrintListOfBoxes(), ReverseListOfBoxes(), SampleCuikSystemInBox(), and SaveListOfBoxes().
Here is the caller graph for this function:
Generates an iterator from another iterator.
Definition at line 290 of file list.c. References Titerator::current, and Titerator::list.
Gets the element pointed by the iterator.
Definition at line 299 of file list.c. References Titerator::current, and Tbuf::data. Referenced by AddList2Heap(), AnimateWorld(), ConcatListOfBoxes(), CopyListOfBoxes(), DeleteListOfBoxes(), ListOfBoxesBB(), ListOfBoxesCluster(), ListOfBoxesMaxDiagonal(), ListOfBoxesMaxSize(), ListOfBoxesVolume(), LoadCSState(), main(), PrintListOfBoxes(), ReverseListOfBoxes(), SampleCuikSystemInBox(), and SaveListOfBoxes().
Here is the caller graph for this function:
Copies the element pointed by the iterator into the given buffer and removes the element from the list. The iterator is moved to the next element in the list.
Definition at line 308 of file list.c. References Titerator::current, Tbuf::data, Tlist::ele_size, Titerator::list, Tbuf::next, and PrivDelEle().
Here is the call graph for this function:
Adds an element to the list in front of the position pointed by the iterator.
Definition at line 325 of file list.c. References Titerator::current, Titerator::list, PrivAddElement(), and TRUE.
Here is the call graph for this function:
Adds an element to the list behind the position pointed by the iterator.
Definition at line 333 of file list.c. References Titerator::current, FALSE, Titerator::list, and PrivAddElement().
Here is the call graph for this function:
Deletes a Titerator structure.
Definition at line 341 of file list.c. References Titerator::current, Titerator::list, Tbuf::next, and PrivDelEle(). Referenced by DeleteListOfBoxes().
Here is the call graph for this function:
Here is the caller graph for this function:
Moves an iterator to the first position of its associated list.
Definition at line 356 of file list.c. References Titerator::current, Tlist::first, and Titerator::list. Referenced by AddList2Heap(), AnimateWorld(), ConcatListOfBoxes(), CopyListOfBoxes(), DeleteListOfBoxes(), ListOfBoxesBB(), ListOfBoxesCluster(), ListOfBoxesMaxDiagonal(), ListOfBoxesMaxSize(), ListOfBoxesVolume(), LoadCSState(), main(), PrintListOfBoxes(), ReverseListOfBoxes(), SampleCuikSystemInBox(), and SaveListOfBoxes().
Here is the caller graph for this function:
Moves an iterator to the last position of its associated list.
Definition at line 364 of file list.c. References Titerator::current, Tlist::last, and Titerator::list. Moves an iterator to the next position of its associated list.
Definition at line 373 of file list.c. References Titerator::current, FALSE, Tbuf::next, and TRUE. Referenced by AddList2Heap(), AnimateWorld(), ConcatListOfBoxes(), CopyListOfBoxes(), ListOfBoxesBB(), ListOfBoxesCluster(), ListOfBoxesMaxDiagonal(), ListOfBoxesMaxSize(), ListOfBoxesVolume(), main(), PrintListOfBoxes(), ReverseListOfBoxes(), SampleCuikSystemInBox(), and SaveListOfBoxes().
Here is the caller graph for this function:
Moves an iterator to the previous position of its associated list.
Definition at line 395 of file list.c. References Titerator::current, FALSE, Tbuf::previous, and TRUE. Moves an iterator to a given position of its associated list.
Definition at line 417 of file list.c. References Titerator::current, FALSE, Tlist::first, Titerator::list, Tbuf::next, Tlist::num_ele, and TRUE. Referenced by main().
Here is the caller graph for this function:
Checks if an iterator is pointing at the end of the list.
Definition at line 445 of file list.c. References Titerator::current. Referenced by AddList2Heap(), AnimateWorld(), ConcatListOfBoxes(), CopyListOfBoxes(), DeleteListOfBoxes(), ListOfBoxesBB(), ListOfBoxesCluster(), ListOfBoxesMaxDiagonal(), ListOfBoxesMaxSize(), ListOfBoxesVolume(), main(), PrintListOfBoxes(), ReverseListOfBoxes(), SampleCuikSystemInBox(), and SaveListOfBoxes().
Here is the caller graph for this function:
|