tesseract  4.00.00dev
tesseract::NetworkScratch::FloatVec Class Reference

#include <networkscratch.h>

Public Member Functions

 FloatVec (int size, NetworkScratch *scratch)
 
 FloatVec ()
 
 ~FloatVec ()
 
void Init (int size, NetworkScratch *scratch)
 
 operator double * () const
 
double * get ()
 

Detailed Description

Definition at line 136 of file networkscratch.h.

Constructor & Destructor Documentation

◆ FloatVec() [1/2]

tesseract::NetworkScratch::FloatVec::FloatVec ( int  size,
NetworkScratch scratch 
)
inline

Definition at line 139 of file networkscratch.h.

140  : vec_(NULL), scratch_space_(scratch) {
141  Init(size, scratch);
142  }
voidpf void uLong size
Definition: ioapi.h:39
void Init(int size, NetworkScratch *scratch)

◆ FloatVec() [2/2]

tesseract::NetworkScratch::FloatVec::FloatVec ( )
inline

Definition at line 144 of file networkscratch.h.

144 : vec_(NULL), data_(NULL), scratch_space_(NULL) {}

◆ ~FloatVec()

tesseract::NetworkScratch::FloatVec::~FloatVec ( )
inline

Definition at line 145 of file networkscratch.h.

145  {
146  if (scratch_space_ != NULL) scratch_space_->vec_stack_.Return(vec_);
147  }

Member Function Documentation

◆ get()

double* tesseract::NetworkScratch::FloatVec::get ( )
inline

Definition at line 161 of file networkscratch.h.

161 { return data_; }

◆ Init()

void tesseract::NetworkScratch::FloatVec::Init ( int  size,
NetworkScratch scratch 
)
inline

Definition at line 149 of file networkscratch.h.

149  {
150  if (scratch_space_ != NULL && vec_ != NULL)
151  scratch_space_->vec_stack_.Return(vec_);
152  scratch_space_ = scratch;
153  vec_ = scratch_space_->vec_stack_.Borrow();
154  vec_->resize_no_init(size);
155  data_ = &(*vec_)[0];
156  }
voidpf void uLong size
Definition: ioapi.h:39
void resize_no_init(int size)
Definition: genericvector.h:66

◆ operator double *()

tesseract::NetworkScratch::FloatVec::operator double * ( ) const
inline

Definition at line 160 of file networkscratch.h.

160 { return data_; }

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