All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tesseract::CubeLineObject Class Reference

#include <cube_line_object.h>

Public Member Functions

 CubeLineObject (CubeRecoContext *cntxt, Pix *pix)
 
 ~CubeLineObject ()
 
int PhraseCount ()
 
CubeObject ** Phrases ()
 

Detailed Description

Definition at line 32 of file cube_line_object.h.

Constructor & Destructor Documentation

tesseract::CubeLineObject::CubeLineObject ( CubeRecoContext cntxt,
Pix *  pix 
)

Definition at line 24 of file cube_line_object.cpp.

24  {
25  line_pix_ = pix;
26  own_pix_ = false;
27  processed_ = false;
28  cntxt_ = cntxt;
29  phrase_cnt_ = 0;
30  phrases_ = NULL;
31 }
#define NULL
Definition: host.h:144
tesseract::CubeLineObject::~CubeLineObject ( )

Definition at line 33 of file cube_line_object.cpp.

33  {
34  if (line_pix_ != NULL && own_pix_ == true) {
35  pixDestroy(&line_pix_);
36  line_pix_ = NULL;
37  }
38 
39  if (phrases_ != NULL) {
40  for (int phrase_idx = 0; phrase_idx < phrase_cnt_; phrase_idx++) {
41  if (phrases_[phrase_idx] != NULL) {
42  delete phrases_[phrase_idx];
43  }
44  }
45 
46  delete []phrases_;
47  phrases_ = NULL;
48  }
49 }
#define NULL
Definition: host.h:144

Member Function Documentation

int tesseract::CubeLineObject::PhraseCount ( )
inline

Definition at line 38 of file cube_line_object.h.

38  {
39  if (!processed_ && !Process()) {
40  return 0;
41  }
42  return phrase_cnt_;
43  }
CubeObject** tesseract::CubeLineObject::Phrases ( )
inline

Definition at line 44 of file cube_line_object.h.

44  {
45  if (!processed_ && !Process()) {
46  return NULL;
47  }
48  return phrases_;
49  }
#define NULL
Definition: host.h:144

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