#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 168 of file elst2.cpp.
171 if (last ==
NULL || comparator(&last, &new_link) < 0) {
173 new_link->next = new_link;
174 new_link->prev = new_link;
176 new_link->next = last->next;
177 new_link->prev = last;
178 last->next = new_link;
179 new_link->next->prev = new_link;
185 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
187 if (comparator(&link, &new_link) > 0)
190 if (it.cycled_list())
191 it.add_to_end(new_link);
193 it.add_before_then_move(new_link);
Definition at line 78 of file elst2.cpp.
82 "Destination list must be empty before extracting a sublist";
92 last = start_it->extract_sublist (end_it);
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT
bool ELIST2::empty |
( |
| ) |
const |
|
inline |
void ELIST2::internal_clear |
( |
void(*)(ELIST2_LINK *) |
zapper | ) |
|
Definition at line 42 of file elst2.cpp.
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT
inT32 ELIST2::length |
( |
| ) |
const |
Definition at line 102 of file elst2.cpp.
111 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ())
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT
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 126 of file elst2.cpp.
146 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
147 *current = it.extract ();
152 qsort ((
char *) base, count,
sizeof (*base), comparator);
156 for (i = 0; i <
count; i++) {
157 it.add_to_end (*current);
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT
The documentation for this class was generated from the following files: