#include <elst2.h>
Definition at line 88 of file elst2.h.
| void ELIST2::add_sorted |
( |
int |
comparatorconst void *, const void *, |
|
|
ELIST2_LINK * |
new_link |
|
) |
| |
Definition at line 148 of file elst2.cpp.
151 if (last == NULL || comparator(&last, &new_link) < 0) {
153 new_link->next = new_link;
154 new_link->prev = new_link;
156 new_link->next = last->next;
157 new_link->prev = last;
158 last->next = new_link;
159 new_link->next->prev = new_link;
165 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
167 if (comparator(&link, &new_link) > 0)
170 if (it.cycled_list())
171 it.add_to_end(new_link);
173 it.add_before_then_move(new_link);
Definition at line 73 of file elst2.cpp.
77 "Destination list must be empty before extracting a sublist";
80 LIST_NOT_EMPTY.
error (
"ELIST2.assign_to_sublist",
ABORT, NULL);
82 last = start_it->extract_sublist (end_it);
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
| bool ELIST2::empty |
( |
| ) |
const |
|
inline |
| void ELIST2::internal_clear |
( |
void(*)(ELIST2_LINK *) |
zapper | ) |
|
| inT32 ELIST2::length |
( |
| ) |
const |
Definition at line 92 of file elst2.cpp.
96 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ())
| void ELIST2::shallow_copy |
( |
ELIST2 * |
from_list | ) |
|
|
inline |
Definition at line 115 of file elst2.h.
117 last = from_list->last;
| bool ELIST2::singleton |
( |
| ) |
const |
|
inline |
Definition at line 111 of file elst2.h.
112 return last ? (last == last->next) :
false;
| void ELIST2::sort |
( |
int |
comparatorconst void *, const void * | ) |
|
Definition at line 111 of file elst2.cpp.
126 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
127 *current = it.extract ();
132 qsort ((
char *) base, count,
sizeof (*base), comparator);
136 for (i = 0; i <
count; i++) {
137 it.add_to_end (*current);
The documentation for this class was generated from the following files: