tesseract  4.0.0-1-g2a2b
_TessFunctionResultCallback_0_0< del, void > Class Template Reference

#include <tesscallback.h>

Inheritance diagram for _TessFunctionResultCallback_0_0< del, void >:
TessClosure

Public Types

typedef TessClosure base
 
typedef void(* FunctionSignature) ()
 

Public Member Functions

 _TessFunctionResultCallback_0_0 (FunctionSignature function)
 
virtual void Run ()
 
- Public Member Functions inherited from TessClosure
virtual ~TessClosure ()
 

Detailed Description

template<bool del>
class _TessFunctionResultCallback_0_0< del, void >

Definition at line 234 of file tesscallback.h.

Member Typedef Documentation

◆ base

template<bool del>
typedef TessClosure _TessFunctionResultCallback_0_0< del, void >::base

Definition at line 237 of file tesscallback.h.

◆ FunctionSignature

template<bool del>
typedef void(* _TessFunctionResultCallback_0_0< del, void >::FunctionSignature) ()

Definition at line 238 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _TessFunctionResultCallback_0_0()

template<bool del>
_TessFunctionResultCallback_0_0< del, void >::_TessFunctionResultCallback_0_0 ( FunctionSignature  function)
inline

Definition at line 244 of file tesscallback.h.

246  : function_(function) {
247  }

Member Function Documentation

◆ Run()

template<bool del>
virtual void _TessFunctionResultCallback_0_0< del, void >::Run ( )
inlinevirtual

Implements TessClosure.

Definition at line 249 of file tesscallback.h.

249  {
250  if (!del) {
251  (*function_)();
252  } else {
253  (*function_)();
254  // zero out the pointer to ensure segfault if used again
255  function_ = nullptr;
256  delete this;
257  }
258  }

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