#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_(1), length_(0) {
40 memset(code_, 0, sizeof(code_));
41 }
◆ DeSerialize()
bool tesseract::RecodedCharID::DeSerialize |
( |
TFile * |
fp | ) |
|
|
inline |
Definition at line 67 of file unicharcompress.h.
67 {
68 return fp->DeSerialize(&self_normalized_) &&
69 fp->DeSerialize(&length_) &&
70 fp->DeSerialize(&code_[0], length_);
71 }
◆ 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 72 of file unicharcompress.h.
72 {
73 if (length_ != other.length_) return false;
74 for (int i = 0; i < length_; ++i) {
75 if (code_[i] != other.code_[i]) return false;
76 }
77 return true;
78 }
◆ Serialize()
bool tesseract::RecodedCharID::Serialize |
( |
TFile * |
fp | ) |
const |
|
inline |
Definition at line 61 of file unicharcompress.h.
61 {
62 return fp->Serialize(&self_normalized_) &&
63 fp->Serialize(&length_) &&
64 fp->Serialize(&code_[0], length_);
65 }
◆ Set()
void tesseract::RecodedCharID::Set |
( |
int |
index, |
|
|
int |
value |
|
) |
| |
|
inline |
Definition at line 44 of file unicharcompress.h.
44 {
45 code_[index] = value;
46 if (length_ <= index) length_ = index + 1;
47 }
◆ Set3()
void tesseract::RecodedCharID::Set3 |
( |
int |
code0, |
|
|
int |
code1, |
|
|
int |
code2 |
|
) |
| |
|
inline |
Definition at line 50 of file unicharcompress.h.
50 {
51 length_ = 3;
52 code_[0] = code0;
53 code_[1] = code1;
54 code_[2] = code2;
55 }
◆ 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: