tesseract  3.05.02
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 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 
18 #ifndef INPUT_FILE_BUFFER_H
19 #define INPUT_FILE_BUFFER_H
20 
21 #include <stdio.h>
22 #include <string>
23 #ifdef USE_STD_NAMESPACE
24 using std::string;
25 #endif
26 
27 namespace tesseract {
29  public:
30  explicit InputFileBuffer(const string &file_name);
31  virtual ~InputFileBuffer();
32  int Read(void *buffer, int bytes_to_read);
33 
34  protected:
35  string file_name_;
36  FILE *fp_;
37 };
38 }
39 
40 #endif // INPUT_FILE_BUFFER_H__
InputFileBuffer(const string &file_name)
int Read(void *buffer, int bytes_to_read)