tesseract  4.00.00dev
tesseract::OutputBuffer Class Reference

#include <fileio.h>

Public Member Functions

 OutputBuffer (FILE *stream)
 
 OutputBuffer (FILE *stream, size_t size)
 
 ~OutputBuffer ()
 
void WriteString (const string &str)
 
bool CloseFile ()
 

Detailed Description

Definition at line 80 of file fileio.h.

Constructor & Destructor Documentation

◆ OutputBuffer() [1/2]

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

Definition at line 172 of file fileio.cpp.

173  : stream_(stream) {
174 }
voidpf stream
Definition: ioapi.h:39

◆ OutputBuffer() [2/2]

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

Definition at line 176 of file fileio.cpp.

177  : stream_(stream) {
178 }
voidpf stream
Definition: ioapi.h:39

◆ ~OutputBuffer()

tesseract::OutputBuffer::~OutputBuffer ( )

Definition at line 180 of file fileio.cpp.

180  {
181  if (stream_ != nullptr) {
182  fclose(stream_);
183  }
184 }

Member Function Documentation

◆ CloseFile()

bool tesseract::OutputBuffer::CloseFile ( )

Definition at line 190 of file fileio.cpp.

190  {
191  int ret = fclose(stream_);
192  stream_ = nullptr;
193  return ret == 0;
194 }

◆ WriteString()

void tesseract::OutputBuffer::WriteString ( const string &  str)

Definition at line 186 of file fileio.cpp.

186  {
187  fputs(str.c_str(), stream_);
188 }

The documentation for this class was generated from the following files: