#include <elst.h>
List of all members.
Detailed Description
Definition at line 114 of file elst.h.
Constructor & Destructor Documentation
Member Function Documentation
bool ELIST::add_sorted |
( |
int |
comparatorconst void *, const void *, |
|
|
bool |
unique, |
|
|
ELIST_LINK * |
new_link |
|
) |
| |
|
inline |
ELIST_LINK * ELIST::add_sorted_and_find |
( |
int |
comparatorconst void *, const void *, |
|
|
bool |
unique, |
|
|
ELIST_LINK * |
new_link |
|
) |
| |
Definition at line 173 of file elst.cpp.
{
new_link->next = new_link;
} else {
}
} else {
for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
int compare = comparator(&link, &new_link);
if (compare > 0) {
break;
} else if (unique && compare == 0) {
return link;
}
}
if (it.cycled_list())
it.add_to_end(new_link);
else
it.add_before_then_move(new_link);
}
return new_link;
}
Definition at line 78 of file elst.cpp.
{
"Destination list must be empty before extracting a sublist";
#ifndef NDEBUG
if (!this)
#endif
last = start_it->extract_sublist (end_it);
}
bool ELIST::empty |
( |
| ) |
const |
|
inline |
void ELIST::internal_clear |
( |
void(*)(ELIST_LINK *) |
zapper | ) |
|
Definition at line 42 of file elst.cpp.
{
#ifndef NDEBUG
if (!this)
#endif
while (ptr) {
next = ptr->next;
zapper(ptr);
ptr = next;
}
}
}
inT32 ELIST::length |
( |
| ) |
const |
Definition at line 102 of file elst.cpp.
{
#ifndef NDEBUG
if (!this)
#endif
for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ())
count++;
}
void ELIST::shallow_copy |
( |
ELIST * |
from_list | ) |
|
|
inline |
bool ELIST::singleton |
( |
| ) |
const |
|
inline |
void ELIST::sort |
( |
int |
comparatorconst void *, const void * | ) |
|
Definition at line 126 of file elst.cpp.
{
#ifndef NDEBUG
if (!this)
#endif
for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
*current = it.extract ();
current++;
}
qsort ((char *) base, count, sizeof (*base), comparator);
for (i = 0; i <
count; i++) {
it.add_to_end (*current);
current++;
}
free(base);
}
Friends And Related Function Documentation
The documentation for this class was generated from the following files:
- /mnt/data/src/tesseract-ocr/ccutil/elst.h
- /mnt/data/src/tesseract-ocr/ccutil/elst.cpp