tesseract  4.0.0-1-g2a2b
_TessFunctionResultCallback_2_0< del, void, P1, P2 > Class Template Reference

#include <tesscallback.h>

Inheritance diagram for _TessFunctionResultCallback_2_0< del, void, P1, P2 >:
TessClosure

Public Types

typedef TessClosure base
 
typedef void(* FunctionSignature) (P1, P2)
 

Public Member Functions

 _TessFunctionResultCallback_2_0 (FunctionSignature function, P1 p1, P2 p2)
 
virtual void Run ()
 
- Public Member Functions inherited from TessClosure
virtual ~TessClosure ()
 

Detailed Description

template<bool del, class P1, class P2>
class _TessFunctionResultCallback_2_0< del, void, P1, P2 >

Definition at line 685 of file tesscallback.h.

Member Typedef Documentation

◆ base

template<bool del, class P1 , class P2 >
typedef TessClosure _TessFunctionResultCallback_2_0< del, void, P1, P2 >::base

Definition at line 687 of file tesscallback.h.

◆ FunctionSignature

template<bool del, class P1 , class P2 >
typedef void(* _TessFunctionResultCallback_2_0< del, void, P1, P2 >::FunctionSignature) (P1, P2)

Definition at line 688 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _TessFunctionResultCallback_2_0()

template<bool del, class P1 , class P2 >
_TessFunctionResultCallback_2_0< del, void, P1, P2 >::_TessFunctionResultCallback_2_0 ( FunctionSignature  function,
P1  p1,
P2  p2 
)
inline

Definition at line 696 of file tesscallback.h.

697  :
698  function_(function), p1_(p1), p2_(p2) { }

Member Function Documentation

◆ Run()

template<bool del, class P1 , class P2 >
virtual void _TessFunctionResultCallback_2_0< del, void, P1, P2 >::Run ( )
inlinevirtual

Implements TessClosure.

Definition at line 700 of file tesscallback.h.

700  {
701  if (!del) {
702  (*function_)(p1_,p2_);
703  } else {
704  (*function_)(p1_,p2_);
705  // zero out the pointer to ensure segfault if used again
706  function_ = nullptr;
707  delete this;
708  }
709  }

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