"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dict/dawg_cache.h" between
tesseract-4.1.3.tar.gz and tesseract-5.0.0.tar.gz

About: Tesseract is an Optical Character Recognition (OCR) engine.

dawg_cache.h  (tesseract-4.1.3):dawg_cache.h  (tesseract-5.0.0)
skipping to change at line 25 skipping to change at line 25
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// //
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#ifndef TESSERACT_DICT_DAWG_CACHE_H_ #ifndef TESSERACT_DICT_DAWG_CACHE_H_
#define TESSERACT_DICT_DAWG_CACHE_H_ #define TESSERACT_DICT_DAWG_CACHE_H_
#include "dawg.h" #include "dawg.h"
#include "object_cache.h" #include "object_cache.h"
#include "strngs.h"
#include "tessdatamanager.h" #include "tessdatamanager.h"
namespace tesseract { namespace tesseract {
class DawgCache { class DawgCache {
public: public:
Dawg *GetSquishedDawg(const STRING &lang, TessdataType tessdata_dawg_type, Dawg *GetSquishedDawg(const std::string &lang, TessdataType tessdata_dawg_type
int debug_level, TessdataManager *data_file); , int debug_level,
TessdataManager *data_file);
// If we manage the given dawg, decrement its count, // If we manage the given dawg, decrement its count,
// and possibly delete it if the count reaches zero. // and possibly delete it if the count reaches zero.
// If dawg is unknown to us, return false. // If dawg is unknown to us, return false.
bool FreeDawg(Dawg *dawg) { bool FreeDawg(Dawg *dawg) {
return dawgs_.Free(dawg); return dawgs_.Free(dawg);
} }
// Free up any currently unused dawgs. // Free up any currently unused dawgs.
void DeleteUnusedDawgs() { void DeleteUnusedDawgs() {
dawgs_.DeleteUnusedObjects(); dawgs_.DeleteUnusedObjects();
} }
private: private:
ObjectCache<Dawg> dawgs_; ObjectCache<Dawg> dawgs_;
}; };
} // namespace tesseract } // namespace tesseract
#endif // TESSERACT_DICT_DAWG_CACHE_H_ #endif // TESSERACT_DICT_DAWG_CACHE_H_
 End of changes. 5 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)