#include <qlist.h>
Public Member Functions | |
QList () | |
QList (const QList< type > &l) | |
~QList () | |
QList< type > & | operator= (const QList< type > &l) |
bool | operator== (const QList< type > &list) const |
uint | count () const |
bool | isEmpty () const |
bool | insert (uint i, const type *d) |
void | inSort (const type *d) |
void | prepend (const type *d) |
void | append (const type *d) |
bool | remove (uint i) |
bool | remove (const type *d) |
bool | removeRef (const type *d) |
bool | removeFirst () |
bool | removeLast () |
type * | take (uint i) |
void | clear () |
void | sort () |
int | find (const type *d) const |
int | findRef (const type *d) const |
uint | contains (const type *d) const |
uint | containsRef (const type *d) const |
type * | at (uint i) const |
type * | getFirst () const |
type * | getLast () const |
void | setAutoDelete (bool enable) |
Additional Inherited Members | |
Private Types inherited from QCollection | |
typedef void * | Item |
Private Attributes inherited from QCollection | |
bool | del_item |
Definition at line 94 of file qlist.h.
Removes all objects from the collection. The objects will be deleted if auto-delete has been enabled.
Reimplemented from QGList.
Definition at line 82 of file qlist.h.
|
inlineprivatevirtual |
This virtual function compares two list items.
Returns:
This function returns int rather than bool so that reimplementations can return three values and use it to sort by:
The QList::inSort() function requires that compareItems() is implemented as described here.
This function should not modify the list because some const functions call compareItems().
The default implementation compares the pointers:
Reimplemented from QGList.
Reimplemented in QSortedList< type >.
Definition at line 115 of file qlist.h.
|
inlineprivatevirtual |
Reimplemented in BaseClassList, NavIndexEntryList, SIntList< T >, SIntList< MemberGroup >, SIntList< uint >, SIntList< SearchIndexList >, DefinitionList, OutputNameList, FileList, GroupList, NamespaceList, DotNodeList, MemberIndexList, DefineNameList, SList< T >, SList< MemberName >, SList< MemberNameInfo >, SList< PageDef >, SList< QCString >, SList< Definition >, SList< MemberDef >, SList< DirRelation >, SList< DotFilePatcher >, SList< NamespaceDef >, SList< void >, SList< GroupDef >, SList< IndexField >, SList< DocSets::NodeDef >, SList< GenericsCollection >, SList< FilePair >, SList< ClassDef >, SList< RefItem >, SList< SearchDocEntry >, SList< SearchDefinitionList >, SList< SectionInfo >, SList< UseEntry >, SList< MemberList >, SList< DirDef >, SList< Example >, MemberList, MemberNameInfo, DefineName, DefineList, FileNameList, DirList, ClassList, FileName, and MemberName.
Definition at line 103 of file qlist.h.
|
inlineprivatevirtual |
Virtual function that deletes an item that is about to be removed from the collection.
The default implementation deletes d pointer if and only if auto-delete has been enabled.
This function is always reimplemented in the collection template classes.
Reimplemented from QCollection.
Definition at line 113 of file qlist.h.
|
inlineprivatevirtual |
Definition at line 88 of file qlist.h.
Definition at line 89 of file qlist.h.
Definition at line 95 of file qlist.h.
Definition at line 96 of file qlist.h.
Virtual function that creates a copy of an object that is about to be inserted into the collection.
The default implementation returns the d pointer, i.e. no copy is made.
This function is seldom reimplemented in the collection template classes. It is not common practice to make a copy of something that is being inserted.
Reimplemented from QCollection.
Definition at line 111 of file qlist.h.
Definition at line 60 of file qlist.h.
Definition at line 81 of file qlist.h.