Tesseract  3.02
tesseract-ocr/neural_networks/runtime/input_file_buffer.h
Go to the documentation of this file.
00001 // Copyright 2008 Google Inc.
00002 // All Rights Reserved.
00003 // Author: ahmadab@google.com (Ahmad Abdulkader)
00004 //
00005 // input_file_buffer.h: Declarations of a class for an object that
00006 // represents an input file buffer.
00007 //
00008 
00009 #ifndef INPUT_FILE_BUFFER_H
00010 #define INPUT_FILE_BUFFER_H
00011 
00012 #include <stdio.h>
00013 #include <string>
00014 #ifdef USE_STD_NAMESPACE
00015 using std::string;
00016 #endif
00017 
00018 namespace tesseract {
00019 class InputFileBuffer {
00020   public:
00021     explicit InputFileBuffer(const string &file_name);
00022     virtual ~InputFileBuffer();
00023     int Read(void *buffer, int bytes_to_read);
00024 
00025   protected:
00026     string file_name_;
00027     FILE *fp_;
00028 };
00029 }
00030 
00031 #endif  // INPUT_FILE_BUFFER_H__