Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes
ETEXT_DESC Class Reference

`#include <ocrclass.h>`

List of all members.

## Public Member Functions

| ETEXT_DESC ()
void | set_deadline_msecs (inT32 deadline_msecs)
bool | deadline_exceeded () const

## Public Attributes

inT16 | count
inT16 | progress
inT8 | more_to_come
volatile inT8 | ocr_alive
inT8 | err_code
CANCEL_FUNC | cancel
void * | cancel_this
struct timeval | end_time
EANYCODE_CHAR | text [1]

## Detailed Description

Definition at line 112 of file ocrclass.h.

## Constructor & Destructor Documentation

ETEXT_DESC::ETEXT_DESC | ( |  | ) |

inline

Definition at line 125 of file ocrclass.h.

: count(0), progress(0), more_to_come(0), ocr_alive(0),
err_code(0), cancel(NULL), cancel_this(NULL) {
end_time.tv_sec = 0;
end_time.tv_usec = 0;
}

## Member Function Documentation

bool ETEXT_DESC::deadline_exceeded | ( |  | ) | const

inline

Definition at line 144 of file ocrclass.h.

{
if (end_time.tv_sec == 0 && end_time.tv_usec == 0) return false;
struct timeval now;
gettimeofday(&now, NULL);
return (now.tv_sec > end_time.tv_sec || (now.tv_sec == end_time.tv_sec &&
now.tv_usec > end_time.tv_usec));
}

void ETEXT_DESC::set_deadline_msecs | ( | inT32 | deadline_msecs | ) |

inline

Definition at line 132 of file ocrclass.h.

{
gettimeofday(&end_time, NULL);
inT32 deadline_secs = deadline_msecs / 1000;
end_time.tv_sec += deadline_secs;
end_time.tv_usec += (deadline_msecs - deadline_secs * 1000) * 1000;
if (end_time.tv_usec > 1000000) {
end_time.tv_usec -= 1000000;
++end_time.tv_sec;
}
}

## Member Data Documentation

CANCEL_FUNC ETEXT_DESC::cancel

Definition at line 119 of file ocrclass.h.

void* ETEXT_DESC::cancel_this

Definition at line 120 of file ocrclass.h.

inT16 ETEXT_DESC::count

Definition at line 114 of file ocrclass.h.

struct timeval ETEXT_DESC::end_time

Definition at line 121 of file ocrclass.h.

inT8 ETEXT_DESC::err_code

Definition at line 118 of file ocrclass.h.

inT8 ETEXT_DESC::more_to_come

Definition at line 116 of file ocrclass.h.

volatile inT8 ETEXT_DESC::ocr_alive

Definition at line 117 of file ocrclass.h.

inT16 ETEXT_DESC::progress

Definition at line 115 of file ocrclass.h.

EANYCODE_CHAR ETEXT_DESC::text[1]

Definition at line 123 of file ocrclass.h.

The documentation for this class was generated from the following file:

- /mnt/data/src/tesseract-ocr/ccutil/ocrclass.h