tesseract  5.0.0-alpha-619-ge9db
tesseract::InputBuffer Class Reference

#include <fileio.h>

Public Member Functions

 InputBuffer (FILE *stream)
 
 InputBuffer (FILE *stream, size_t size)
 
 ~InputBuffer ()
 
bool Read (std::string *out)
 
bool CloseFile ()
 

Detailed Description

Definition at line 81 of file fileio.h.

Constructor & Destructor Documentation

◆ InputBuffer() [1/2]

tesseract::InputBuffer::InputBuffer ( FILE *  stream)
explicit

Definition at line 150 of file fileio.cpp.

152  {

◆ InputBuffer() [2/2]

tesseract::InputBuffer::InputBuffer ( FILE *  stream,
size_t  size 
)

Definition at line 154 of file fileio.cpp.

155  {
156  if (ferror(stream_)) {

◆ ~InputBuffer()

tesseract::InputBuffer::~InputBuffer ( )

Definition at line 158 of file fileio.cpp.

Member Function Documentation

◆ CloseFile()

bool tesseract::InputBuffer::CloseFile ( )

Definition at line 178 of file fileio.cpp.

181  : stream_(stream) {
182 }

◆ Read()

bool tesseract::InputBuffer::Read ( std::string out)

Definition at line 164 of file fileio.cpp.

166  {
167  int ret = fclose(stream_);
168  stream_ = nullptr;
169  return ret == 0;
170 }
171 
173 // OutputBuffer::
175 
176 OutputBuffer::OutputBuffer(FILE* stream)

The documentation for this class was generated from the following files:
tesseract::OutputBuffer::OutputBuffer
OutputBuffer(FILE *stream)
Definition: fileio.cpp:188