Home · All Classes · alphabetical Classes List · Modules · Functions ·

QxtPairList< T, K > Class Template Reference
[Kit]

Searchable List of Pairs. More...

Public Member Functions

Data Fields


Detailed Description

template<typename T, typename K>
class QxtPairList< T, K >

Searchable List of Pairs.

Pair list provides a list with two values, a bit like QHash, but with posibility to operate on both values.

in contrast to QHash, every entry has a unique id, you can work with. like a QList.

QxtPairList<int,int> list;

list.append(1,2);
list.append(1,5);
list.append(5,6);

qDebug()<< list.find(1);    //  "0,1" 
qDebug()<< list.find(SKIP,5);    //  "2"
qDebug()<< list.find(5);    //  "2"
you may allso play around with the list itself

list.list.append(qMakePair(1,2));


Member Function Documentation

template<typename T, typename K>
QList<int> QxtPairList< T, K >::find ( qxNull(T, v1)  , qxNull(K, v2)  ) [inline]

search entrys by match

both arguments are optional, due to the use of QxtNullable

                find(SKIP,v2);
                find(v1,SKIP);
                find(v1);
are all valid



Field Documentation

template<typename T, typename K>
QList<QPair<T,K> > QxtPairList< T, K >::list

operate on the list directly

you may use the internal list directly, but be carefull dont expect to work the QxPairList to work normal if you mess around with it.



(c) 2007A.Picciani and A.Higerd LGPL
libqxt 0.2