- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

Classes | Functions

# qpair.h File Reference

`#include <QtCore/qdatastream.h>`

Go to the source code of this file.

## Classes
struct | QPair< T1, T2 >
## Functions
template<class T1 , class T2 >
Q_INLINE_TEMPLATE bool | operator== (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2)
template<class T1 , class T2 >
Q_INLINE_TEMPLATE bool | operator!= (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2)
template<class T1 , class T2 >
Q_INLINE_TEMPLATE bool | operator< (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2)
template<class T1 , class T2 >
Q_INLINE_TEMPLATE bool | operator> (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2)
template<class T1 , class T2 >
Q_INLINE_TEMPLATE bool | operator<= (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2)
template<class T1 , class T2 >
Q_INLINE_TEMPLATE bool | operator>= (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2)
template<class T1 , class T2 >
Q_OUTOFLINE_TEMPLATE QPair< T1, T2 > | qMakePair (const T1 &x, const T2 &y)
template<class T1 , class T2 >
QDataStream & | operator>> (QDataStream &s, QPair< T1, T2 > &p)
template<class T1 , class T2 >
QDataStream & | operator<< (QDataStream &s, const QPair< T1, T2 > &p)

## Function Documentation

Q_INLINE_TEMPLATE bool operator== | ( | const QPair< T1, T2 > & | p1,
|  | const QPair< T1, T2 > & | p2
| ) |  |

Definition at line 70 of file qpair.h.

    { return p1.first == p2.first && p1.second == p2.second; }

Q_INLINE_TEMPLATE bool operator!= | ( | const QPair< T1, T2 > & | p1,
|  | const QPair< T1, T2 > & | p2
| ) |  |

Definition at line 74 of file qpair.h.

    { return !(p1 == p2); }

Q_INLINE_TEMPLATE bool operator< | ( | const QPair< T1, T2 > & | p1,
|  | const QPair< T1, T2 > & | p2
| ) |  |

Definition at line 78 of file qpair.h.

    {
        return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second);
    }

Q_INLINE_TEMPLATE bool operator> | ( | const QPair< T1, T2 > & | p1,
|  | const QPair< T1, T2 > & | p2
| ) |  |

Definition at line 84 of file qpair.h.

    {
        return p2 < p1;
    }

Q_INLINE_TEMPLATE bool operator<= | ( | const QPair< T1, T2 > & | p1,
|  | const QPair< T1, T2 > & | p2
| ) |  |

Definition at line 90 of file qpair.h.

    {
        return !(p2 < p1);
    }

Q_INLINE_TEMPLATE bool operator>= | ( | const QPair< T1, T2 > & | p1,
|  | const QPair< T1, T2 > & | p2
| ) |  |

Definition at line 96 of file qpair.h.

    {
        return !(p1 < p2);
    }

Q_OUTOFLINE_TEMPLATE QPair<T1, T2> qMakePair | ( | const T1 & | x,
|  | const T2 & | y
| ) |  |

Search for all occurrences

Definition at line 102 of file qpair.h.

    {
        return QPair<T1, T2>(x, y);
    }

QDataStream& operator>> | ( | QDataStream & | s,
|  | QPair< T1, T2 > & | p
| ) |  | `[inline]`

Definition at line 109 of file qpair.h.

    {
        s >> p.first >> p.second;
        return s;
    }

QDataStream& operator<< | ( | QDataStream & | s,
|  | const QPair< T1, T2 > & | p
| ) |  | `[inline]`

Definition at line 116 of file qpair.h.

    {
        s << p.first << p.second;
        return s;
    }