kdecore Library API Documentation

KSortableItem< T, Key > Class Template Reference

KSortableItem is a QPair that provides several operators for sorting. More...

#include <ksortablevaluelist.h>

Inheritance diagram for KSortableItem< T, Key >:

QPair< Key, T > List of all members.

Public Member Functions

 KSortableItem (Key i, const T &t)
 Creates a new KSortableItem with the given values.

 KSortableItem (const KSortableItem< T, Key > &rhs)
 Creates a new KSortableItem that copies another one.

 KSortableItem ()
 Creates a new KSortableItem with uninitialized values.

KSortableItem< T, Key > & operator= (const KSortableItem< T, Key > &i)
 Assignment operator, just copies the item.

bool operator> (const KSortableItem< T, Key > &i2) const
 Compares the two items.

bool operator< (const KSortableItem< T, Key > &i2) const
 Compares the two items.

bool operator>= (const KSortableItem< T, Key > &i2) const
 Compares the two items.

bool operator<= (const KSortableItem< T, Key > &i2) const
 Compares the two items.

bool operator== (const KSortableItem< T, Key > &i2) const
 Compares the two items.

bool operator!= (const KSortableItem< T, Key > &i2) const
 Compares the two items.

T & value ()
 Returns the second value.

const T & value () const
 Returns the second value.

Key index () const
 Returns the first value.


Detailed Description

template<class T, class Key = int>
class KSortableItem< T, Key >

KSortableItem is a QPair that provides several operators for sorting.

See also:
KSortableValueList

Definition at line 31 of file ksortablevaluelist.h.


Constructor & Destructor Documentation

template<class T, class Key = int>
KSortableItem< T, Key >::KSortableItem Key  i,
const T &  t
[inline]
 

Creates a new KSortableItem with the given values.

Parameters:
i the first value
t the second value

Definition at line 39 of file ksortablevaluelist.h.

template<class T, class Key = int>
KSortableItem< T, Key >::KSortableItem const KSortableItem< T, Key > &  rhs  )  [inline]
 

Creates a new KSortableItem that copies another one.

Parameters:
rhs the other item to copy

Definition at line 44 of file ksortablevaluelist.h.

template<class T, class Key = int>
KSortableItem< T, Key >::KSortableItem  )  [inline]
 

Creates a new KSortableItem with uninitialized values.

Definition at line 50 of file ksortablevaluelist.h.


Member Function Documentation

template<class T, class Key = int>
KSortableItem<T, Key>& KSortableItem< T, Key >::operator= const KSortableItem< T, Key > &  i  )  [inline]
 

Assignment operator, just copies the item.

Definition at line 55 of file ksortablevaluelist.h.

template<class T, class Key = int>
bool KSortableItem< T, Key >::operator> const KSortableItem< T, Key > &  i2  )  const [inline]
 

Compares the two items.

This implementation only compares the first value.

Definition at line 66 of file ksortablevaluelist.h.

template<class T, class Key = int>
bool KSortableItem< T, Key >::operator< const KSortableItem< T, Key > &  i2  )  const [inline]
 

Compares the two items.

This implementation only compares the first value.

Definition at line 73 of file ksortablevaluelist.h.

template<class T, class Key = int>
bool KSortableItem< T, Key >::operator>= const KSortableItem< T, Key > &  i2  )  const [inline]
 

Compares the two items.

This implementation only compares the first value.

Definition at line 80 of file ksortablevaluelist.h.

template<class T, class Key = int>
bool KSortableItem< T, Key >::operator<= const KSortableItem< T, Key > &  i2  )  const [inline]
 

Compares the two items.

This implementation only compares the first value.

Definition at line 87 of file ksortablevaluelist.h.

template<class T, class Key = int>
bool KSortableItem< T, Key >::operator== const KSortableItem< T, Key > &  i2  )  const [inline]
 

Compares the two items.

This implementation only compares the first value.

Definition at line 94 of file ksortablevaluelist.h.

template<class T, class Key = int>
bool KSortableItem< T, Key >::operator!= const KSortableItem< T, Key > &  i2  )  const [inline]
 

Compares the two items.

This implementation only compares the first value.

Definition at line 101 of file ksortablevaluelist.h.

template<class T, class Key = int>
T& KSortableItem< T, Key >::value  )  [inline]
 

Returns the second value.

Returns:
the second value

Definition at line 109 of file ksortablevaluelist.h.

template<class T, class Key = int>
const T& KSortableItem< T, Key >::value  )  const [inline]
 

Returns the second value.

Definition at line 114 of file ksortablevaluelist.h.

template<class T, class Key = int>
Key KSortableItem< T, Key >::index  )  const [inline]
 

Returns the first value.

Parameters:
the first value

Definition at line 120 of file ksortablevaluelist.h.


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:14:51 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001