Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BLOB_CHOICE Class Reference

#include <ratngs.h>

Inheritance diagram for BLOB_CHOICE:
ELIST_LINK

List of all members.

Public Member Functions

 BLOB_CHOICE ()
 BLOB_CHOICE (UNICHAR_ID src_unichar_id, float src_rating, float src_cert, inT16 src_fontinfo_id, inT16 src_fontinfo_id2, int script_id, inT16 min_xheight, inT16 max_xheight, bool adapted)
 BLOB_CHOICE (const BLOB_CHOICE &other)
 ~BLOB_CHOICE ()
UNICHAR_ID unichar_id () const
float rating () const
float certainty () const
inT16 fontinfo_id () const
inT16 fontinfo_id2 () const
int script_id () const
void * language_model_state ()
inT16 xgap_before () const
inT16 xgap_after () const
inT16 min_xheight () const
inT16 max_xheight () const
bool adapted () const
void set_unichar_id (UNICHAR_ID newunichar_id)
void set_rating (float newrat)
void set_certainty (float newrat)
void set_fontinfo_id (inT16 newfont)
void set_fontinfo_id2 (inT16 newfont)
void set_script (int newscript_id)
void set_language_model_state (void *language_model_state)
void set_xgap_before (inT16 gap)
void set_xgap_after (inT16 gap)
void set_adapted (bool adapted)
void print (const UNICHARSET *unicharset)
- Public Member Functions inherited from ELIST_LINK
 ELIST_LINK ()
 ELIST_LINK (const ELIST_LINK &)
void operator= (const ELIST_LINK &)

Static Public Member Functions

static BLOB_CHOICEdeep_copy (const BLOB_CHOICE *src)

Detailed Description

Definition at line 32 of file ratngs.h.


Constructor & Destructor Documentation

BLOB_CHOICE::BLOB_CHOICE ( )
inline

Definition at line 35 of file ratngs.h.

{
unichar_id_ = INVALID_UNICHAR_ID;
fontinfo_id_ = -1;
fontinfo_id2_ = -1;
rating_ = MAX_FLOAT32;
certainty_ = -MAX_FLOAT32;
script_id_ = -1;
language_model_state_ = NULL;
min_xheight_ = 0;
max_xheight_ = 0;
adapted_ = false;
}
BLOB_CHOICE::BLOB_CHOICE ( UNICHAR_ID  src_unichar_id,
float  src_rating,
float  src_cert,
inT16  src_fontinfo_id,
inT16  src_fontinfo_id2,
int  src_script_id,
inT16  min_xheight,
inT16  max_xheight,
bool  adapted 
)

BLOB_CHOICE::BLOB_CHOICE

Constructor to build a BLOB_CHOICE from a char, rating and certainty.

Definition at line 66 of file ratngs.cpp.

{
unichar_id_ = src_unichar_id;
rating_ = src_rating;
certainty_ = src_cert;
fontinfo_id_ = src_fontinfo_id;
fontinfo_id2_ = src_fontinfo_id2;
script_id_ = src_script_id;
language_model_state_ = NULL;
min_xheight_ = min_xheight;
max_xheight_ = max_xheight;
adapted_ = adapted;
}
BLOB_CHOICE::BLOB_CHOICE ( const BLOB_CHOICE other)

BLOB_CHOICE::BLOB_CHOICE

Constructor to build a BLOB_CHOICE from another BLOB_CHOICE.

Definition at line 93 of file ratngs.cpp.

{
unichar_id_ = other.unichar_id();
rating_ = other.rating();
certainty_ = other.certainty();
fontinfo_id_ = other.fontinfo_id();
fontinfo_id2_ = other.fontinfo_id2();
script_id_ = other.script_id();
language_model_state_ = NULL;
min_xheight_ = other.min_xheight_;
max_xheight_ = other.max_xheight_;
adapted_ = other.adapted_;
}
BLOB_CHOICE::~BLOB_CHOICE ( )
inline

Definition at line 57 of file ratngs.h.

{}

Member Function Documentation

bool BLOB_CHOICE::adapted ( ) const
inline

Definition at line 92 of file ratngs.h.

{
return adapted_;
}
float BLOB_CHOICE::certainty ( ) const
inline

Definition at line 65 of file ratngs.h.

{
return certainty_;
}
static BLOB_CHOICE* BLOB_CHOICE::deep_copy ( const BLOB_CHOICE src)
inlinestatic

Definition at line 126 of file ratngs.h.

{
BLOB_CHOICE* choice = new BLOB_CHOICE;
*choice = *src;
return choice;
}
inT16 BLOB_CHOICE::fontinfo_id ( ) const
inline

Definition at line 68 of file ratngs.h.

{
return fontinfo_id_;
}
inT16 BLOB_CHOICE::fontinfo_id2 ( ) const
inline

Definition at line 71 of file ratngs.h.

{
return fontinfo_id2_;
}
void* BLOB_CHOICE::language_model_state ( )
inline

Definition at line 77 of file ratngs.h.

{
return language_model_state_;
}
inT16 BLOB_CHOICE::max_xheight ( ) const
inline

Definition at line 89 of file ratngs.h.

{
return max_xheight_;
}
inT16 BLOB_CHOICE::min_xheight ( ) const
inline

Definition at line 86 of file ratngs.h.

{
return min_xheight_;
}
void BLOB_CHOICE::print ( const UNICHARSET unicharset)
inline

Definition at line 131 of file ratngs.h.

{
tprintf("r%.2f c%.2f : %d %s", rating_, certainty_, unichar_id_,
(unicharset == NULL) ? "" :
unicharset->debug_str(unichar_id_).string());
}
float BLOB_CHOICE::rating ( ) const
inline

Definition at line 62 of file ratngs.h.

{
return rating_;
}
int BLOB_CHOICE::script_id ( ) const
inline

Definition at line 74 of file ratngs.h.

{
return script_id_;
}
void BLOB_CHOICE::set_adapted ( bool  adapted)
inline

Definition at line 123 of file ratngs.h.

{
adapted_ = adapted;
}
void BLOB_CHOICE::set_certainty ( float  newrat)
inline

Definition at line 102 of file ratngs.h.

{
certainty_ = newrat;
}
void BLOB_CHOICE::set_fontinfo_id ( inT16  newfont)
inline

Definition at line 105 of file ratngs.h.

{
fontinfo_id_ = newfont;
}
void BLOB_CHOICE::set_fontinfo_id2 ( inT16  newfont)
inline

Definition at line 108 of file ratngs.h.

{
fontinfo_id2_ = newfont;
}
void BLOB_CHOICE::set_language_model_state ( void *  language_model_state)
inline

Definition at line 114 of file ratngs.h.

{
language_model_state_ = language_model_state;
}
void BLOB_CHOICE::set_rating ( float  newrat)
inline

Definition at line 99 of file ratngs.h.

{
rating_ = newrat;
}
void BLOB_CHOICE::set_script ( int  newscript_id)
inline

Definition at line 111 of file ratngs.h.

{
script_id_ = newscript_id;
}
void BLOB_CHOICE::set_unichar_id ( UNICHAR_ID  newunichar_id)
inline

Definition at line 96 of file ratngs.h.

{
unichar_id_ = newunichar_id;
}
void BLOB_CHOICE::set_xgap_after ( inT16  gap)
inline

Definition at line 120 of file ratngs.h.

{
xgap_after_ = gap;
}
void BLOB_CHOICE::set_xgap_before ( inT16  gap)
inline

Definition at line 117 of file ratngs.h.

{
xgap_before_ = gap;
}
UNICHAR_ID BLOB_CHOICE::unichar_id ( ) const
inline

Definition at line 59 of file ratngs.h.

{
return unichar_id_;
}
inT16 BLOB_CHOICE::xgap_after ( ) const
inline

Definition at line 83 of file ratngs.h.

{
return xgap_after_;
}
inT16 BLOB_CHOICE::xgap_before ( ) const
inline

Definition at line 80 of file ratngs.h.

{
return xgap_before_;
}

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