#include <imagedata.h>
Definition at line 314 of file imagedata.h.
 
◆ DocumentCache()
  
  | 
        
          | tesseract::DocumentCache::DocumentCache | ( | int64_t | max_memory | ) |  |  | explicit | 
 
Definition at line 566 of file imagedata.cpp.
  567     : num_pages_per_doc_(0), max_memory_(max_memory) {}
  
 
◆ ~DocumentCache()
      
        
          | tesseract::DocumentCache::~DocumentCache | ( |  | ) |  | 
      
 
 
◆ AddToCache()
      
        
          | bool tesseract::DocumentCache::AddToCache | ( | DocumentData * | data | ) |  | 
      
 
 
◆ Clear()
  
  | 
        
          | void tesseract::DocumentCache::Clear | ( |  | ) |  |  | inline | 
 
Definition at line 320 of file imagedata.h.
  322     num_pages_per_doc_ = 0;
  
 
◆ documents()
◆ FindDocument()
      
        
          | DocumentData * tesseract::DocumentCache::FindDocument | ( | const STRING & | document_name | ) | const | 
      
 
Definition at line 603 of file imagedata.cpp.
  604   for (
int i = 0; i < documents_.size(); ++i) {
   605     if (documents_[i]->document_name() == document_name)
   606       return documents_[i];
  
 
◆ GetPageBySerial()
  
  | 
        
          | const ImageData* tesseract::DocumentCache::GetPageBySerial | ( | int | serial | ) |  |  | inline | 
 
Definition at line 337 of file imagedata.h.
  339       return GetPageSequential(serial);
   341       return GetPageRoundRobin(serial);
 
 
 
◆ LoadDocuments()
Definition at line 572 of file imagedata.cpp.
  575   cache_strategy_ = cache_strategy;
   576   int64_t fair_share_memory = 0;
   581     fair_share_memory = max_memory_ / filenames.
size();
   582   for (
int arg = 0; arg < filenames.
size(); ++arg) {
   583     STRING filename = filenames[arg];
   584     DocumentData* document = 
new DocumentData(filename);
   585     document->SetDocument(filename.
string(), fair_share_memory, reader);
   588   if (!documents_.empty()) {
   591     tprintf(
"Load of page 0 failed!\n");
 
const char * string() const
const ImageData * GetPageBySerial(int serial)
bool AddToCache(DocumentData *data)
DLLSYM void tprintf(const char *format,...)
 
 
◆ TotalPages()
      
        
          | int tesseract::DocumentCache::TotalPages | ( |  | ) |  | 
      
 
Definition at line 613 of file imagedata.cpp.
  617     if (num_pages_per_doc_ == 0) GetPageSequential(0);
   618     return num_pages_per_doc_ * documents_.size();
   621   int num_docs = documents_.size();
   622   for (
int d = 0; d < num_docs; ++d) {
   624     documents_[d]->GetPage(0);
   625     total_pages += documents_[d]->NumPages();
 
 
 
The documentation for this class was generated from the following files: