#include <unicharcompress.h>
Definition at line 34 of file unicharcompress.h.
◆ RecodedCharID()
tesseract::RecodedCharID::RecodedCharID |
( |
| ) |
|
|
inline |
Definition at line 39 of file unicharcompress.h.
39 : self_normalized_(0), length_(0) {
40 memset(code_, 0,
sizeof(code_));
◆ DeSerialize()
bool tesseract::RecodedCharID::DeSerialize |
( |
TFile * |
fp | ) |
|
|
inline |
Definition at line 72 of file unicharcompress.h.
73 if (fp->FRead(&self_normalized_,
sizeof(self_normalized_), 1) != 1)
75 if (fp->FReadEndian(&length_,
sizeof(length_), 1) != 1)
return false;
76 if (fp->FReadEndian(code_,
sizeof(code_[0]), length_) != length_)
◆ length()
int tesseract::RecodedCharID::length |
( |
| ) |
const |
|
inline |
◆ operator()()
int tesseract::RecodedCharID::operator() |
( |
int |
index | ) |
const |
|
inline |
◆ operator==()
bool tesseract::RecodedCharID::operator== |
( |
const RecodedCharID & |
other | ) |
const |
|
inline |
Definition at line 80 of file unicharcompress.h.
81 if (length_ != other.length_)
return false;
82 for (
int i = 0; i < length_; ++i) {
83 if (code_[i] != other.code_[i])
return false;
◆ self_normalized()
bool tesseract::RecodedCharID::self_normalized |
( |
| ) |
const |
|
inline |
◆ Serialize()
bool tesseract::RecodedCharID::Serialize |
( |
TFile * |
fp | ) |
const |
|
inline |
Definition at line 63 of file unicharcompress.h.
64 if (fp->FWrite(&self_normalized_,
sizeof(self_normalized_), 1) != 1)
66 if (fp->FWrite(&length_,
sizeof(length_), 1) != 1)
return false;
67 if (fp->FWrite(code_,
sizeof(code_[0]), length_) != length_)
return false;
◆ Set()
void tesseract::RecodedCharID::Set |
( |
int |
index, |
|
|
int |
value |
|
) |
| |
|
inline |
◆ Set3()
void tesseract::RecodedCharID::Set3 |
( |
int |
code0, |
|
|
int |
code1, |
|
|
int |
code2 |
|
) |
| |
|
inline |
◆ set_self_normalized()
void tesseract::RecodedCharID::set_self_normalized |
( |
bool |
value | ) |
|
|
inline |
◆ Truncate()
void tesseract::RecodedCharID::Truncate |
( |
int |
length | ) |
|
|
inline |
◆ kMaxCodeLen
const int tesseract::RecodedCharID::kMaxCodeLen = 9 |
|
static |
The documentation for this class was generated from the following file: