tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
24 #ifndef TESSERACT_CCUTIL_KDPAIR_H_
25 #define TESSERACT_CCUTIL_KDPAIR_H_
33 template <
typename Key,
typename Data>
50 template <
typename Key,
typename Data>
56 return this->
key < other.
key;
61 return reinterpret_cast<KDPairInc*>(data_ptr);
66 template <
typename Key,
typename Data>
73 return this->
key > other.
key;
78 return reinterpret_cast<KDPairDec*>(data_ptr);
87 template <
typename Key,
typename Data>
100 this->data_ =
nullptr;
106 this->data_ = src.data_;
108 this->key_ = src.key_;
112 return key_ == other.key_;
132 Data* result = data_;
144 template <
typename Key,
typename Data>
156 return this->
key() < other.
key();
161 template <
typename Key,
typename Data>
174 return this->
key() > other.
key();
189 #endif // TESSERACT_CCUTIL_KDPAIR_H_
KDPtrPair(Key k, Data *d)
KDPtrPair(KDPtrPair &src)
void set_data(Data *new_data)
KDPtrPairInc(Key k, Data *d)
int operator<(const KDPairInc< Key, Data > &other) const
int operator<(const KDPtrPairDec< Key, Data > &other) const
void operator=(KDPtrPairDec &src)
void operator=(KDPtrPairInc &src)
int operator<(const KDPtrPairInc< Key, Data > &other) const
int operator==(const KDPair< Key, Data > &other) const
int operator==(const KDPtrPair< Key, Data > &other) const
static KDPairDec * RecastDataPointer(Data *data_ptr)
void operator=(KDPtrPair &src)
const Data * data() const
int operator<(const KDPairDec< Key, Data > &other) const
void set_key(const Key &new_key)
KDPtrPairDec(Key k, Data *d)
KDPtrPairDec(KDPtrPairDec &src)
static KDPairInc * RecastDataPointer(Data *data_ptr)
KDPtrPairInc(KDPtrPairInc &src)