Qt 4.8
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 >
QDataStreamoperator<< (QDataStream &s, const QPair< T1, T2 > &p)
 
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 >
QDataStreamoperator>> (QDataStream &s, QPair< T1, T2 > &p)
 
template<class T1 , class T2 >
Q_OUTOFLINE_TEMPLATE QPair< T1, T2 > qMakePair (const T1 &x, const T2 &y)
 

Function Documentation

◆ operator!=()

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

Definition at line 74 of file qpair.h.

75 { return !(p1 == p2); }

◆ operator<()

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

Definition at line 78 of file qpair.h.

79 {
80  return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second);
81 }
T1 first
Definition: qpair.h:65
T2 second
Definition: qpair.h:66

◆ operator<<()

template<class T1 , class T2 >
QDataStream& operator<< ( QDataStream s,
const QPair< T1, T2 > &  p 
)
inline

Definition at line 116 of file qpair.h.

117 {
118  s << p.first << p.second;
119  return s;
120 }
T1 first
Definition: qpair.h:65
T2 second
Definition: qpair.h:66

◆ operator<=()

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

Definition at line 90 of file qpair.h.

91 {
92  return !(p2 < p1);
93 }

◆ operator==()

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

Definition at line 70 of file qpair.h.

71 { return p1.first == p2.first && p1.second == p2.second; }
T1 first
Definition: qpair.h:65
T2 second
Definition: qpair.h:66

◆ operator>()

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

Definition at line 84 of file qpair.h.

85 {
86  return p2 < p1;
87 }

◆ operator>=()

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

Definition at line 96 of file qpair.h.

97 {
98  return !(p1 < p2);
99 }

◆ operator>>()

template<class T1 , class T2 >
QDataStream& operator>> ( QDataStream s,
QPair< T1, T2 > &  p 
)
inline

Definition at line 109 of file qpair.h.

110 {
111  s >> p.first >> p.second;
112  return s;
113 }
T1 first
Definition: qpair.h:65
T2 second
Definition: qpair.h:66

◆ qMakePair()

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

Definition at line 102 of file qpair.h.

Referenced by QDeclarativeFastProperties::accessorIndexForProperty(), QDeclarativeFastProperties::add(), QScriptBreakpointsModel::addBreakpoint(), QScriptDebuggerScriptsModel::addExtraScriptInfo(), QDeclarativeXmlQueryEngine::addIndexToRangeList(), QDeclarativeParser::Object::addScriptStringProperty(), QUrlModel::addUrls(), QHttpHeader::addValue(), QDeclarativeTimeLinePrivate::advance(), QDeclarativeParticles::burst(), QDeclarativeEnginePrivate::cache(), QGraphicsAnchorLayoutPrivate::calculateVertexPositions(), QDeclarativePropertyChangesParser::compileList(), Graph< AnchorVertex, AnchorData >::connections(), QScriptDebuggerAgent::contextsCheckpoint(), QDeclarativeEnginePrivate::createCache(), createSlack(), QDeclarativeXmlListModel::dataCleared(), QDeclarativePropertyChangesPrivate::decode(), QPatternist::XsdStateMachine< XsdSchemaToken::NodeName >::dfaStateForNfaState(), QDeclarativeXmlQueryEngine::doSubQueryJob(), QAbstractItemViewPrivate::draggablePaintPairs(), QListViewPrivate::draggablePaintPairs(), QUrl::encodedQueryItems(), QThreadPoolPrivate::enqueueTask(), QPatternist::IdFN::evaluateSequence(), QGridLayoutEngine::fillRowData(), QGraphicsAnchorLayoutPrivate::findPaths(), getFactor(), QStateMachinePrivate::initializeAnimation(), QGraphicsAnchorLayoutPrivate::internalVertex(), QScriptBreakpointsModel::modifyBreakpoint(), QPatternist::PullBridge::next(), QPatternist::OperandsIterator::next(), nextField(), QPatternist::AccelTreeResourceLoader::openUnparsedText(), QPatternist::OperandsIterator::OperandsIterator(), QHttpNetworkReplyPrivate::parseHeader(), QAuthenticatorPrivate::parseHttpResponse(), QHostAddress::parseSubnet(), QDeclarativeDomObjectPrivate::properties(), QPatternist::PullBridge::PullBridge(), qDBusAddTimeout(), QUrl::queryItems(), QHttpNetworkConnectionPrivate::queueRequest(), QXmlSerializerPrivate::QXmlSerializerPrivate(), QVariantAnimationPrivate::recalculateCurrentInterval(), QDeclarativeBindingCompilerPrivate::registerCleanup(), QDeclarativeEnginePrivate::registerFinalizedParserStatusObject(), QDeclarativeVMEMetaObject::registerInterceptor(), QDeclarativeBindingCompilerPrivate::registerString(), QGraphicsAnchorLayoutPrivate::removeAnchor(), QPatternist::AccelTreeResourceLoader::retrieveUnparsedText(), QScriptDebuggerAgent::scriptsDelta(), QItemSelectionModel::selectedColumns(), QItemSelectionModel::selectedRows(), QHttpNetworkHeaderPrivate::setHeaderField(), QRegExpEngine::setupCategoriesRangeMap(), QErrorMessage::showMessage(), QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(), QXmlSerializer::startElement(), QPatternist::AccelTreeBuilder< true >::startElement(), QSortFilterProxyModelPrivate::store_persistent_indexes(), QPatternist::XsdParticleChecker::subsumes(), QVariantAnimationPrivate::valueAt(), and QPatternist::yyparse().

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