|
tesseract 3.04.01
|
#include <input_file_buffer.h>
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_ |
Definition at line 19 of file input_file_buffer.h.
| usr src packages BUILD tesseract neural_networks runtime input_file_buffer cpp tesseract::InputFileBuffer::InputFileBuffer | ( | const string & | file_name | ) | [explicit] |
Definition at line 14 of file input_file_buffer.cpp.
: file_name_(file_name) { fp_ = NULL; }
| tesseract::InputFileBuffer::~InputFileBuffer | ( | ) | [virtual] |
Definition at line 20 of file input_file_buffer.cpp.
{
fclose(fp_);
}
}
| int tesseract::InputFileBuffer::Read | ( | void * | buffer, |
| int | bytes_to_read | ||
| ) |
Definition at line 27 of file input_file_buffer.cpp.
{
fp_ = fopen(file_name_.c_str(), "rb");
if (fp_ == NULL) {
return 0;
}
}
return fread(buffer, 1, bytes_to_read, fp_);
}
}
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.