tesseract  3.05.02
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 174 of file fileio.cpp.

175  : stream_(stream) {
176 }

◆ OutputBuffer() [2/2]

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

Definition at line 178 of file fileio.cpp.

179  : stream_(stream) {
180 }

◆ ~OutputBuffer()

tesseract::OutputBuffer::~OutputBuffer ( )

Definition at line 182 of file fileio.cpp.

182  {
183  if (stream_ != NULL) {
184  fclose(stream_);
185  }
186 }

Member Function Documentation

◆ CloseFile()

bool tesseract::OutputBuffer::CloseFile ( )

Definition at line 192 of file fileio.cpp.

192  {
193  int ret = fclose(stream_);
194  stream_ = NULL;
195  return ret == 0;
196 }

◆ WriteString()

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

Definition at line 188 of file fileio.cpp.

188  {
189  fputs(str.c_str(), stream_);
190 }

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