#include <unicharcompress.h>
Definition at line 32 of file unicharcompress.h.
◆ RecodedCharID()
tesseract::RecodedCharID::RecodedCharID |
( |
| ) |
|
|
inline |
Definition at line 37 of file unicharcompress.h.
37 : self_normalized_(1), length_(0) {
38 memset(code_, 0, sizeof(code_));
39 }
◆ DeSerialize()
bool tesseract::RecodedCharID::DeSerialize |
( |
TFile * |
fp | ) |
|
|
inline |
Definition at line 75 of file unicharcompress.h.
75 {
76 return fp->DeSerialize(&self_normalized_) && fp->DeSerialize(&length_) &&
77 fp->DeSerialize(&code_[0], length_);
78 }
◆ empty()
bool tesseract::RecodedCharID::empty |
( |
| ) |
const |
|
inline |
◆ 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 79 of file unicharcompress.h.
79 {
80 if (length_ != other.length_) {
81 return false;
82 }
83 for (
int i = 0;
i < length_; ++
i) {
84 if (code_[
i] != other.code_[
i]) {
85 return false;
86 }
87 }
88 return true;
89 }
◆ Serialize()
bool tesseract::RecodedCharID::Serialize |
( |
TFile * |
fp | ) |
const |
|
inline |
Definition at line 70 of file unicharcompress.h.
70 {
71 return fp->Serialize(&self_normalized_) && fp->Serialize(&length_) &&
72 fp->Serialize(&code_[0], length_);
73 }
◆ Set()
void tesseract::RecodedCharID::Set |
( |
int |
index, |
|
|
int |
value |
|
) |
| |
|
inline |
Definition at line 44 of file unicharcompress.h.
44 {
46 if (length_ <= index) {
47 length_ = index + 1;
48 }
49 }
◆ Set3()
void tesseract::RecodedCharID::Set3 |
( |
int |
code0, |
|
|
int |
code1, |
|
|
int |
code2 |
|
) |
| |
|
inline |
Definition at line 52 of file unicharcompress.h.
52 {
53 length_ = 3;
54 code_[0] = code0;
55 code_[1] = code1;
56 code_[2] = code2;
57 }
◆ 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: