332 const ERRCODE DONT_EXCHANGE_DELETED =
333 "Can't exchange deleted elements of lists";
344 if (!(other_it->list))
351 if ((list->
empty ()) ||
352 (other_it->list->
empty ()) || (current == other_it->current))
357 if (!current || !other_it->current)
358 DONT_EXCHANGE_DELETED.
error (
"ELIST2_ITERATOR.exchange",
ABORT,
NULL);
365 if ((next == other_it->current) ||
366 (other_it->next == current)) {
368 if ((next == other_it->current) &&
369 (other_it->next == current)) {
370 prev = next = current;
371 other_it->prev = other_it->next = other_it->current;
376 if (other_it->next == current) {
377 other_it->prev->next = current;
378 other_it->current->next = next;
379 other_it->current->prev = current;
380 current->next = other_it->current;
381 current->prev = other_it->prev;
382 next->prev = other_it->current;
384 other_it->next = other_it->current;
388 prev->next = other_it->current;
389 current->next = other_it->next;
390 current->prev = other_it->current;
391 other_it->current->next = current;
392 other_it->current->prev = prev;
393 other_it->next->prev = current;
396 other_it->prev = other_it->current;
401 prev->next = other_it->current;
402 current->next = other_it->next;
403 current->prev = other_it->prev;
404 next->prev = other_it->current;
405 other_it->prev->next = current;
406 other_it->current->next = next;
407 other_it->current->prev = prev;
408 other_it->next->prev = current;
414 if (list->last == current)
415 list->last = other_it->current;
416 if (other_it->list->last == other_it->current)
417 other_it->list->last = current;
419 if (current == cycle_pt)
420 cycle_pt = other_it->cycle_pt;
421 if (other_it->current == other_it->cycle_pt)
422 other_it->cycle_pt = cycle_pt;
426 old_current = current;
427 current = other_it->current;
428 other_it->current = old_current;
const ERRCODE BAD_PARAMETER
const ERRCODE NULL_OBJECT
void error(const char *caller, TessErrorLogCode action, const char *format,...) const