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

#include <tesscallback.h>

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

Public Types

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

Public Member Functions

 _ConstTessMemberResultCallback_0_1 (const 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 _ConstTessMemberResultCallback_0_1< del, R, T, A1 >

Definition at line 1723 of file tesscallback.h.

Member Typedef Documentation

◆ base

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

Definition at line 1725 of file tesscallback.h.

◆ MemberSignature

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

Definition at line 1726 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _ConstTessMemberResultCallback_0_1()

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

Definition at line 1733 of file tesscallback.h.

1735  : object_(object),
1736  member_(member) {
1737  }

Member Function Documentation

◆ Run()

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

Implements TessResultCallback1< R, A1 >.

Definition at line 1739 of file tesscallback.h.

1739  {
1740  if (!del) {
1741  R result = (object_->*member_)(a1);
1742  return result;
1743  } else {
1744  R result = (object_->*member_)(a1);
1745  // zero out the pointer to ensure segfault if used again
1746  member_ = nullptr;
1747  delete this;
1748  return result;
1749  }
1750  }

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