diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-26 23:32:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-26 23:32:43 -0600 |
commit | ea318d1431c89e647598c510c4245c6571aa5f46 (patch) | |
tree | 996d29b80c30d453dda86d1a23162d441628f169 /doc/html/collection.html | |
parent | aaf89d4b48f69c9293feb187db26362e550b5561 (diff) | |
download | tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip |
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/collection.html')
-rw-r--r-- | doc/html/collection.html | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/doc/html/collection.html b/doc/html/collection.html index ba89abc87..4987ac6b9 100644 --- a/doc/html/collection.html +++ b/doc/html/collection.html @@ -46,21 +46,21 @@ can be used with STL algorithms and containers. See the <a href="qt-template-lib details. <p> The value-based collections are: <ul> -<li> <a href="qvaluelist.html">TQValueList</a>, a value-based list. -<li> <a href="qvaluevector.html">TQValueVector</a>, a value-based vector. -<li> <a href="qvaluestack.html">TQValueStack</a>, a value-based stack. -<li> <a href="qmap.html">TQMap</a>, a value-based dictionary (associative array). +<li> <a href="ntqvaluelist.html">TQValueList</a>, a value-based list. +<li> <a href="ntqvaluevector.html">TQValueVector</a>, a value-based vector. +<li> <a href="ntqvaluestack.html">TQValueStack</a>, a value-based stack. +<li> <a href="ntqmap.html">TQMap</a>, a value-based dictionary (associative array). </ul> <p> The pointer-based collections are: <ul> -<li> <a href="qcache.html">TQCache</a> and <a href="qintcache.html">TQIntCache</a>, LRU (least recently used) caches. -<li> <a href="qdict.html">TQDict</a>, <a href="qintdict.html">TQIntDict</a> and <a href="qptrdict.html">TQPtrDict</a> dictionaries. -<li> <a href="qptrlist.html">TQPtrList</a>, a doubly linked list. -<li> <a href="qptrqueue.html">TQPtrQueue</a>, a FIFO (first in, first out) queue. -<li> <a href="qptrstack.html">TQPtrStack</a>, a LIFO (last in, first out) stack. -<li> <a href="qptrvector.html">TQPtrVector</a>, a vector. +<li> <a href="ntqcache.html">TQCache</a> and <a href="ntqintcache.html">TQIntCache</a>, LRU (least recently used) caches. +<li> <a href="ntqdict.html">TQDict</a>, <a href="ntqintdict.html">TQIntDict</a> and <a href="ntqptrdict.html">TQPtrDict</a> dictionaries. +<li> <a href="ntqptrlist.html">TQPtrList</a>, a doubly linked list. +<li> <a href="ntqptrqueue.html">TQPtrQueue</a>, a FIFO (first in, first out) queue. +<li> <a href="ntqptrstack.html">TQPtrStack</a>, a LIFO (last in, first out) stack. +<li> <a href="ntqptrvector.html">TQPtrVector</a>, a vector. </ul> -<p> <a href="qmemarray.html">TQMemArray</a> is exceptional; it is neither pointer nor value based, +<p> <a href="ntqmemarray.html">TQMemArray</a> is exceptional; it is neither pointer nor value based, but memory based. For maximum efficiency with the simple data types usually used in arrays, it uses bitwise operations to copy and compare array elements. @@ -80,7 +80,7 @@ is a class for traversing the items in a collection: </ul> <p> The value-based collections plus algorithms operating on them are grouped together in the <a href="qt-template-lib.html">TQt Template -Library</a>; see also the <a href="qtl.html">TQt Template +Library</a>; see also the <a href="ntqtl.html">TQt Template Library Classes</a>. <p> The rest of this page dicusses the pointer-based containers. <p> <h2> Architecture of the pointer-based containers @@ -92,13 +92,13 @@ collections by casting item pointers to and from void pointers. <p> This strategy allows TQt's templates to be very economical on space (instantiating one of these templates adds only inlinable calls to the base classes), without hurting performance. -<p> <h2> A <a href="qptrlist.html">TQPtrList</a> Example +<p> <h2> A <a href="ntqptrlist.html">TQPtrList</a> Example </h2> <a name="2"></a><p> This example shows how to store Employee items in a list and prints them out in reverse order: <p> <pre> - #include <<a href="qptrlist-h.html">qptrlist.h</a>> - #include <<a href="qstring-h.html">qstring.h</a>> + #include <<a href="qptrlist-h.html">ntqptrlist.h</a>> + #include <<a href="qstring-h.html">ntqstring.h</a>> #include <stdio.h> class Employee @@ -108,18 +108,18 @@ them out in reverse order: const char *name() const { return n; } int salary() const { return s; } private: - <a href="qstring.html">TQString</a> n; + <a href="ntqstring.html">TQString</a> n; int s; }; int main() { - <a href="qptrlist.html">TQPtrList</a><Employee> list; // list of pointers to Employee - list.<a href="qptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE ); // delete items when they are removed + <a href="ntqptrlist.html">TQPtrList</a><Employee> list; // list of pointers to Employee + list.<a href="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE ); // delete items when they are removed - list.<a href="qptrlist.html#append">append</a>( new Employee("Bill", 50000) ); - list.<a href="qptrlist.html#append">append</a>( new Employee("Steve",80000) ); - list.<a href="qptrlist.html#append">append</a>( new Employee("Ron", 60000) ); + list.<a href="ntqptrlist.html#append">append</a>( new Employee("Bill", 50000) ); + list.<a href="ntqptrlist.html#append">append</a>( new Employee("Steve",80000) ); + list.<a href="ntqptrlist.html#append">append</a>( new Employee("Ron", 60000) ); <a href="qptrlistiterator.html">TQPtrListIterator</a><Employee> it(list); // iterator for employee list for ( it.<a href="qptrlistiterator.html#toLast">toLast</a>(); it.<a href="qptrlistiterator.html#current">current</a>(); --it) ) { @@ -140,11 +140,11 @@ them out in reverse order: <p> <h2> Managing Collection Items </h2> -<a name="3"></a><p> All pointer-based collections inherit the <a href="qptrcollection.html">TQPtrCollection</a> base class. +<a name="3"></a><p> All pointer-based collections inherit the <a href="ntqptrcollection.html">TQPtrCollection</a> base class. This class only knows about the number of items in the collection and the deletion strategy. <p> By default, items in a collection are not deleted when they are -removed from the collection. The <a href="qptrcollection.html#setAutoDelete">TQPtrCollection::setAutoDelete</a>() +removed from the collection. The <a href="ntqptrcollection.html#setAutoDelete">TQPtrCollection::setAutoDelete</a>() function specifies the deletion strategy. In the list example, we enable auto-deletion to make the list delete the items when they are removed from the list. @@ -152,23 +152,23 @@ removed from the list. not the item itself. This is called a <a href="shclass.html#shallow-copy">shallow copy</a>. It is possible to make the collection copy all of the item's data (known as a <a href="shclass.html#deep-copy">deep copy</a>) when an item is inserted. All collection functions that insert an -item call the virtual function <a href="qptrcollection.html#newItem">TQPtrCollection::newItem</a>() for the item +item call the virtual function <a href="ntqptrcollection.html#newItem">TQPtrCollection::newItem</a>() for the item to be inserted. Inherit a collection and reimplement it if you want to have deep copies in your collection. <p> When removing an item from a list, the virtual function -<a href="qptrcollection.html#deleteItem">TQPtrCollection::deleteItem</a>() is called. The default implementation +<a href="ntqptrcollection.html#deleteItem">TQPtrCollection::deleteItem</a>() is called. The default implementation in all collection classes deletes the item if auto-deletion is enabled. <p> <h2> Usage </h2> -<a name="4"></a><p> A pointer-based collection class, such as <a href="qptrlist.html">TQPtrList</a><type>, defines a +<a name="4"></a><p> A pointer-based collection class, such as <a href="ntqptrlist.html">TQPtrList</a><type>, defines a collection of <em>pointers</em> to <em>type</em> objects. The pointer (*) is implicit. -<p> We discuss <a href="qptrlist.html">TQPtrList</a> here, but the same techniques apply to all +<p> We discuss <a href="ntqptrlist.html">TQPtrList</a> here, but the same techniques apply to all pointer-based collection classes and all collection class iterators. <p> Template instantiation: <pre> - <a href="qptrlist.html">TQPtrList</a><Employee> list; // wherever the list is used + <a href="ntqptrlist.html">TQPtrList</a><Employee> list; // wherever the list is used </pre> <p> The item's class or type, Employee in our example, must be defined prior @@ -176,69 +176,69 @@ to the list definition. <p> <pre> // Does not work: Employee is not defined class Employee; - <a href="qptrlist.html">TQPtrList</a><Employee> list; + <a href="ntqptrlist.html">TQPtrList</a><Employee> list; // This works: Employee is defined before it is used class Employee { ... }; - <a href="qptrlist.html">TQPtrList</a><Employee> list; + <a href="ntqptrlist.html">TQPtrList</a><Employee> list; </pre> <p> <h2> Iterators </h2> -<a name="5"></a><p> Although <a href="qptrlist.html">TQPtrList</a> has member functions to traverse the list, it can +<a name="5"></a><p> Although <a href="ntqptrlist.html">TQPtrList</a> has member functions to traverse the list, it can often be better to make use of an iterator. <a href="qptrlistiterator.html">TQPtrListIterator</a> is very safe and can traverse lists that are being modified at the same time. Multiple iterators can work independently on the same collection. -<p> A <a href="qptrlist.html">TQPtrList</a> has an internal list of all the iterators that are +<p> A <a href="ntqptrlist.html">TQPtrList</a> has an internal list of all the iterators that are currently operating on it. When a list entry is removed, the list updates all iterators accordingly. -<p> The <a href="qdict.html">TQDict</a> and <a href="qcache.html">TQCache</a> collections have no traversal functions. To +<p> The <a href="ntqdict.html">TQDict</a> and <a href="ntqcache.html">TQCache</a> collections have no traversal functions. To traverse these collections, you must use <a href="qdictiterator.html">TQDictIterator</a> or <a href="qcacheiterator.html">TQCacheIterator</a>. <p> <h2> Predefined Collections </h2> <a name="6"></a><p> TQt has the following predefined collection classes: <ul> -<li> String lists: <a href="qstrlist.html">TQStrList</a>, <a href="qstrilist.html">TQStrIList</a> (<a href="qstrlist-h.html">qstrlist.h</a>) and -<a href="qstringlist.html">TQStringList</a> (<a href="qstringlist-h.html">qstringlist.h</a>) -<li> String vectors: TQStrVec and TQStrIVec (qstrvec.h); these are obsolete +<li> String lists: <a href="ntqstrlist.html">TQStrList</a>, <a href="qstrilist.html">TQStrIList</a> (<a href="qstrlist-h.html">ntqstrlist.h</a>) and +<a href="ntqstringlist.html">TQStringList</a> (<a href="qstringlist-h.html">ntqstringlist.h</a>) +<li> String vectors: TQStrVec and TQStrIVec (ntqstrvec.h); these are obsolete </ul> -<p> In almost all cases you would choose <a href="qstringlist.html">TQStringList</a>, a value -list of <a href="shclass.html#implicitly-shared">implicitly shared</a> <a href="qstring.html">TQString</a> Unicode strings. TQPtrStrList and +<p> In almost all cases you would choose <a href="ntqstringlist.html">TQStringList</a>, a value +list of <a href="shclass.html#implicitly-shared">implicitly shared</a> <a href="ntqstring.html">TQString</a> Unicode strings. TQPtrStrList and TQPtrStrIList store only char pointers, not the strings themselves. <p> <h2> List of Pointer-based Collection Classes and Related Iterator Classes </h2> <a name="7"></a><p> <p><table width="100%"> -<tr bgcolor=#f0f0f0><td><b><a href="qasciicache.html">TQAsciiCache</a></b><td>Template class that provides a cache based on char* keys +<tr bgcolor=#f0f0f0><td><b><a href="ntqasciicache.html">TQAsciiCache</a></b><td>Template class that provides a cache based on char* keys <tr bgcolor=#f0f0f0><td><b><a href="qasciicacheiterator.html">TQAsciiCacheIterator</a></b><td>Iterator for TQAsciiCache collections -<tr bgcolor=#f0f0f0><td><b><a href="qasciidict.html">TQAsciiDict</a></b><td>Template class that provides a dictionary based on char* keys +<tr bgcolor=#f0f0f0><td><b><a href="ntqasciidict.html">TQAsciiDict</a></b><td>Template class that provides a dictionary based on char* keys <tr bgcolor=#f0f0f0><td><b><a href="qasciidictiterator.html">TQAsciiDictIterator</a></b><td>Iterator for TQAsciiDict collections -<tr bgcolor=#f0f0f0><td><b><a href="qbitarray.html">TQBitArray</a></b><td>Array of bits +<tr bgcolor=#f0f0f0><td><b><a href="ntqbitarray.html">TQBitArray</a></b><td>Array of bits <tr bgcolor=#f0f0f0><td><b><a href="qbitval.html">TQBitVal</a></b><td>Internal class, used with TQBitArray -<tr bgcolor=#f0f0f0><td><b><a href="qbuffer.html">TQBuffer</a></b><td>I/O device that operates on a TQByteArray +<tr bgcolor=#f0f0f0><td><b><a href="ntqbuffer.html">TQBuffer</a></b><td>I/O device that operates on a TQByteArray <tr bgcolor=#f0f0f0><td><b><a href="qbytearray.html">TQByteArray</a></b><td>Array of bytes -<tr bgcolor=#f0f0f0><td><b><a href="qcache.html">TQCache</a></b><td>Template class that provides a cache based on TQString keys +<tr bgcolor=#f0f0f0><td><b><a href="ntqcache.html">TQCache</a></b><td>Template class that provides a cache based on TQString keys <tr bgcolor=#f0f0f0><td><b><a href="qcacheiterator.html">TQCacheIterator</a></b><td>Iterator for TQCache collections -<tr bgcolor=#f0f0f0><td><b><a href="qcstring.html">TQCString</a></b><td>Abstraction of the classic C zero-terminated char array (char *) -<tr bgcolor=#f0f0f0><td><b><a href="qdict.html">TQDict</a></b><td>Template class that provides a dictionary based on TQString keys +<tr bgcolor=#f0f0f0><td><b><a href="ntqcstring.html">TQCString</a></b><td>Abstraction of the classic C zero-terminated char array (char *) +<tr bgcolor=#f0f0f0><td><b><a href="ntqdict.html">TQDict</a></b><td>Template class that provides a dictionary based on TQString keys <tr bgcolor=#f0f0f0><td><b><a href="qdictiterator.html">TQDictIterator</a></b><td>Iterator for TQDict collections -<tr bgcolor=#f0f0f0><td><b><a href="qintcache.html">TQIntCache</a></b><td>Template class that provides a cache based on long keys +<tr bgcolor=#f0f0f0><td><b><a href="ntqintcache.html">TQIntCache</a></b><td>Template class that provides a cache based on long keys <tr bgcolor=#f0f0f0><td><b><a href="qintcacheiterator.html">TQIntCacheIterator</a></b><td>Iterator for TQIntCache collections -<tr bgcolor=#f0f0f0><td><b><a href="qintdict.html">TQIntDict</a></b><td>Template class that provides a dictionary based on long keys +<tr bgcolor=#f0f0f0><td><b><a href="ntqintdict.html">TQIntDict</a></b><td>Template class that provides a dictionary based on long keys <tr bgcolor=#f0f0f0><td><b><a href="qintdictiterator.html">TQIntDictIterator</a></b><td>Iterator for TQIntDict collections -<tr bgcolor=#f0f0f0><td><b><a href="qobjectlist.html">TQObjectList</a></b><td>TQPtrList of TQObjects +<tr bgcolor=#f0f0f0><td><b><a href="ntqobjectlist.html">TQObjectList</a></b><td>TQPtrList of TQObjects <tr bgcolor=#f0f0f0><td><b><a href="qobjectlistiterator.html">TQObjectListIterator</a></b><td>Iterator for TQObjectLists -<tr bgcolor=#f0f0f0><td><b><a href="qptrcollection.html">TQPtrCollection</a></b><td>The base class of most pointer-based TQt collections -<tr bgcolor=#f0f0f0><td><b><a href="qptrdict.html">TQPtrDict</a></b><td>Template class that provides a dictionary based on void* keys +<tr bgcolor=#f0f0f0><td><b><a href="ntqptrcollection.html">TQPtrCollection</a></b><td>The base class of most pointer-based TQt collections +<tr bgcolor=#f0f0f0><td><b><a href="ntqptrdict.html">TQPtrDict</a></b><td>Template class that provides a dictionary based on void* keys <tr bgcolor=#f0f0f0><td><b><a href="qptrdictiterator.html">TQPtrDictIterator</a></b><td>Iterator for TQPtrDict collections -<tr bgcolor=#f0f0f0><td><b><a href="qptrlist.html">TQPtrList</a></b><td>Template class that provides a list +<tr bgcolor=#f0f0f0><td><b><a href="ntqptrlist.html">TQPtrList</a></b><td>Template class that provides a list <tr bgcolor=#f0f0f0><td><b><a href="qptrlistiterator.html">TQPtrListIterator</a></b><td>Iterator for TQPtrList collections -<tr bgcolor=#f0f0f0><td><b><a href="qptrqueue.html">TQPtrQueue</a></b><td>Template class that provides a queue +<tr bgcolor=#f0f0f0><td><b><a href="ntqptrqueue.html">TQPtrQueue</a></b><td>Template class that provides a queue <tr bgcolor=#f0f0f0><td><b><a href="qstrilist.html">TQStrIList</a></b><td>Doubly-linked list of char* with case-insensitive comparison -<tr bgcolor=#f0f0f0><td><b><a href="qstrlist.html">TQStrList</a></b><td>Doubly-linked list of char* +<tr bgcolor=#f0f0f0><td><b><a href="ntqstrlist.html">TQStrList</a></b><td>Doubly-linked list of char* </table> <!-- eof --> <p><address><hr><div align=center> |