TQSortedList Class

Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# TQSortedList Class Reference
[obsolete]

The TQSortedList class provides a list sorted by operator< and operator==. More...

`#include <ntqsortedlist.h>`

Inherits TQPtrList<type>.

List of all member functions.

## Public Members

- TQSortedList ()
- TQSortedList ( const TQSortedList<type> & list )
- ~TQSortedList ()
- TQSortedList<type> & operator= ( const TQSortedList<type> & list )

## Detailed Description

The TQSortedList class provides a list sorted by operator< and operator==.

This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

If you want to sort a TQPtrList you have to reimplement the TQGList::compareItems() method. If the elements of your list support operator<() and operator==(), you can use TQSortedList instead. Its compareItems() calls operator<() and operator==() and returns an appropriate result.

Otherwise, this is as TQPtrList.

See also TQPtrList.

## Member Function Documentation

### TQSortedList::TQSortedList ()

Constructs an empty list.

### TQSortedList::TQSortedList ( const TQSortedList<type> & list )

Constructs a copy of list.

Each item in list is copied to this new list.

### TQSortedList::~TQSortedList ()

Removes all items from the list and destroys the list.

All list iterators that access this list will be reset.

### TQSortedList<type> & TQSortedList::operator= ( const TQSortedList<type> & list )

Assigns list to this list and returns a reference to this list.

This list is first cleared; each item in list is then appended to this list. Only the pointers are copied (shallow copy) unless newItem() has been reimplemented().

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.