#include <elst.h>
Definition at line 111 of file elst.h.
| bool ELIST::add_sorted |
( |
int |
comparatorconst void *, const void *, |
|
|
bool |
unique, |
|
|
ELIST_LINK * |
new_link |
|
) |
| |
|
inline |
Definition at line 172 of file elst.h.
ELIST_LINK * add_sorted_and_find(int comparator(const void *, const void *), bool unique, ELIST_LINK *new_link)
| ELIST_LINK * ELIST::add_sorted_and_find |
( |
int |
comparatorconst void *, const void *, |
|
|
bool |
unique, |
|
|
ELIST_LINK * |
new_link |
|
) |
| |
Definition at line 149 of file elst.cpp.
153 if (last ==
nullptr || comparator(&last, &new_link) < 0) {
154 if (last ==
nullptr) {
155 new_link->next = new_link;
157 new_link->next = last->next;
158 last->next = new_link;
164 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
166 int compare = comparator(&link, &new_link);
169 }
else if (unique && compare == 0) {
173 if (it.cycled_list())
174 it.add_to_end(new_link);
176 it.add_before_then_move(new_link);
Definition at line 71 of file elst.cpp.
74 constexpr
ERRCODE LIST_NOT_EMPTY(
75 "Destination list must be empty before extracting a sublist");
78 LIST_NOT_EMPTY.error (
"ELIST.assign_to_sublist",
ABORT,
nullptr);
80 last = start_it->extract_sublist (end_it);
| bool ELIST::empty |
( |
| ) |
const |
|
inline |
| void ELIST::internal_clear |
( |
void(*)(ELIST_LINK *) |
zapper | ) |
|
| int32_t ELIST::length |
( |
| ) |
const |
Definition at line 89 of file elst.cpp.
93 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ())
| void ELIST::shallow_copy |
( |
ELIST * |
from_list | ) |
|
|
inline |
Definition at line 138 of file elst.h.
140 last = from_list->last;
| bool ELIST::singleton |
( |
| ) |
const |
|
inline |
Definition at line 134 of file elst.h.
135 return last ? (last == last->next) :
false;
| void ELIST::sort |
( |
int |
comparator const void *, const void * | ) |
|
Definition at line 107 of file elst.cpp.
122 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
123 *current = it.extract ();
128 qsort(base, count,
sizeof(*base), comparator);
132 for (i = 0; i <
count; i++) {
133 it.add_to_end (*current);
The documentation for this class was generated from the following files: