|
ISLEman
|
The QCollection class is the base class of all Qt collections. More...
#include <qcollection.h>
Public Types | |
| typedef void * | Item |
Public Member Functions | |
| bool | autoDelete () const |
| void | setAutoDelete (bool enable) |
| virtual uint | count () const =0 |
| virtual void | clear ()=0 |
Protected Member Functions | |
| QCollection () | |
| QCollection (const QCollection &) | |
| virtual | ~QCollection () |
| virtual Item | newItem (Item) |
| virtual void | deleteItem (Item) |
Protected Attributes | |
| bool | del_item |
The QCollection class is the base class of all Qt collections.
The QCollection class is an abstract base class for the Qt collection classes QDict, QList etc. via QGDict, QGList etc.
A QCollection knows only about the number of objects in the collection and the deletion strategy (see setAutoDelete()).
A collection is implemented using the Item (generic collection item) type, which is a void*. The template classes that create the real collections cast the Item to the required type.
|
inlineprotected |
Constructs a collection. The constructor is protected because QCollection is an abstract class.
|
inlineprotected |
Constructs a copy of source with autoDelete() set to FALSE. The constructor is protected because QCollection is an abstract class.
Note that if source has autoDelete turned on, copying it is a good way to get memory leaks, reading freed memory, or both.
|
inlineprotectedvirtual |
Destroys the collection. The destructor is protected because QCollection is an abstract class.
|
inline |
Returns the setting of the auto-delete option (default is FALSE).
|
pure virtual |
Removes all objects from the collection. The objects will be deleted if auto-delete has been enabled.
Implemented in QGDict, QGList, QCache< type >, QCache< LookupInfo >, QList< type >, QList< MemberName >, QList< MemberNameInfo >, QList< PageDef >, QList< DocNode >, QList< TagFileInfo >, QList< Grouping >, QList< ListItemInfo >, QList< QCString >, QList< Definition >, QList< MemberDef >, QList< TagPackageInfo >, QList< DirRelation >, QList< DotNode >, QList< HtmlAttrib >, QList< TagPageInfo >, QList< Entry >, QList< IndexIntf >, QList< MemberGroup >, QList< DiagramItem >, QList< DotGroupCollaboration::Link >, QList< TagDirInfo >, QList< EntryNav >, QList< IncludeInfo >, QList< DotFilePatcher >, QList< stat >, QList< TagNamespaceInfo >, QList< TemplateVariant >, QList< MemberInfo >, QList< TagGroupInfo >, QList< DotWorkerThread >, QList< ExprAst >, QList< TemplateNode >, QList< NamespaceDef >, QList< T >, QList< void >, QList< OutputGenerator >, QList< QDict< TemplateVariant > >, QList< GroupDef >, QList< IndexField >, QList< ListElem >, QList< DotConstString >, QList< DotRunner::CleanupItem >, QList< Formula >, QList< TemplateToken >, QList< GenericsCollection >, QList< DotGroupCollaboration::Edge >, QList< TagIncludeInfo >, QList< ActiveRowSpan >, QList< FilePair >, QList< ClassDef >, QList< IncludeEntry >, QList< GuardedNodes >, QList< Define >, QList< BaseClassDef >, QList< EdgeInfo >, QList< NodeDef >, QList< TagMemberInfo >, QList< DotRunner >, QList< RefItem >, QList< FileName >, QList< SearchDocEntry >, QList< FlowChart >, QList< SearchDefinitionList >, QList< SectionInfo >, QList< DocPara >, QList< ConfigOption >, QList< LayoutNavEntry >, QList< uint >, QList< AlphaIndexTableCell >, QList< DefineName >, QList< DirEntry >, QList< MemberList >, QList< LayoutDocEntry >, QList< Argument >, QList< TagAnchorInfo >, QList< FileList >, QList< FileDef >, QList< TagClassInfo >, QList< DotFilePatcher::Map >, QList< ArgumentList >, QList< FTVNode >, QList< BaseInfo >, QList< Mapping >, QList< TagEnumValueInfo >, QList< SearchIndexList >, QList< DiagramRow >, QList< AlphaIndexTableRows >, QList< NavIndexEntry >, QList< Example >, QList< DirDef >, QGVector, QInternalList< type >, QInternalList< QGDictIterator >, QInternalList< QWaitConditionEvent >, QInternalList< QCacheItem >, QGCache, QAsciiDict< type >, QIntDict< type >, QPtrDict< type >, QIntDict< MemberDef >, QIntDict< Definition >, QIntDict< MemberGroup >, QIntDict< T >, QIntDict< MemberGroupInfo >, QIntDict< URL >, QIntDict< URLInfo >, QIntDict< ClassDef >, QIntDict< RefItem >, QIntDict< char >, QIntDict< uint >, QIntDict< SearchIndexList >, QVector< type >, QVector< QList< IndexWord > >, QQueue< type >, QStack< type >, QQueue< DotRunner >, QStack< DocNode >, QStack< PerlModOutputStream >, QStack< TableState >, QStack< bool >, QStack< DocStyleChange >, and QStack< State >.
|
pure virtual |
Returns the number of objects in the collection.
Implemented in QGDict, QCache< type >, QCache< LookupInfo >, QGList, QGCache, QGVector, QList< type >, QList< MemberName >, QList< MemberNameInfo >, QList< PageDef >, QList< DocNode >, QList< TagFileInfo >, QList< Grouping >, QList< ListItemInfo >, QList< QCString >, QList< Definition >, QList< MemberDef >, QList< TagPackageInfo >, QList< DirRelation >, QList< DotNode >, QList< HtmlAttrib >, QList< TagPageInfo >, QList< Entry >, QList< IndexIntf >, QList< MemberGroup >, QList< DiagramItem >, QList< DotGroupCollaboration::Link >, QList< TagDirInfo >, QList< EntryNav >, QList< IncludeInfo >, QList< DotFilePatcher >, QList< stat >, QList< TagNamespaceInfo >, QList< TemplateVariant >, QList< MemberInfo >, QList< TagGroupInfo >, QList< DotWorkerThread >, QList< ExprAst >, QList< TemplateNode >, QList< NamespaceDef >, QList< T >, QList< void >, QList< OutputGenerator >, QList< QDict< TemplateVariant > >, QList< GroupDef >, QList< IndexField >, QList< ListElem >, QList< DotConstString >, QList< DotRunner::CleanupItem >, QList< Formula >, QList< TemplateToken >, QList< GenericsCollection >, QList< DotGroupCollaboration::Edge >, QList< TagIncludeInfo >, QList< ActiveRowSpan >, QList< FilePair >, QList< ClassDef >, QList< IncludeEntry >, QList< GuardedNodes >, QList< Define >, QList< BaseClassDef >, QList< EdgeInfo >, QList< NodeDef >, QList< TagMemberInfo >, QList< DotRunner >, QList< RefItem >, QList< FileName >, QList< SearchDocEntry >, QList< FlowChart >, QList< SearchDefinitionList >, QList< SectionInfo >, QList< DocPara >, QList< ConfigOption >, QList< LayoutNavEntry >, QList< uint >, QList< AlphaIndexTableCell >, QList< DefineName >, QList< DirEntry >, QList< MemberList >, QList< LayoutDocEntry >, QList< Argument >, QList< TagAnchorInfo >, QList< FileList >, QList< FileDef >, QList< TagClassInfo >, QList< DotFilePatcher::Map >, QList< ArgumentList >, QList< FTVNode >, QList< BaseInfo >, QList< Mapping >, QList< TagEnumValueInfo >, QList< SearchIndexList >, QList< DiagramRow >, QList< AlphaIndexTableRows >, QList< NavIndexEntry >, QList< Example >, QList< DirDef >, QVector< type >, QVector< QList< IndexWord > >, QInternalList< type >, QQueue< type >, QStack< type >, QInternalList< QGDictIterator >, QInternalList< QWaitConditionEvent >, QInternalList< QCacheItem >, QQueue< DotRunner >, QStack< DocNode >, QStack< PerlModOutputStream >, QStack< TableState >, QStack< bool >, QStack< DocStyleChange >, QStack< State >, QAsciiDict< type >, QIntDict< type >, QPtrDict< type >, QIntDict< MemberDef >, QIntDict< Definition >, QIntDict< MemberGroup >, QIntDict< T >, QIntDict< MemberGroupInfo >, QIntDict< URL >, QIntDict< URLInfo >, QIntDict< ClassDef >, QIntDict< RefItem >, QIntDict< char >, QIntDict< uint >, QIntDict< SearchIndexList >, and MemberList.
|
protectedvirtual |
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.
|
protectedvirtual |
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.
|
inline |
Sets the auto-delete option of the collection.
Enabling auto-delete (enable is TRUE) will delete objects that are removed from the collection. This can be useful if the collection has the only reference to the objects. (Note that the object can still be copied using the copy constructor - copying such objects is a good way to get memory leaks, reading freed memory or both.)
Disabling auto-delete (enable is FALSE) will not delete objects that are removed from the collection. This is useful if the objects are part of many collections.
The default setting is FALSE.
1.8.12