tesseract  4.0.0-1-g2a2b
_TessMemberResultCallback_0_1< del, R, T, A1 > Class Template Reference

#include <tesscallback.h>

Inheritance diagram for _TessMemberResultCallback_0_1< del, R, T, A1 >:
TessResultCallback1< R, A1 >

Public Types

typedef TessResultCallback1< R, A1 > base
 
typedef R(T::* MemberSignature) (A1)
 

Public Member Functions

 _TessMemberResultCallback_0_1 (T *object, MemberSignature member)
 
virtual R Run (A1 a1)
 
- Public Member Functions inherited from TessResultCallback1< R, A1 >
virtual ~TessResultCallback1 ()
 

Detailed Description

template<bool del, class R, class T, class A1>
class _TessMemberResultCallback_0_1< del, R, T, A1 >

Definition at line 1804 of file tesscallback.h.

Member Typedef Documentation

◆ base

template<bool del, class R, class T, class A1>
typedef TessResultCallback1<R,A1> _TessMemberResultCallback_0_1< del, R, T, A1 >::base

Definition at line 1806 of file tesscallback.h.

◆ MemberSignature

template<bool del, class R, class T, class A1>
typedef R(T::* _TessMemberResultCallback_0_1< del, R, T, A1 >::MemberSignature) (A1)

Definition at line 1807 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _TessMemberResultCallback_0_1()

template<bool del, class R, class T, class A1>
_TessMemberResultCallback_0_1< del, R, T, A1 >::_TessMemberResultCallback_0_1 ( T *  object,
MemberSignature  member 
)
inline

Definition at line 1814 of file tesscallback.h.

1816  : object_(object),
1817  member_(member) {
1818  }

Member Function Documentation

◆ Run()

template<bool del, class R, class T, class A1>
virtual R _TessMemberResultCallback_0_1< del, R, T, A1 >::Run ( A1  a1)
inlinevirtual

Implements TessResultCallback1< R, A1 >.

Definition at line 1820 of file tesscallback.h.

1820  {
1821  if (!del) {
1822  R result = (object_->*member_)(a1);
1823  return result;
1824  } else {
1825  R result = (object_->*member_)(a1);
1826  // zero out the pointer to ensure segfault if used again
1827  member_ = nullptr;
1828  delete this;
1829  return result;
1830  }
1831  }

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