tesseract  4.0.0-1-g2a2b
_TessFunctionResultCallback_3_0< del, R, P1, P2, P3 > Class Template Reference

#include <tesscallback.h>

Inheritance diagram for _TessFunctionResultCallback_3_0< del, R, P1, P2, P3 >:
TessResultCallback< R >

Public Types

typedef TessResultCallback< R > base
 
typedef R(* FunctionSignature) (P1, P2, P3)
 

Public Member Functions

 _TessFunctionResultCallback_3_0 (FunctionSignature function, P1 p1, P2 p2, P3 p3)
 
virtual R Run ()
 
- Public Member Functions inherited from TessResultCallback< R >
virtual ~TessResultCallback ()
 

Detailed Description

template<bool del, class R, class P1, class P2, class P3>
class _TessFunctionResultCallback_3_0< del, R, P1, P2, P3 >

Definition at line 882 of file tesscallback.h.

Member Typedef Documentation

◆ base

template<bool del, class R, class P1, class P2, class P3>
typedef TessResultCallback<R> _TessFunctionResultCallback_3_0< del, R, P1, P2, P3 >::base

Definition at line 884 of file tesscallback.h.

◆ FunctionSignature

template<bool del, class R, class P1, class P2, class P3>
typedef R(* _TessFunctionResultCallback_3_0< del, R, P1, P2, P3 >::FunctionSignature) (P1, P2, P3)

Definition at line 885 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _TessFunctionResultCallback_3_0()

template<bool del, class R, class P1, class P2, class P3>
_TessFunctionResultCallback_3_0< del, R, P1, P2, P3 >::_TessFunctionResultCallback_3_0 ( FunctionSignature  function,
P1  p1,
P2  p2,
P3  p3 
)
inline

Definition at line 894 of file tesscallback.h.

895  : function_(function), p1_(p1), p2_(p2), p3_(p3) { }

Member Function Documentation

◆ Run()

template<bool del, class R, class P1, class P2, class P3>
virtual R _TessFunctionResultCallback_3_0< del, R, P1, P2, P3 >::Run ( )
inlinevirtual

Implements TessResultCallback< R >.

Definition at line 897 of file tesscallback.h.

897  {
898  if (!del) {
899  R result = (*function_)(p1_,p2_,p3_);
900  return result;
901  } else {
902  R result = (*function_)(p1_,p2_,p3_);
903  // zero out the pointer to ensure segfault if used again
904  function_ = nullptr;
905  delete this;
906  return result;
907  }
908  }

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