tesseract  4.00.00dev
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 }
_ConstTessMemberResultCallback_0_0< true, R, T1 >::base * NewTessCallback(const T1 *obj, R(T2::*member)() const)
Definition: tesscallback.h:106
Definition: strngs.h:45

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