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

#include <tesscallback.h>

Inheritance diagram for _ConstTessMemberResultCallback_0_0< del, R, T >:
TessResultCallback< R >

Public Types

typedef TessResultCallback< R > base
 
typedef R(T::* MemberSignature) () const
 

Public Member Functions

 _ConstTessMemberResultCallback_0_0 (const T *object, MemberSignature member)
 
virtual R Run ()
 
- Public Member Functions inherited from TessResultCallback< R >
virtual ~TessResultCallback ()
 

Detailed Description

template<bool del, class R, class T>
class _ConstTessMemberResultCallback_0_0< del, R, T >

Definition at line 43 of file tesscallback.h.

Member Typedef Documentation

◆ base

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

Definition at line 45 of file tesscallback.h.

◆ MemberSignature

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

Definition at line 46 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _ConstTessMemberResultCallback_0_0()

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

Definition at line 53 of file tesscallback.h.

55  : object_(object),
56  member_(member) {
57  }

Member Function Documentation

◆ Run()

template<bool del, class R, class T>
virtual R _ConstTessMemberResultCallback_0_0< del, R, T >::Run ( )
inlinevirtual

Implements TessResultCallback< R >.

Definition at line 59 of file tesscallback.h.

59  {
60  if (!del) {
61  R result = (object_->*member_)();
62  return result;
63  } else {
64  R result = (object_->*member_)();
65  // zero out the pointer to ensure segfault if used again
66  member_ = nullptr;
67  delete this;
68  return result;
69  }
70  }

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