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

#include <imagedata.h>

Collaboration diagram for tesseract::DocumentData:

Public Member Functions

 DocumentData (const STRING &name)
 
 ~DocumentData ()
 
bool LoadDocument (const char *filename, int start_page, int64_t max_memory, FileReader reader)
 
void SetDocument (const char *filename, int64_t max_memory, FileReader reader)
 
bool SaveDocument (const char *filename, FileWriter writer)
 
bool SaveToBuffer (GenericVector< char > *buffer)
 
void AddPageToDocument (ImageData *page)
 
const STRINGdocument_name () const
 
int NumPages () const
 
int64_t memory_used () const
 
void LoadPageInBackground (int index)
 
const ImageDataGetPage (int index)
 
bool IsPageAvailable (int index, ImageData **page)
 
ImageDataTakePage (int index)
 
bool IsCached () const
 
int64_t UnCache ()
 
void Shuffle ()
 

Private Member Functions

void set_total_pages (int total)
 
void set_memory_used (int64_t memory_used)
 
bool ReCachePages ()
 

Private Attributes

STRING document_name_
 
PointerVector< ImageDatapages_
 
int pages_offset_
 
int total_pages_
 
int64_t memory_used_
 
int64_t max_memory_
 
FileReader reader_
 
SVMutex pages_mutex_
 
SVMutex general_mutex_
 

Friends

void * ReCachePagesFunc (void *data)
 

Constructor & Destructor Documentation

◆ DocumentData()

tesseract::DocumentData::DocumentData ( const STRING name)
explicit

◆ ~DocumentData()

tesseract::DocumentData::~DocumentData ( )

Member Function Documentation

◆ AddPageToDocument()

void tesseract::DocumentData::AddPageToDocument ( ImageData page)

◆ document_name()

const STRING& tesseract::DocumentData::document_name ( ) const
inline

◆ GetPage()

const ImageData * tesseract::DocumentData::GetPage ( int  index)

◆ IsCached()

bool tesseract::DocumentData::IsCached ( ) const
inline

◆ IsPageAvailable()

bool tesseract::DocumentData::IsPageAvailable ( int  index,
ImageData **  page 
)

◆ LoadDocument()

bool tesseract::DocumentData::LoadDocument ( const char *  filename,
int  start_page,
int64_t  max_memory,
FileReader  reader 
)

◆ LoadPageInBackground()

void tesseract::DocumentData::LoadPageInBackground ( int  index)

◆ memory_used()

int64_t tesseract::DocumentData::memory_used ( ) const
inline

◆ NumPages()

int tesseract::DocumentData::NumPages ( ) const
inline

◆ ReCachePages()

bool tesseract::DocumentData::ReCachePages ( )
private

◆ SaveDocument()

bool tesseract::DocumentData::SaveDocument ( const char *  filename,
FileWriter  writer 
)

◆ SaveToBuffer()

bool tesseract::DocumentData::SaveToBuffer ( GenericVector< char > *  buffer)

◆ set_memory_used()

void tesseract::DocumentData::set_memory_used ( int64_t  memory_used)
inlineprivate

◆ set_total_pages()

void tesseract::DocumentData::set_total_pages ( int  total)
inlineprivate

◆ SetDocument()

void tesseract::DocumentData::SetDocument ( const char *  filename,
int64_t  max_memory,
FileReader  reader 
)

◆ Shuffle()

void tesseract::DocumentData::Shuffle ( )

◆ TakePage()

ImageData* tesseract::DocumentData::TakePage ( int  index)
inline

◆ UnCache()

int64_t tesseract::DocumentData::UnCache ( )

Friends And Related Function Documentation

◆ ReCachePagesFunc

void* ReCachePagesFunc ( void *  data)
friend

Member Data Documentation

◆ document_name_

STRING tesseract::DocumentData::document_name_
private

◆ general_mutex_

SVMutex tesseract::DocumentData::general_mutex_
mutableprivate

◆ max_memory_

int64_t tesseract::DocumentData::max_memory_
private

◆ memory_used_

int64_t tesseract::DocumentData::memory_used_
private

◆ pages_

PointerVector<ImageData> tesseract::DocumentData::pages_
private

◆ pages_mutex_

SVMutex tesseract::DocumentData::pages_mutex_
private

◆ pages_offset_

int tesseract::DocumentData::pages_offset_
private

◆ reader_

FileReader tesseract::DocumentData::reader_
private

◆ total_pages_

int tesseract::DocumentData::total_pages_
private

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