24#ifndef TESSERACT_CCUTIL_KDPAIR_H_
25#define TESSERACT_CCUTIL_KDPAIR_H_
33template <
typename Key,
typename Data>
50template <
typename Key,
typename Data>
56 return this->
key < other.
key;
61 return reinterpret_cast<KDPairInc*
>(data_ptr);
66template <
typename Key,
typename Data>
73 return this->
key > other.
key;
78 return reinterpret_cast<KDPairDec*
>(data_ptr);
87template <
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_;
144template <
typename Key,
typename Data>
156 return this->
key() < other.
key();
161template <
typename Key,
typename Data>
174 return this->
key() > other.
key();
int operator==(const KDPair< Key, Data > &other) const
int operator<(const KDPairInc< Key, Data > &other) const
static KDPairInc * RecastDataPointer(Data *data_ptr)
static KDPairDec * RecastDataPointer(Data *data_ptr)
int operator<(const KDPairDec< Key, Data > &other) const
void set_data(Data *new_data)
const Data * data() const
KDPtrPair(KDPtrPair &src)
void set_key(const Key &new_key)
int operator==(const KDPtrPair< Key, Data > &other) const
void operator=(KDPtrPair &src)
KDPtrPair(Key k, Data *d)
int operator<(const KDPtrPairInc< Key, Data > &other) const
void operator=(KDPtrPairInc &src)
KDPtrPairInc(KDPtrPairInc &src)
KDPtrPairInc(Key k, Data *d)
int operator<(const KDPtrPairDec< Key, Data > &other) const
KDPtrPairDec(KDPtrPairDec &src)
void operator=(KDPtrPairDec &src)
KDPtrPairDec(Key k, Data *d)