tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::DocumentCache Class Reference

#include <imagedata.h>

Collaboration diagram for tesseract::DocumentCache:

Public Member Functions

 DocumentCache (int64_t max_memory)
 
 ~DocumentCache ()
 
void Clear ()
 
bool LoadDocuments (const GenericVector< STRING > &filenames, CachingStrategy cache_strategy, FileReader reader)
 
bool AddToCache (DocumentData *data)
 
DocumentDataFindDocument (const STRING &document_name) const
 
const ImageDataGetPageBySerial (int serial)
 
const PointerVector< DocumentData > & documents () const
 
int TotalPages ()
 

Private Member Functions

const ImageDataGetPageRoundRobin (int serial)
 
const ImageDataGetPageSequential (int serial)
 
int CountNeighbourDocs (int index, int dir)
 

Private Attributes

PointerVector< DocumentDatadocuments_
 
CachingStrategy cache_strategy_
 
int num_pages_per_doc_
 
int64_t max_memory_
 

Constructor & Destructor Documentation

◆ DocumentCache()

tesseract::DocumentCache::DocumentCache ( int64_t  max_memory)
explicit

◆ ~DocumentCache()

tesseract::DocumentCache::~DocumentCache ( )

Member Function Documentation

◆ AddToCache()

bool tesseract::DocumentCache::AddToCache ( DocumentData data)

◆ Clear()

void tesseract::DocumentCache::Clear ( )
inline

◆ CountNeighbourDocs()

int tesseract::DocumentCache::CountNeighbourDocs ( int  index,
int  dir 
)
private

◆ documents()

const PointerVector<DocumentData>& tesseract::DocumentCache::documents ( ) const
inline

◆ FindDocument()

DocumentData * tesseract::DocumentCache::FindDocument ( const STRING document_name) const

◆ GetPageBySerial()

const ImageData* tesseract::DocumentCache::GetPageBySerial ( int  serial)
inline

◆ GetPageRoundRobin()

const ImageData * tesseract::DocumentCache::GetPageRoundRobin ( int  serial)
private

◆ GetPageSequential()

const ImageData * tesseract::DocumentCache::GetPageSequential ( int  serial)
private

◆ LoadDocuments()

bool tesseract::DocumentCache::LoadDocuments ( const GenericVector< STRING > &  filenames,
CachingStrategy  cache_strategy,
FileReader  reader 
)

◆ TotalPages()

int tesseract::DocumentCache::TotalPages ( )

Member Data Documentation

◆ cache_strategy_

CachingStrategy tesseract::DocumentCache::cache_strategy_
private

◆ documents_

PointerVector<DocumentData> tesseract::DocumentCache::documents_
private

◆ max_memory_

int64_t tesseract::DocumentCache::max_memory_
private

◆ num_pages_per_doc_

int tesseract::DocumentCache::num_pages_per_doc_
private

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