#include <elst.h>
Definition at line 102 of file elst.h.
◆ ELIST()
◆ add_sorted()
bool ELIST::add_sorted |
( |
int |
comparatorconst void *, const void *, |
|
|
bool |
unique, |
|
|
ELIST_LINK * |
new_link |
|
) |
| |
|
inline |
◆ add_sorted_and_find()
ELIST_LINK * ELIST::add_sorted_and_find |
( |
int |
comparatorconst void *, const void *, |
|
|
bool |
unique, |
|
|
ELIST_LINK * |
new_link |
|
) |
| |
Definition at line 143 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())
◆ assign_to_sublist()
Definition at line 67 of file elst.cpp.
74 constexpr
ERRCODE LIST_NOT_EMPTY(
75 "Destination list must be empty before extracting a sublist");
◆ empty()
bool ELIST::empty |
( |
| ) |
const |
|
inline |
◆ internal_clear()
void ELIST::internal_clear |
( |
void(*)(ELIST_LINK *) |
zapper | ) |
|
◆ internal_deep_copy()
◆ length()
int32_t ELIST::length |
( |
| ) |
const |
◆ shallow_copy()
void ELIST::shallow_copy |
( |
ELIST * |
from_list | ) |
|
|
inline |
Definition at line 132 of file elst.h.
135 last = from_list->last;
◆ singleton()
bool ELIST::singleton |
( |
| ) |
const |
|
inline |
Definition at line 128 of file elst.h.
130 return last ? (last ==
last->
next) :
false;
◆ sort()
void ELIST::sort |
( |
int |
comparator const void *, const void * | ) |
|
Definition at line 101 of file elst.cpp.
103 * (
int (*)(
const void *,
const void *)
104 **********************************************************************/
109 const void *,
const void *)) {
118 base = static_cast<ELIST_LINK **>(malloc (
count *
sizeof (
ELIST_LINK *)));
122 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
123 *current = it.extract ();
128 qsort(base,
count,
sizeof(*base), comparator);
◆ ELIST_ITERATOR
The documentation for this class was generated from the following files: