#include <elst2.h>
List of all members.
Detailed Description
Definition at line 88 of file elst2.h.
Constructor & Destructor Documentation
Member Function Documentation
void ELIST2::add_sorted |
( |
int |
comparatorconst void *, const void *, |
|
|
ELIST2_LINK * |
new_link |
|
) |
| |
Definition at line 169 of file elst2.cpp.
{
new_link->next = new_link;
new_link->prev = new_link;
} else {
new_link->next->prev = new_link;
}
} else {
for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
if (comparator(&link, &new_link) > 0)
break;
}
if (it.cycled_list())
it.add_to_end(new_link);
else
it.add_before_then_move(new_link);
}
}
Definition at line 79 of file elst2.cpp.
{
"Destination list must be empty before extracting a sublist";
#ifndef NDEBUG
if (!this)
#endif
last = start_it->extract_sublist (end_it);
}
bool ELIST2::empty |
( |
| ) |
const |
|
inline |
void ELIST2::internal_clear |
( |
void(*)(ELIST2_LINK *) |
zapper | ) |
|
Definition at line 43 of file elst2.cpp.
{
#ifndef NDEBUG
if (!this)
#endif
while (ptr) {
next = ptr->next;
zapper(ptr);
ptr = next;
}
}
}
inT32 ELIST2::length |
( |
| ) |
const |
Definition at line 103 of file elst2.cpp.
{
#ifndef NDEBUG
if (!this)
#endif
for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ())
count++;
}
void ELIST2::shallow_copy |
( |
ELIST2 * |
from_list | ) |
|
|
inline |
bool ELIST2::singleton |
( |
| ) |
const |
|
inline |
void ELIST2::sort |
( |
int |
comparatorconst void *, const void * | ) |
|
Definition at line 127 of file elst2.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/elst2.h
- /mnt/data/src/tesseract-ocr/ccutil/elst2.cpp