tesseract  4.0.0-1-g2a2b
tesseract::TessUnlvRenderer Class Reference

#include <renderer.h>

Inheritance diagram for tesseract::TessUnlvRenderer:
tesseract::TessResultRenderer

Public Member Functions

 TessUnlvRenderer (const char *outputbase)
 
- Public Member Functions inherited from tesseract::TessResultRenderer
virtual ~TessResultRenderer ()
 
void insert (TessResultRenderer *next)
 
TessResultRenderernext ()
 
bool BeginDocument (const char *title)
 
bool AddImage (TessBaseAPI *api)
 
bool EndDocument ()
 
const char * file_extension () const
 
const char * title () const
 
bool happy ()
 
int imagenum () const
 

Protected Member Functions

virtual bool AddImageHandler (TessBaseAPI *api)
 
- Protected Member Functions inherited from tesseract::TessResultRenderer
 TessResultRenderer (const char *outputbase, const char *extension)
 
virtual bool BeginDocumentHandler ()
 
virtual bool EndDocumentHandler ()
 
void AppendString (const char *s)
 
void AppendData (const char *s, int len)
 

Detailed Description

Renders tesseract output into a plain UTF-8 text string

Definition at line 226 of file renderer.h.

Constructor & Destructor Documentation

◆ TessUnlvRenderer()

tesseract::TessUnlvRenderer::TessUnlvRenderer ( const char *  outputbase)
explicit

Definition at line 231 of file renderer.cpp.

232  : TessResultRenderer(outputbase, "unlv") {
233 }
TessResultRenderer(const char *outputbase, const char *extension)
Definition: renderer.cpp:33

Member Function Documentation

◆ AddImageHandler()

bool tesseract::TessUnlvRenderer::AddImageHandler ( TessBaseAPI api)
protectedvirtual

Implements tesseract::TessResultRenderer.

Definition at line 235 of file renderer.cpp.

235  {
236  const std::unique_ptr<const char[]> unlv(api->GetUNLVText());
237  if (unlv == nullptr) return false;
238 
239  AppendString(unlv.get());
240 
241  return true;
242 }
void AppendString(const char *s)
Definition: renderer.cpp:102

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