#include <elst2.h>
Definition at line 82 of file elst2.h.
◆ ELIST2()
◆ add_sorted()
void ELIST2::add_sorted |
( |
int |
comparatorconst void *, const void *, |
|
|
ELIST2_LINK * |
new_link |
|
) |
| |
Definition at line 139 of file elst2.cpp.
147 if (last ==
nullptr || comparator(&last, &new_link) < 0) {
148 if (last ==
nullptr) {
149 new_link->next = new_link;
150 new_link->prev = new_link;
152 new_link->next = last->next;
153 new_link->prev = last;
154 last->next = new_link;
155 new_link->next->prev = new_link;
161 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
163 if (comparator(&link, &new_link) > 0)
166 if (it.cycled_list())
◆ assign_to_sublist()
Definition at line 68 of file elst2.cpp.
74 constexpr
ERRCODE LIST_NOT_EMPTY(
75 "Destination list must be empty before extracting a sublist");
78 LIST_NOT_EMPTY.error (
"ELIST2.assign_to_sublist",
ABORT,
nullptr);
◆ empty()
bool ELIST2::empty |
( |
| ) |
const |
|
inline |
◆ internal_clear()
void ELIST2::internal_clear |
( |
void(*)(ELIST2_LINK *) |
zapper | ) |
|
◆ internal_deep_copy()
◆ length()
int32_t ELIST2::length |
( |
| ) |
const |
◆ shallow_copy()
void ELIST2::shallow_copy |
( |
ELIST2 * |
from_list | ) |
|
|
inline |
Definition at line 112 of file elst2.h.
115 last = from_list->last;
◆ singleton()
bool ELIST2::singleton |
( |
| ) |
const |
|
inline |
◆ sort()
void ELIST2::sort |
( |
int |
comparator const void *, const void * | ) |
|
Definition at line 102 of file elst2.cpp.
103 * (
int (*)(
const void *,
const void *)
104 **********************************************************************/
109 const void *,
const void *)) {
118 base = static_cast<ELIST2_LINK **>(malloc (
count *
sizeof (
ELIST2_LINK *)));
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++) {
◆ ELIST2_ITERATOR
The documentation for this class was generated from the following files: