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

#include <tesscallback.h>

Inheritance diagram for _TessFunctionResultCallback_5_0< del, R, P1, P2, P3, P4, P5 >:
TessResultCallback< R >

Public Types

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

Public Member Functions

 _TessFunctionResultCallback_5_0 (FunctionSignature function, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
 
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 P4, class P5>
class _TessFunctionResultCallback_5_0< del, R, P1, P2, P3, P4, P5 >

Definition at line 1348 of file tesscallback.h.

Member Typedef Documentation

◆ base

template<bool del, class R, class P1, class P2, class P3, class P4, class P5>
typedef TessResultCallback<R> _TessFunctionResultCallback_5_0< del, R, P1, P2, P3, P4, P5 >::base

Definition at line 1350 of file tesscallback.h.

◆ FunctionSignature

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

Definition at line 1351 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _TessFunctionResultCallback_5_0()

template<bool del, class R, class P1, class P2, class P3, class P4, class P5>
_TessFunctionResultCallback_5_0< del, R, P1, P2, P3, P4, P5 >::_TessFunctionResultCallback_5_0 ( FunctionSignature  function,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5 
)
inline

Definition at line 1362 of file tesscallback.h.

1363  : function_(function), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5) { }

Member Function Documentation

◆ Run()

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

Implements TessResultCallback< R >.

Definition at line 1365 of file tesscallback.h.

1365  {
1366  if (!del) {
1367  R result = (*function_)(p1_,p2_,p3_,p4_,p5_);
1368  return result;
1369  } else {
1370  R result = (*function_)(p1_,p2_,p3_,p4_,p5_);
1371  // zero out the pointer to ensure segfault if used again
1372  function_ = nullptr;
1373  delete this;
1374  return result;
1375  }
1376  }

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