Tesseract  3.02
_TessFunctionResultCallback_0_0< del, R > Class Template Reference

#include <tesscallback.h>

Inheritance diagram for _TessFunctionResultCallback_0_0< del, R >:
TessResultCallback< R >

List of all members.

Public Types

typedef TessResultCallback< R > base
typedef R(* FunctionSignature )()

Public Member Functions

 _TessFunctionResultCallback_0_0 (FunctionSignature function)
virtual R Run ()

Detailed Description

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

Definition at line 205 of file tesscallback.h.


Member Typedef Documentation

template<bool del, class R>
typedef TessResultCallback<R> _TessFunctionResultCallback_0_0< del, R >::base

Definition at line 207 of file tesscallback.h.

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

Definition at line 208 of file tesscallback.h.


Constructor & Destructor Documentation

template<bool del, class R>
_TessFunctionResultCallback_0_0< del, R >::_TessFunctionResultCallback_0_0 ( FunctionSignature  function) [inline]

Definition at line 214 of file tesscallback.h.

    : function_(function) {
  }

Member Function Documentation

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

Implements TessResultCallback< R >.

Definition at line 219 of file tesscallback.h.

                  {
    if (!del) {
      R result = (*function_)();
      return result;
    } else {
      R result = (*function_)();
      //  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: