Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes
tesseract::InputFileBuffer Class Reference

`#include <input_file_buffer.h>`

List of all members.

## Public Member Functions

| InputFileBuffer (const string &file_name)
virtual | ~InputFileBuffer ()
int | Read (void *buffer, int bytes_to_read)

## Protected Attributes

string | file_name_
FILE * | fp_

## Detailed Description

Definition at line 19 of file input_file_buffer.h.

## Constructor & Destructor Documentation

tesseract::InputFileBuffer::InputFileBuffer | ( | const string & | file_name | ) |

explicit

Definition at line 13 of file input_file_buffer.cpp.

: file_name_(file_name) {
fp_ = NULL;
}

tesseract::InputFileBuffer::~InputFileBuffer | ( |  | ) |

virtual

Definition at line 19 of file input_file_buffer.cpp.

{
if (fp_ != NULL) {
fclose(fp_);
}
}

## Member Function Documentation

int tesseract::InputFileBuffer::Read | ( | void * | buffer,
|  | int | bytes_to_read
| ) |  |

Definition at line 26 of file input_file_buffer.cpp.

{
// open the file if necessary
if (fp_ == NULL) {
fp_ = fopen(file_name_.c_str(), "rb");
if (fp_ == NULL) {
return 0;
}
}
return fread(buffer, 1, bytes_to_read, fp_);
}

## Member Data Documentation

string tesseract::InputFileBuffer::file_name_

protected

Definition at line 26 of file input_file_buffer.h.

FILE* tesseract::InputFileBuffer::fp_

protected

Definition at line 27 of file input_file_buffer.h.

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

- /mnt/data/src/tesseract-ocr/neural_networks/runtime/input_file_buffer.h
- /mnt/data/src/tesseract-ocr/neural_networks/runtime/input_file_buffer.cpp