#include <pageres.h>
List of all members.
Detailed Description
Definition at line 689 of file pageres.h.
Constructor & Destructor Documentation
PAGE_RES_IT::PAGE_RES_IT |
( |
| ) |
[inline] |
PAGE_RES_IT::PAGE_RES_IT |
( |
PAGE_RES * |
the_page_res | ) |
[inline] |
Member Function Documentation
BLOCK_RES* PAGE_RES_IT::block |
( |
| ) |
const [inline] |
int PAGE_RES_IT::cmp |
( |
const PAGE_RES_IT & |
other | ) |
const |
Definition at line 851 of file pageres.cpp.
{
ASSERT_HOST(page_res == other.page_res);
if (other.block_res == NULL) {
if (block_res == NULL)
return 0;
return -1;
}
if (block_res == NULL) {
return 1;
}
if (block_res == other.block_res) {
if (other.row_res == NULL || row_res == NULL) {
return 0;
}
if (row_res == other.row_res) {
ASSERT_HOST(other.word_res != NULL && word_res != NULL);
if (word_res == other.word_res) {
return 0;
}
WERD_RES_IT word_res_it(&row_res->word_res_list);
for (word_res_it.mark_cycle_pt(); !word_res_it.cycled_list();
word_res_it.forward()) {
if (word_res_it.data() == word_res) {
return -1;
} else if (word_res_it.data() == other.word_res) {
return 1;
}
}
ASSERT_HOST("Error: Incomparable PAGE_RES_ITs" == NULL);
}
ROW_RES_IT row_res_it(&block_res->row_res_list);
for (row_res_it.mark_cycle_pt(); !row_res_it.cycled_list();
row_res_it.forward()) {
if (row_res_it.data() == row_res) {
return -1;
} else if (row_res_it.data() == other.row_res) {
return 1;
}
}
ASSERT_HOST("Error: Incomparable PAGE_RES_ITs" == NULL);
}
BLOCK_RES_IT block_res_it(&page_res->block_res_list);
for (block_res_it.mark_cycle_pt();
!block_res_it.cycled_list(); block_res_it.forward()) {
if (block_res_it.data() == block_res) {
return -1;
} else if (block_res_it.data() == other.block_res) {
return 1;
}
}
ASSERT_HOST("Error: Incomparable PAGE_RES_ITs" == NULL);
return 0;
}
void PAGE_RES_IT::DeleteCurrentWord |
( |
| ) |
|
Definition at line 950 of file pageres.cpp.
{
ASSERT_HOST(!word_res->part_of_combo);
if (!word_res->combination) {
WERD_IT w_it(row()->row->word_list());
for (w_it.mark_cycle_pt(); !w_it.cycled_list(); w_it.forward()) {
if (w_it.data() == word_res->word) {
break;
}
}
ASSERT_HOST(!w_it.cycled_list());
delete w_it.extract();
}
WERD_RES_IT wr_it(&row()->word_res_list);
for (wr_it.mark_cycle_pt(); !wr_it.cycled_list(); wr_it.forward()) {
if (wr_it.data() == word_res) {
word_res = NULL;
break;
}
}
ASSERT_HOST(!wr_it.cycled_list());
delete wr_it.extract();
ResetWordIterator();
}
WERD_RES* PAGE_RES_IT::forward |
( |
| ) |
[inline] |
Definition at line 737 of file pageres.h.
{
return internal_forward(false, false);
}
WERD_RES * PAGE_RES_IT::forward_block |
( |
| ) |
|
Definition at line 1130 of file pageres.cpp.
{
while (block_res == next_block_res) {
internal_forward(false, true);
}
return internal_forward(false, true);
}
WERD_RES * PAGE_RES_IT::forward_paragraph |
( |
| ) |
|
Definition at line 1115 of file pageres.cpp.
{
while (block_res == next_block_res &&
(next_row_res != NULL && next_row_res->row != NULL &&
row_res->row->para() == next_row_res->row->para())) {
internal_forward(false, true);
}
return internal_forward(false, true);
}
WERD_RES* PAGE_RES_IT::forward_with_empties |
( |
| ) |
[inline] |
Definition at line 741 of file pageres.h.
{
return internal_forward(false, true);
}
Definition at line 918 of file pageres.cpp.
{
WERD_IT w_it(row()->row->word_list());
for (w_it.mark_cycle_pt(); !w_it.cycled_list(); w_it.forward()) {
WERD* word = w_it.data();
if (word == word_res->word)
break;
}
ASSERT_HOST(!w_it.cycled_list());
w_it.add_before_then_move(new_word);
WERD_RES* new_res = new WERD_RES(new_word);
new_res->CopySimpleFields(clone_res);
WERD_RES_IT wr_it(&row()->word_res_list);
for (wr_it.mark_cycle_pt(); !wr_it.cycled_list(); wr_it.forward()) {
WERD_RES* word = wr_it.data();
if (word == word_res)
break;
}
ASSERT_HOST(!wr_it.cycled_list());
wr_it.add_before_then_move(new_res);
if (wr_it.at_first()) {
ResetWordIterator();
}
return new_res;
}
BLOCK_RES* PAGE_RES_IT::next_block |
( |
| ) |
const [inline] |
Definition at line 772 of file pageres.h.
{
return next_block_res;
}
ROW_RES* PAGE_RES_IT::next_row |
( |
| ) |
const [inline] |
WERD_RES* PAGE_RES_IT::next_word |
( |
| ) |
const [inline] |
Definition at line 766 of file pageres.h.
{
return next_word_res;
}
bool PAGE_RES_IT::operator!= |
( |
const PAGE_RES_IT & |
other | ) |
const [inline] |
Definition at line 705 of file pageres.h.
{return !(*this == other); }
bool PAGE_RES_IT::operator== |
( |
const PAGE_RES_IT & |
other | ) |
const |
Definition at line 845 of file pageres.cpp.
{
return word_res == other.word_res &&
row_res == other.row_res &&
block_res == other.block_res;
}
BLOCK_RES* PAGE_RES_IT::prev_block |
( |
| ) |
const [inline] |
Definition at line 754 of file pageres.h.
{
return prev_block_res;
}
ROW_RES* PAGE_RES_IT::prev_row |
( |
| ) |
const [inline] |
WERD_RES* PAGE_RES_IT::prev_word |
( |
| ) |
const [inline] |
Definition at line 748 of file pageres.h.
{
return prev_word_res;
}
void PAGE_RES_IT::rej_stat_word |
( |
| ) |
|
WERD_RES* PAGE_RES_IT::restart_page |
( |
| ) |
[inline] |
WERD_RES* PAGE_RES_IT::restart_page_with_empties |
( |
| ) |
[inline] |
ROW_RES* PAGE_RES_IT::row |
( |
| ) |
const [inline] |
WERD_RES * PAGE_RES_IT::start_page |
( |
bool |
empty_ok | ) |
|
Definition at line 987 of file pageres.cpp.
{
block_res_it.set_to_list(&page_res->block_res_list);
block_res_it.mark_cycle_pt();
prev_block_res = NULL;
prev_row_res = NULL;
prev_word_res = NULL;
block_res = NULL;
row_res = NULL;
word_res = NULL;
next_block_res = NULL;
next_row_res = NULL;
next_word_res = NULL;
internal_forward(true, empty_ok);
return internal_forward(false, empty_ok);
}
WERD_RES* PAGE_RES_IT::word |
( |
| ) |
const [inline] |
Member Data Documentation
The documentation for this class was generated from the following files: