tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
CHAR_FRAGMENT Class Reference

#include <unicharset.h>

Public Member Functions

void set_all (const char *unichar, int pos, int total, bool natural)
 
void set_unichar (const char *uch)
 
void set_pos (int p)
 
void set_total (int t)
 
const char * get_unichar () const
 
int get_pos () const
 
int get_total () const
 
STRING to_string () const
 
bool equals (const char *other_unichar, int other_pos, int other_total) const
 
bool equals (const CHAR_FRAGMENT *other) const
 
bool is_continuation_of (const CHAR_FRAGMENT *fragment) const
 
bool is_beginning () const
 
bool is_ending () const
 
bool is_natural () const
 
void set_natural (bool value)
 

Static Public Member Functions

static STRING to_string (const char *unichar, int pos, int total, bool natural)
 
static CHAR_FRAGMENTparse_from_string (const char *str)
 

Static Public Attributes

static const int kMinLen = 6
 
static const int kMaxLen = 3 + 30 + 2
 
static const int kMaxChunks = 5
 

Private Attributes

char unichar [30+1]
 
bool natural
 
int16_t pos
 
int16_t total
 

Member Function Documentation

◆ equals() [1/2]

bool CHAR_FRAGMENT::equals ( const char *  other_unichar,
int  other_pos,
int  other_total 
) const
inline

◆ equals() [2/2]

bool CHAR_FRAGMENT::equals ( const CHAR_FRAGMENT other) const
inline

◆ get_pos()

int CHAR_FRAGMENT::get_pos ( ) const
inline

◆ get_total()

int CHAR_FRAGMENT::get_total ( ) const
inline

◆ get_unichar()

const char* CHAR_FRAGMENT::get_unichar ( ) const
inline

◆ is_beginning()

bool CHAR_FRAGMENT::is_beginning ( ) const
inline

◆ is_continuation_of()

bool CHAR_FRAGMENT::is_continuation_of ( const CHAR_FRAGMENT fragment) const
inline

◆ is_ending()

bool CHAR_FRAGMENT::is_ending ( ) const
inline

◆ is_natural()

bool CHAR_FRAGMENT::is_natural ( ) const
inline

◆ parse_from_string()

CHAR_FRAGMENT * CHAR_FRAGMENT::parse_from_string ( const char *  str)
static

◆ set_all()

void CHAR_FRAGMENT::set_all ( const char *  unichar,
int  pos,
int  total,
bool  natural 
)
inline

◆ set_natural()

void CHAR_FRAGMENT::set_natural ( bool  value)
inline

◆ set_pos()

void CHAR_FRAGMENT::set_pos ( int  p)
inline

◆ set_total()

void CHAR_FRAGMENT::set_total ( int  t)
inline

◆ set_unichar()

void CHAR_FRAGMENT::set_unichar ( const char *  uch)
inline

◆ to_string() [1/2]

STRING CHAR_FRAGMENT::to_string ( const char *  unichar,
int  pos,
int  total,
bool  natural 
)
static

◆ to_string() [2/2]

STRING CHAR_FRAGMENT::to_string ( ) const
inline

Member Data Documentation

◆ kMaxChunks

const int CHAR_FRAGMENT::kMaxChunks = 5
static

◆ kMaxLen

const int CHAR_FRAGMENT::kMaxLen = 3 + 30 + 2
static

◆ kMinLen

const int CHAR_FRAGMENT::kMinLen = 6
static

◆ natural

bool CHAR_FRAGMENT::natural
private

◆ pos

int16_t CHAR_FRAGMENT::pos
private

◆ total

int16_t CHAR_FRAGMENT::total
private

◆ unichar

char CHAR_FRAGMENT::unichar[30+1]
private

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