#include <elst2.h>
Definition at line 88 of file elst2.h.
◆ ELIST2()
◆ add_sorted()
void ELIST2::add_sorted |
( |
int |
comparatorconst void *, const void *, |
|
|
ELIST2_LINK * |
new_link |
|
) |
| |
Definition at line 146 of file elst2.cpp.
149 if (last ==
nullptr || comparator(&last, &new_link) < 0) {
150 if (last ==
nullptr) {
151 new_link->next = new_link;
152 new_link->prev = new_link;
154 new_link->next = last->next;
155 new_link->prev = last;
156 last->next = new_link;
157 new_link->next->prev = new_link;
163 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
165 if (comparator(&link, &new_link) > 0)
168 if (it.cycled_list())
169 it.add_to_end(new_link);
171 it.add_before_then_move(new_link);
◆ assign_to_sublist()
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,
nullptr);
82 last = start_it->extract_sublist (end_it);
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
◆ 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 |
Definition at line 91 of file elst2.cpp.
95 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ())
◆ shallow_copy()
void ELIST2::shallow_copy |
( |
ELIST2 * |
from_list | ) |
|
|
inline |
Definition at line 115 of file elst2.h.
117 last = from_list->last;
◆ singleton()
bool ELIST2::singleton |
( |
| ) |
const |
|
inline |
◆ sort()
void ELIST2::sort |
( |
int |
comparator const void *, const void * | ) |
|
Definition at line 109 of file elst2.cpp.
124 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
125 *current = it.extract ();
130 qsort(base,
count,
sizeof(*base), comparator);
134 for (i = 0; i <
count; i++) {
135 it.add_to_end (*current);
◆ ELIST2_ITERATOR
The documentation for this class was generated from the following files:
- /usr/src/tesseract-ocr.master/src/ccutil/elst2.h
- /usr/src/tesseract-ocr.master/src/ccutil/elst2.cpp