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

#include <tesscallback.h>

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

Public Types

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

Public Member Functions

 _TessMemberResultCallback_0_0 (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 _TessMemberResultCallback_0_0< del, R, T >

Definition at line 124 of file tesscallback.h.

Member Typedef Documentation

◆ base

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

Definition at line 126 of file tesscallback.h.

◆ MemberSignature

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

Definition at line 127 of file tesscallback.h.

Constructor & Destructor Documentation

◆ _TessMemberResultCallback_0_0()

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

Definition at line 134 of file tesscallback.h.

136  : object_(object),
137  member_(member) {
138  }

Member Function Documentation

◆ Run()

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

Implements TessResultCallback< R >.

Definition at line 140 of file tesscallback.h.

140  {
141  if (!del) {
142  R result = (object_->*member_)();
143  return result;
144  } else {
145  R result = (object_->*member_)();
146  // zero out the pointer to ensure segfault if used again
147  member_ = nullptr;
148  delete this;
149  return result;
150  }
151  }

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