All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tesseract::DoublePtr Class Reference

#include <doubleptr.h>

Public Member Functions

 DoublePtr ()
 
 DoublePtr (DoublePtr &src)
 
void operator= (DoublePtr &src)
 
void Connect (DoublePtr *other)
 
void Disconnect ()
 
DoublePtrOtherEnd () const
 

Detailed Description

Definition at line 41 of file doubleptr.h.

Constructor & Destructor Documentation

tesseract::DoublePtr::DoublePtr ( )
inline

Definition at line 43 of file doubleptr.h.

43 : other_end_(NULL) {}
#define NULL
Definition: host.h:144
tesseract::DoublePtr::DoublePtr ( DoublePtr src)
inline

Definition at line 47 of file doubleptr.h.

47  {
48  other_end_ = src.other_end_;
49  if (other_end_ != NULL) {
50  other_end_->other_end_ = this;
51  src.other_end_ = NULL;
52  }
53  }
#define NULL
Definition: host.h:144

Member Function Documentation

void tesseract::DoublePtr::Connect ( DoublePtr other)
inline

Definition at line 67 of file doubleptr.h.

67  {
68  other->Disconnect();
69  Disconnect();
70  other->other_end_ = this;
71  other_end_ = other;
72  }
void tesseract::DoublePtr::Disconnect ( )
inline

Definition at line 74 of file doubleptr.h.

74  {
75  if (other_end_ != NULL) {
76  other_end_->other_end_ = NULL;
77  other_end_ = NULL;
78  }
79  }
#define NULL
Definition: host.h:144
void tesseract::DoublePtr::operator= ( DoublePtr src)
inline

Definition at line 57 of file doubleptr.h.

57  {
58  Disconnect();
59  other_end_ = src.other_end_;
60  if (other_end_ != NULL) {
61  other_end_->other_end_ = this;
62  src.other_end_ = NULL;
63  }
64  }
#define NULL
Definition: host.h:144
DoublePtr* tesseract::DoublePtr::OtherEnd ( ) const
inline

Definition at line 81 of file doubleptr.h.

81  {
82  return other_end_;
83  }

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