tesseract  5.0.0-alpha-619-ge9db
tesseract::TESS_CHAR Struct Reference
Inheritance diagram for tesseract::TESS_CHAR:
ELIST_LINK

Public Member Functions

 TESS_CHAR (float _cost, const char *repr, int len=-1)
 
 TESS_CHAR ()
 
 ~TESS_CHAR ()
 
- Public Member Functions inherited from ELIST_LINK
 ELIST_LINK ()
 
 ELIST_LINK (const ELIST_LINK &)
 
void operator= (const ELIST_LINK &)
 

Public Attributes

char * unicode_repr
 
int length
 
float cost
 
TBOX box
 

Detailed Description

Definition at line 2477 of file baseapi.cpp.

Constructor & Destructor Documentation

◆ TESS_CHAR() [1/2]

tesseract::TESS_CHAR::TESS_CHAR ( float  _cost,
const char *  repr,
int  len = -1 
)
inline

Definition at line 2483 of file baseapi.cpp.

2483  : cost(_cost) {
2484  length = (len == -1 ? strlen(repr) : len);
2485  unicode_repr = new char[length + 1];
2486  strncpy(unicode_repr, repr, length);
2487  }

◆ TESS_CHAR() [2/2]

tesseract::TESS_CHAR::TESS_CHAR ( )
inline

Definition at line 2489 of file baseapi.cpp.

2490  : unicode_repr(nullptr),
2491  length(0),
2492  cost(0.0f)
2493  { // Satisfies ELISTIZE.
2494  }

◆ ~TESS_CHAR()

tesseract::TESS_CHAR::~TESS_CHAR ( )
inline

Definition at line 2495 of file baseapi.cpp.

2495  {
2496  delete [] unicode_repr;
2497  }

Member Data Documentation

◆ box

TBOX tesseract::TESS_CHAR::box

Definition at line 2481 of file baseapi.cpp.

◆ cost

float tesseract::TESS_CHAR::cost

Definition at line 2480 of file baseapi.cpp.

◆ length

int tesseract::TESS_CHAR::length

Definition at line 2479 of file baseapi.cpp.

◆ unicode_repr

char* tesseract::TESS_CHAR::unicode_repr

Definition at line 2478 of file baseapi.cpp.


The documentation for this struct was generated from the following file:
tesseract::TESS_CHAR::unicode_repr
char * unicode_repr
Definition: baseapi.cpp:2478
tesseract::TESS_CHAR::cost
float cost
Definition: baseapi.cpp:2480
tesseract::TESS_CHAR::length
int length
Definition: baseapi.cpp:2479