tesseract  3.03
_TessFunctionResultCallback_2_0< del, R, P1, P2 > Class Template Reference

#include <tesscallback.h>

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

List of all members.

Public Types

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

Public Member Functions

 _TessFunctionResultCallback_2_0 (FunctionSignature function, P1 p1, P2 p2)
virtual R Run ()

Detailed Description

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

Definition at line 656 of file tesscallback.h.


Member Typedef Documentation

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

Definition at line 658 of file tesscallback.h.

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

Definition at line 659 of file tesscallback.h.


Constructor & Destructor Documentation

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

Definition at line 667 of file tesscallback.h.

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

Member Function Documentation

template<bool del, class R, class P1, class P2>
virtual R _TessFunctionResultCallback_2_0< del, R, P1, P2 >::Run ( ) [inline, virtual]

Implements TessResultCallback< R >.

Definition at line 670 of file tesscallback.h.

                  {
    if (!del) {
      R result = (*function_)(p1_,p2_);
      return result;
    } else {
      R result = (*function_)(p1_,p2_);
      //  zero out the pointer to ensure segfault if used again
      function_ = NULL;
      delete this;
      return result;
    }
  }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines