tesseract  4.00.00dev
_TessFunctionResultCallback_1_0< del, R, P1 > Class Template Reference

#include <tesscallback.h>

Inheritance diagram for _TessFunctionResultCallback_1_0< del, R, P1 >:
TessResultCallback< R >

Public Types

typedef TessResultCallback< R > base
 
typedef R(* FunctionSignature) (P1)
 

Public Member Functions

 _TessFunctionResultCallback_1_0 (FunctionSignature function, P1 p1)
 
virtual R Run ()
 
- Public Member Functions inherited from TessResultCallback< R >
virtual ~TessResultCallback ()
 

Detailed Description

template<bool del, class R, class P1>
class _TessFunctionResultCallback_1_0< del, R, P1 >

Definition at line 436 of file tesscallback.h.

Member Typedef Documentation

◆ base

template<bool del, class R, class P1>
typedef TessResultCallback<R> _TessFunctionResultCallback_1_0< del, R, P1 >::base

Definition at line 438 of file tesscallback.h.

◆ FunctionSignature

template<bool del, class R, class P1>
typedef R(* _TessFunctionResultCallback_1_0< del, R, P1 >::FunctionSignature) (P1)

Definition at line 439 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _TessFunctionResultCallback_1_0()

template<bool del, class R, class P1>
_TessFunctionResultCallback_1_0< del, R, P1 >::_TessFunctionResultCallback_1_0 ( FunctionSignature  function,
P1  p1 
)
inline

Definition at line 446 of file tesscallback.h.

447  : function_(function), p1_(p1) { }

Member Function Documentation

◆ Run()

template<bool del, class R, class P1>
virtual R _TessFunctionResultCallback_1_0< del, R, P1 >::Run ( )
inlinevirtual

Implements TessResultCallback< R >.

Definition at line 449 of file tesscallback.h.

449  {
450  if (!del) {
451  R result = (*function_)(p1_);
452  return result;
453  } else {
454  R result = (*function_)(p1_);
455  // zero out the pointer to ensure segfault if used again
456  function_ = NULL;
457  delete this;
458  return result;
459  }
460  }

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