#include <elst.h>
Definition at line 113 of file elst.h.
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)
ELIST_LINK * ELIST::add_sorted_and_find |
( |
int |
comparatorconst void *, const void *, |
|
|
bool |
unique, |
|
|
ELIST_LINK * |
new_link |
|
) |
| |
Definition at line 172 of file elst.cpp.
176 if (last ==
NULL || comparator(&last, &new_link) < 0) {
178 new_link->next = new_link;
180 new_link->next = last->next;
181 last->next = new_link;
187 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
189 int compare = comparator(&link, &new_link);
192 }
else if (unique && compare == 0) {
196 if (it.cycled_list())
197 it.add_to_end(new_link);
199 it.add_before_then_move(new_link);
Definition at line 77 of file elst.cpp.
81 "Destination list must be empty before extracting a sublist";
91 last = start_it->extract_sublist (end_it);
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT
bool ELIST::empty |
( |
| ) |
const |
|
inline |
void ELIST::internal_clear |
( |
void(*)(ELIST_LINK *) |
zapper | ) |
|
Definition at line 41 of file elst.cpp.
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
const ERRCODE NULL_OBJECT
inT32 ELIST::length |
( |
| ) |
const |
Definition at line 101 of file elst.cpp.
110 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 ELIST::shallow_copy |
( |
ELIST * |
from_list | ) |
|
|
inline |
Definition at line 140 of file elst.h.
142 last = from_list->last;
bool ELIST::singleton |
( |
| ) |
const |
|
inline |
Definition at line 136 of file elst.h.
137 return last ? (last == last->next) :
false;
void ELIST::sort |
( |
int |
comparatorconst void *, const void * | ) |
|
Definition at line 125 of file elst.cpp.
145 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
146 *current = it.extract ();
151 qsort ((
char *) base, count,
sizeof (*base), comparator);
155 for (i = 0; i <
count; i++) {
156 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: