Lines Matching full:element
62 * an element from the list is O(n).
65 * 1) space savings as there is only a single link element instead
68 * element for processing.
93 * Initialze the singely linked list element. The other macros require the
94 * list element to be properly initialized.
96 #define sci_simple_list_element_init(list_object, element) \ argument
98 (element)->next = NULL; \
99 (element)->object = (list_object); \
108 * Return a pointer to the list element at the head of the list. The list
109 * element is not removed from the list.
114 * Retuen a pointer to the lsit element at the tail of the list. The list
115 * element is not removed from the list.
125 * Return a pointer to the list element following this list element.
126 * If this is the last element in the list then NULL is returned.
128 #define sci_simple_list_get_next(element) ((element)->next) argument
131 * Return the object represented by the list element.
133 #define sci_simple_list_get_object(element) ((element)->object) argument
157 * @brief This structure defines what a singely linked list element contains.
166 * This method will insert the list element to the head of the list contained
175 SCI_SIMPLE_LIST_ELEMENT_T *element in sci_simple_list_insert_head() argument
180 anchor->list_tail = element; in sci_simple_list_insert_head()
183 element->next = anchor->list_head; in sci_simple_list_insert_head()
184 anchor->list_head = element; in sci_simple_list_insert_head()
189 * This methos will insert the list element to the tail of the list contained
192 * @param[in, out] anchor this is the list into which the element is to be
194 * @param[in] element this is the element which to insert into the list.
202 SCI_SIMPLE_LIST_ELEMENT_T *element in sci_simple_list_insert_tail() argument
207 anchor->list_head = element; in sci_simple_list_insert_tail()
211 anchor->list_tail->next = element; in sci_simple_list_insert_tail()
214 anchor->list_tail = element; in sci_simple_list_insert_tail()
219 * This method will remove the list element from the anchor and return the
220 * object pointed to by that list element.
222 * @param[in, out] anchor this is the list into which the element is to be
225 * @return the list element at the head of the list.
262 * @return the list element at the head of the list.