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

#include <tesscallback.h>

Inheritance diagram for _TessMemberResultCallback_0_2< del, R, T, A1, A2 >:
TessResultCallback2< R, A1, A2 >

Public Types

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

Public Member Functions

 _TessMemberResultCallback_0_2 (T *object, MemberSignature member)
 
virtual R Run (A1 a1, A2 a2)
 
- Public Member Functions inherited from TessResultCallback2< R, A1, A2 >
virtual ~TessResultCallback2 ()
 

Detailed Description

template<bool del, class R, class T, class A1, class A2>
class _TessMemberResultCallback_0_2< del, R, T, A1, A2 >

Definition at line 3409 of file tesscallback.h.

Member Typedef Documentation

◆ base

template<bool del, class R, class T, class A1, class A2>
typedef TessResultCallback2<R,A1,A2> _TessMemberResultCallback_0_2< del, R, T, A1, A2 >::base

Definition at line 3411 of file tesscallback.h.

◆ MemberSignature

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

Definition at line 3412 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _TessMemberResultCallback_0_2()

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

Definition at line 3419 of file tesscallback.h.

3421  : object_(object),
3422  member_(member) {
3423  }

Member Function Documentation

◆ Run()

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

Implements TessResultCallback2< R, A1, A2 >.

Definition at line 3425 of file tesscallback.h.

3425  {
3426  if (!del) {
3427  R result = (object_->*member_)(a1,a2);
3428  return result;
3429  } else {
3430  R result = (object_->*member_)(a1,a2);
3431  // zero out the pointer to ensure segfault if used again
3432  member_ = nullptr;
3433  delete this;
3434  return result;
3435  }
3436  }

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