tesseract  5.0.0
tesseract::KDPair< Key, Data > Struct Template Reference

#include <kdpair.h>

Inheritance diagram for tesseract::KDPair< Key, Data >:
tesseract::KDPairDec< Key, Data > tesseract::KDPairInc< Key, Data >

Public Member Functions

 KDPair ()=default
 
 KDPair (Key k, Data d)
 
int operator== (const KDPair< Key, Data > &other) const
 
Data & data ()
 
const Data & data () const
 
Key & key ()
 
const Key & key () const
 

Public Attributes

Data data_
 
Key key_
 

Detailed Description

template<typename Key, typename Data>
struct tesseract::KDPair< Key, Data >

Definition at line 33 of file kdpair.h.

Constructor & Destructor Documentation

◆ KDPair() [1/2]

template<typename Key , typename Data >
tesseract::KDPair< Key, Data >::KDPair ( )
default

◆ KDPair() [2/2]

template<typename Key , typename Data >
tesseract::KDPair< Key, Data >::KDPair ( Key  k,
Data  d 
)
inline

Definition at line 35 of file kdpair.h.

35 : data_(d), key_(k) {}

Member Function Documentation

◆ data() [1/2]

template<typename Key , typename Data >
Data& tesseract::KDPair< Key, Data >::data ( )
inline

Definition at line 41 of file kdpair.h.

41  {
42  return data_;
43  }

◆ data() [2/2]

template<typename Key , typename Data >
const Data& tesseract::KDPair< Key, Data >::data ( ) const
inline

Definition at line 44 of file kdpair.h.

44  {
45  return data_;
46  }

◆ key() [1/2]

template<typename Key , typename Data >
Key& tesseract::KDPair< Key, Data >::key ( )
inline

Definition at line 47 of file kdpair.h.

47  {
48  return key_;
49  }

◆ key() [2/2]

template<typename Key , typename Data >
const Key& tesseract::KDPair< Key, Data >::key ( ) const
inline

Definition at line 50 of file kdpair.h.

50  {
51  return key_;
52  }

◆ operator==()

template<typename Key , typename Data >
int tesseract::KDPair< Key, Data >::operator== ( const KDPair< Key, Data > &  other) const
inline

Definition at line 37 of file kdpair.h.

37  {
38  return key_ == other.key_;
39  }

Member Data Documentation

◆ data_

template<typename Key , typename Data >
Data tesseract::KDPair< Key, Data >::data_

Definition at line 57 of file kdpair.h.

◆ key_

template<typename Key , typename Data >
Key tesseract::KDPair< Key, Data >::key_

Definition at line 58 of file kdpair.h.


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