#include <elst.h>
Definition at line 113 of file elst.h.
◆ ELIST()
◆ add_sorted()
bool ELIST::add_sorted |
( |
int |
comparatorconst void *, const void *, |
|
|
bool |
unique, |
|
|
ELIST_LINK * |
new_link |
|
) |
| |
|
inline |
Definition at line 174 of file elst.h.
ELIST_LINK * add_sorted_and_find(int comparator(const void *, const void *), bool unique, ELIST_LINK *new_link)
◆ 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 150 of file elst.cpp.
154 if (last ==
nullptr || comparator(&last, &new_link) < 0) {
155 if (last ==
nullptr) {
156 new_link->next = new_link;
158 new_link->next = last->next;
159 last->next = new_link;
165 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
167 int compare = comparator(&link, &new_link);
170 }
else if (unique && compare == 0) {
174 if (it.cycled_list())
175 it.add_to_end(new_link);
177 it.add_before_then_move(new_link);
◆ assign_to_sublist()
Definition at line 72 of file elst.cpp.
76 "Destination list must be empty before extracting a sublist";
79 LIST_NOT_EMPTY.
error (
"ELIST.assign_to_sublist",
ABORT,
nullptr);
81 last = start_it->extract_sublist (end_it);
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
◆ 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 |
Definition at line 90 of file elst.cpp.
94 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ())
◆ shallow_copy()
void ELIST::shallow_copy |
( |
ELIST * |
from_list | ) |
|
|
inline |
Definition at line 140 of file elst.h.
142 last = from_list->last;
◆ singleton()
bool ELIST::singleton |
( |
| ) |
const |
|
inline |
Definition at line 136 of file elst.h.
137 return last ? (last ==
last->
next) :
false;
◆ sort()
void ELIST::sort |
( |
int |
comparator const void *, const void * | ) |
|
Definition at line 108 of file elst.cpp.
123 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
124 *current = it.extract ();
129 qsort(base,
count,
sizeof(*base), comparator);
133 for (i = 0; i <
count; i++) {
134 it.add_to_end (*current);
◆ ELIST_ITERATOR
The documentation for this class was generated from the following files:
- /usr/src/tesseract-ocr.master/src/ccutil/elst.h
- /usr/src/tesseract-ocr.master/src/ccutil/elst.cpp