All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
input_file_buffer.h
Go to the documentation of this file.
1 // Copyright 2008 Google Inc.
2 // All Rights Reserved.
3 // Author: ahmadab@google.com (Ahmad Abdulkader)
4 //
5 // input_file_buffer.h: Declarations of a class for an object that
6 // represents an input file buffer.
7 //
8 
9 #ifndef INPUT_FILE_BUFFER_H
10 #define INPUT_FILE_BUFFER_H
11 
12 #include <stdio.h>
13 #include <string>
14 #ifdef USE_STD_NAMESPACE
15 using std::string;
16 #endif
17 
18 namespace tesseract {
20  public:
21  explicit InputFileBuffer(const string &file_name);
22  virtual ~InputFileBuffer();
23  int Read(void *buffer, int bytes_to_read);
24 
25  protected:
26  string file_name_;
27  FILE *fp_;
28 };
29 }
30 
31 #endif // INPUT_FILE_BUFFER_H__
InputFileBuffer(const string &file_name)
int Read(void *buffer, int bytes_to_read)