tesseract v5.3.3.20231005
tesseract::DawgCache Class Reference

#include <dawg_cache.h>

Public Member Functions

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

Detailed Description

Definition at line 29 of file dawg_cache.h.

Member Function Documentation

◆ DeleteUnusedDawgs()

void tesseract::DawgCache::DeleteUnusedDawgs ( )
inline

Definition at line 42 of file dawg_cache.h.

42 {
43 dawgs_.DeleteUnusedObjects();
44 }

◆ FreeDawg()

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

Definition at line 37 of file dawg_cache.h.

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

◆ GetSquishedDawg()

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

Definition at line 43 of file dawg_cache.cpp.

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

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