tesseract  4.0.0-1-g2a2b
tesseract::DawgCache Class Reference

#include <dawg_cache.h>

Public Member Functions

DawgGetSquishedDawg (const STRING &lang, TessdataType tessdata_dawg_type, int debug_level, TessdataManager *data_file)
 
bool FreeDawg (Dawg *dawg)
 
void DeleteUnusedDawgs ()
 

Detailed Description

Definition at line 30 of file dawg_cache.h.

Member Function Documentation

◆ DeleteUnusedDawgs()

void tesseract::DawgCache::DeleteUnusedDawgs ( )
inline

Definition at line 43 of file dawg_cache.h.

43  {
44  dawgs_.DeleteUnusedObjects();
45  }

◆ FreeDawg()

bool tesseract::DawgCache::FreeDawg ( Dawg dawg)
inline

Definition at line 38 of file dawg_cache.h.

38  {
39  return dawgs_.Free(dawg);
40  }

◆ GetSquishedDawg()

Dawg * tesseract::DawgCache::GetSquishedDawg ( const STRING lang,
TessdataType  tessdata_dawg_type,
int  debug_level,
TessdataManager data_file 
)

Definition at line 45 of file dawg_cache.cpp.

47  {
48  STRING data_id = data_file->GetDataFileName();
49  data_id += kTessdataFileSuffixes[tessdata_dawg_type];
50  DawgLoader loader(lang, tessdata_dawg_type, debug_level, data_file);
51  return dawgs_.Get(data_id, NewTessCallback(&loader, &DawgLoader::Load));
52 }
Definition: strngs.h:45
_ConstTessMemberResultCallback_0_0< true, R, T1 >::base * NewTessCallback(const T1 *obj, R(T2::*member)() const)
Definition: tesscallback.h:106

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