tesseract  5.0.0-alpha-619-ge9db
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 44 of file dawg_cache.cpp.

46  {
47  STRING data_id = data_file->GetDataFileName();
48  data_id += kTessdataFileSuffixes[tessdata_dawg_type];
49  DawgLoader loader(lang, tessdata_dawg_type, debug_level, data_file);
50  return dawgs_.Get(data_id, std::bind(&DawgLoader::Load, &loader));
51 }

The documentation for this class was generated from the following files:
STRING
Definition: strngs.h:45
tesseract::DawgLoader::Load
Dawg * Load()
Definition: dawg_cache.cpp:53