The QGList class is an internal class for implementing Qt collection classes. More...
#include <qglist.h>
Public Member Functions | |
uint | count () const |
QDataStream & | read (QDataStream &) |
QDataStream & | write (QDataStream &) const |
Public Member Functions inherited from QCollection | |
bool | autoDelete () const |
void | setAutoDelete (bool enable) |
Private Member Functions | |
void | prepend (QCollection::Item) |
void | heapSortPushDown (QCollection::Item *heap, int first, int last) |
QLNode * | locate (uint) |
QLNode * | unlink () |
Private Attributes | |
QLNode * | firstNode |
QLNode * | lastNode |
QLNode * | curNode |
int | curIndex |
uint | numNodes |
QGList * | iterators |
Friends | |
class | QGListIterator |
class | QGVector |
Additional Inherited Members | |
Public Types inherited from QCollection | |
typedef void * | Item |
Protected Attributes inherited from QCollection | |
bool | del_item |
The QGList class is an internal class for implementing Qt collection classes.
QGList is a strictly internal class that acts as a base class for several collection classes; QList, QQueue and QStack.
QGList has some virtual functions that can be reimplemented to customize the subclasses.
Normally, you do not have to reimplement any of these functions. If you still want to reimplement them, see the QStrList class (qstrlist.h), which is a good example.
|
protected |
Definition at line 170 of file qglist.cpp.
|
protected |
Definition at line 183 of file qglist.cpp.
|
protectedvirtual |
Definition at line 202 of file qglist.cpp.
|
protected |
Definition at line 364 of file qglist.cpp.
|
inlineprotected |
Definition at line 172 of file qglist.h.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protectedvirtual |
Removes all objects from the collection. The objects will be deleted if auto-delete has been enabled.
Implements QCollection.
Reimplemented in QList< type >, QList< PyVariableContext::Scope >, QList< PyCallContext::Ctx >, QList< MemberName >, QList< MemberNameInfo >, QList< PageDef >, QList< DocNode >, QList< TagFileInfo >, QList< Grouping >, QList< ListItemInfo >, QList< QCString >, QList< Definition >, QList< MemberDef >, QList< TagPackageInfo >, QList< SectionHandler >, QList< DirRelation >, QList< MemberReference >, QList< DotNode >, QList< HtmlAttrib >, QList< TagPageInfo >, QList< VariableContext::Scope >, QList< IndexIntf >, QList< Entry >, QList< MemberGroup >, QList< DiagramItem >, QList< DotGroupCollaboration::Link >, QList< TagDirInfo >, QList< EntryNav >, QList< IncludeInfo >, QList< QString >, QList< RelatedCompound >, QList< DotFilePatcher >, QList< tcl_scan >, QList< ParameterItemHandler >, QList< VariableListEntryHandler >, QList< TagNamespaceInfo >, QList< NodeHandler >, QList< EntryHandler >, QList< TemplateVariant >, QList< MemberInfo >, QList< TagGroupInfo >, QList< ChildNodeHandler >, QList< DotWorkerThread >, QList< ExprAst >, QList< TemplateNode >, QList< NamespaceDef >, QList< T >, QList< void >, QList< ParamHandler >, QList< OutputGenerator >, QList< QDict< TemplateVariant > >, QList< GroupDef >, QList< IndexField >, QList< ListElem >, QList< DocSets::NodeDef >, QList< CallContext::Ctx >, QList< DotConstString >, QList< RowHandler >, QList< TemplateEngine::Private::IncludeEntry >, QList< DotRunner::CleanupItem >, QList< Formula >, QList< TemplateToken >, QList< GenericsCollection >, QList< DotGroupCollaboration::Edge >, QList< Statistics::stat >, QList< TagIncludeInfo >, QList< ActiveRowSpan >, QList< FilePair >, QList< ClassDef >, QList< Define >, QList< BaseClassDef >, QList< EdgeInfo >, QList< IncludeHandler >, QList< TemplateNodeIf::GuardedNodes >, QList< TagMemberInfo >, QList< TemplateNodeWith::Mapping >, QList< DotRunner >, QList< RefItem >, QList< FileName >, QList< SearchDocEntry >, QList< FlowChart >, QList< SearchDefinitionList >, QList< SectionInfo >, QList< CodeLineHandler >, QList< TemplateNodeIndexEntry::Mapping >, QList< DocPara >, QList< Input * >, QList< EdgeLabelHandler >, QList< LayoutNavEntry >, QList< ConfigOption >, QList< uint >, QList< AlphaIndexTableCell >, QList< UseEntry >, QList< DefineName >, QList< DirEntry >, QList< ParameterHandler >, QList< MemberList >, QList< LayoutDocEntry >, QList< CompoundEntry >, QList< Argument >, QList< TagAnchorInfo >, QList< FileList >, QList< FileDef >, QList< TagClassInfo >, QList< MemberHandler >, QList< DotFilePatcher::Map >, QList< DocImpl >, QList< ArgumentList >, QList< FTVNode >, QList< BaseInfo >, QList< TagEnumValueInfo >, QList< LinkedTextImpl >, QList< SearchIndexList >, QList< DiagramRow >, QList< AlphaIndexTableRows >, QList< NavIndexEntry >, QList< Example >, QList< DirDef >, QInternalList< type >, QInternalList< QGDictIterator >, QInternalList< QWaitConditionEvent >, QInternalList< QCacheItem >, QQueue< type >, QStack< type >, QQueue< DotRunner >, QStack< DocNode >, QStack< PerlModOutputStream >, QStack< LatexDocVisitor::TableState >, QStack< bool >, QStack< DocStyleChange >, and QStack< State >.
Definition at line 652 of file qglist.cpp.
|
protectedvirtual |
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 in QList< type >, QList< PyVariableContext::Scope >, QList< PyCallContext::Ctx >, QList< MemberName >, QList< MemberNameInfo >, QList< PageDef >, QList< DocNode >, QList< TagFileInfo >, QList< Grouping >, QList< ListItemInfo >, QList< QCString >, QList< Definition >, QList< MemberDef >, QList< TagPackageInfo >, QList< SectionHandler >, QList< DirRelation >, QList< MemberReference >, QList< DotNode >, QList< HtmlAttrib >, QList< TagPageInfo >, QList< VariableContext::Scope >, QList< IndexIntf >, QList< Entry >, QList< MemberGroup >, QList< DiagramItem >, QList< DotGroupCollaboration::Link >, QList< TagDirInfo >, QList< EntryNav >, QList< IncludeInfo >, QList< QString >, QList< RelatedCompound >, QList< DotFilePatcher >, QList< tcl_scan >, QList< ParameterItemHandler >, QList< VariableListEntryHandler >, QList< TagNamespaceInfo >, QList< NodeHandler >, QList< EntryHandler >, QList< TemplateVariant >, QList< MemberInfo >, QList< TagGroupInfo >, QList< ChildNodeHandler >, QList< DotWorkerThread >, QList< ExprAst >, QList< TemplateNode >, QList< NamespaceDef >, QList< T >, QList< void >, QList< ParamHandler >, QList< OutputGenerator >, QList< QDict< TemplateVariant > >, QList< GroupDef >, QList< IndexField >, QList< ListElem >, QList< DocSets::NodeDef >, QList< CallContext::Ctx >, QList< DotConstString >, QList< RowHandler >, QList< TemplateEngine::Private::IncludeEntry >, QList< DotRunner::CleanupItem >, QList< Formula >, QList< TemplateToken >, QList< GenericsCollection >, QList< DotGroupCollaboration::Edge >, QList< Statistics::stat >, QList< TagIncludeInfo >, QList< ActiveRowSpan >, QList< FilePair >, QList< ClassDef >, QList< Define >, QList< BaseClassDef >, QList< EdgeInfo >, QList< IncludeHandler >, QList< TemplateNodeIf::GuardedNodes >, QList< TagMemberInfo >, QList< TemplateNodeWith::Mapping >, QList< DotRunner >, QList< RefItem >, QList< FileName >, QList< SearchDocEntry >, QList< FlowChart >, QList< SearchDefinitionList >, QList< SectionInfo >, QList< CodeLineHandler >, QList< TemplateNodeIndexEntry::Mapping >, QList< DocPara >, QList< Input * >, QList< EdgeLabelHandler >, QList< LayoutNavEntry >, QList< ConfigOption >, QList< uint >, QList< AlphaIndexTableCell >, QList< UseEntry >, QList< DefineName >, QList< DirEntry >, QList< ParameterHandler >, QList< MemberList >, QList< LayoutDocEntry >, QList< CompoundEntry >, QList< Argument >, QList< TagAnchorInfo >, QList< FileList >, QList< FileDef >, QList< TagClassInfo >, QList< MemberHandler >, QList< DotFilePatcher::Map >, QList< DocImpl >, QList< ArgumentList >, QList< FTVNode >, QList< BaseInfo >, QList< TagEnumValueInfo >, QList< LinkedTextImpl >, QList< SearchIndexList >, QList< DiagramRow >, QList< AlphaIndexTableRows >, QList< NavIndexEntry >, QList< Example >, QList< DirDef >, QStrIList, QStrList, and QSortedList< type >.
Definition at line 125 of file qglist.cpp.
|
protected |
Definition at line 751 of file qglist.cpp.
|
protected |
Definition at line 734 of file qglist.cpp.
|
inlinevirtual |
Returns the number of objects in the collection.
Implements QCollection.
Reimplemented in QList< type >, QList< PyVariableContext::Scope >, QList< PyCallContext::Ctx >, QList< MemberName >, QList< MemberNameInfo >, QList< PageDef >, QList< DocNode >, QList< TagFileInfo >, QList< Grouping >, QList< ListItemInfo >, QList< QCString >, QList< Definition >, QList< MemberDef >, QList< TagPackageInfo >, QList< SectionHandler >, QList< DirRelation >, QList< MemberReference >, QList< DotNode >, QList< HtmlAttrib >, QList< TagPageInfo >, QList< VariableContext::Scope >, QList< IndexIntf >, QList< Entry >, QList< MemberGroup >, QList< DiagramItem >, QList< DotGroupCollaboration::Link >, QList< TagDirInfo >, QList< EntryNav >, QList< IncludeInfo >, QList< QString >, QList< RelatedCompound >, QList< DotFilePatcher >, QList< tcl_scan >, QList< ParameterItemHandler >, QList< VariableListEntryHandler >, QList< TagNamespaceInfo >, QList< NodeHandler >, QList< EntryHandler >, QList< TemplateVariant >, QList< MemberInfo >, QList< TagGroupInfo >, QList< ChildNodeHandler >, QList< DotWorkerThread >, QList< ExprAst >, QList< TemplateNode >, QList< NamespaceDef >, QList< T >, QList< void >, QList< ParamHandler >, QList< OutputGenerator >, QList< QDict< TemplateVariant > >, QList< GroupDef >, QList< IndexField >, QList< ListElem >, QList< DocSets::NodeDef >, QList< CallContext::Ctx >, QList< DotConstString >, QList< RowHandler >, QList< TemplateEngine::Private::IncludeEntry >, QList< DotRunner::CleanupItem >, QList< Formula >, QList< TemplateToken >, QList< GenericsCollection >, QList< DotGroupCollaboration::Edge >, QList< Statistics::stat >, QList< TagIncludeInfo >, QList< ActiveRowSpan >, QList< FilePair >, QList< ClassDef >, QList< Define >, QList< BaseClassDef >, QList< EdgeInfo >, QList< IncludeHandler >, QList< TemplateNodeIf::GuardedNodes >, QList< TagMemberInfo >, QList< TemplateNodeWith::Mapping >, QList< DotRunner >, QList< RefItem >, QList< FileName >, QList< SearchDocEntry >, QList< FlowChart >, QList< SearchDefinitionList >, QList< SectionInfo >, QList< CodeLineHandler >, QList< TemplateNodeIndexEntry::Mapping >, QList< DocPara >, QList< Input * >, QList< EdgeLabelHandler >, QList< LayoutNavEntry >, QList< ConfigOption >, QList< uint >, QList< AlphaIndexTableCell >, QList< UseEntry >, QList< DefineName >, QList< DirEntry >, QList< ParameterHandler >, QList< MemberList >, QList< LayoutDocEntry >, QList< CompoundEntry >, QList< Argument >, QList< TagAnchorInfo >, QList< FileList >, QList< FileDef >, QList< TagClassInfo >, QList< MemberHandler >, QList< DotFilePatcher::Map >, QList< DocImpl >, QList< ArgumentList >, QList< FTVNode >, QList< BaseInfo >, QList< TagEnumValueInfo >, QList< LinkedTextImpl >, QList< SearchIndexList >, QList< DiagramRow >, QList< AlphaIndexTableRows >, QList< NavIndexEntry >, QList< Example >, QList< DirDef >, QInternalList< type >, QQueue< type >, QStack< type >, QInternalList< QGDictIterator >, QInternalList< QWaitConditionEvent >, QInternalList< QCacheItem >, QQueue< DotRunner >, QStack< DocNode >, QStack< PerlModOutputStream >, QStack< LatexDocVisitor::TableState >, QStack< bool >, QStack< DocStyleChange >, and QStack< State >.
|
inlineprotected |
|
protected |
Definition at line 708 of file qglist.cpp.
|
protected |
Definition at line 683 of file qglist.cpp.
|
protected |
Definition at line 807 of file qglist.cpp.
|
inlineprotected |
|
private |
Definition at line 888 of file qglist.cpp.
|
protected |
Definition at line 384 of file qglist.cpp.
|
protected |
Definition at line 327 of file qglist.cpp.
|
protected |
Definition at line 821 of file qglist.cpp.
Definition at line 275 of file qglist.cpp.
|
protected |
Definition at line 835 of file qglist.cpp.
Definition at line 222 of file qglist.cpp.
Compares this list with list. Retruns TRUE if the lists contain the same data, else FALSE.
Definition at line 242 of file qglist.cpp.
|
private |
Definition at line 344 of file qglist.cpp.
|
protected |
Definition at line 854 of file qglist.cpp.
QDataStream & QGList::read | ( | QDataStream & | s | ) |
Definition at line 992 of file qglist.cpp.
|
protectedvirtual |
Reads a collection/list item from the stream s and returns a reference to the stream.
The default implementation sets item to 0.
Reimplemented in QStrList.
Definition at line 140 of file qglist.cpp.
|
protected |
Definition at line 414 of file qglist.cpp.
|
protected |
Definition at line 504 of file qglist.cpp.
Definition at line 554 of file qglist.cpp.
Definition at line 481 of file qglist.cpp.
|
protected |
Definition at line 523 of file qglist.cpp.
|
protected |
Sorts the list by the result of the virtual compareItems() function.
The Heap-Sort algorithm is used for sorting. It sorts n items with O(n*log n) compares. This is the asymptotic optimal solution of the sorting problem.
Definition at line 934 of file qglist.cpp.
|
protected |
Definition at line 595 of file qglist.cpp.
|
protected |
Definition at line 608 of file qglist.cpp.
|
protected |
Definition at line 623 of file qglist.cpp.
|
protected |
Definition at line 637 of file qglist.cpp.
|
protected |
Definition at line 572 of file qglist.cpp.
|
protected |
Definition at line 874 of file qglist.cpp.
|
private |
Definition at line 436 of file qglist.cpp.
QDataStream & QGList::write | ( | QDataStream & | s | ) | const |
Definition at line 1025 of file qglist.cpp.
|
protectedvirtual |
Writes a collection/list item to the stream s and returns a reference to the stream.
The default implementation does nothing.
Reimplemented in QStrList.
Definition at line 155 of file qglist.cpp.
|
friend |