1QStrList(3qt)                                                    QStrList(3qt)
2
3
4

NAME

6       QStrList - Doubly-linked list of char*
7

SYNOPSIS

9       #include <qstrlist.h>
10
11       Inherits QPtrList<char>.
12
13       Inherited by QStrIList.
14
15   Public Members
16       QStrList ( bool deepCopies = TRUE )
17       QStrList ( const QStrList & list )
18       ~QStrList ()
19       QStrList & operator= ( const QStrList & list )
20

DESCRIPTION

22       The QStrList class provides a doubly-linked list of char*.
23
24       If you want a string list of QStrings use QStringList.
25
26       This class is a QPtrList<char> instance (a list of char*).
27
28       QStrList can make deep or shallow copies of the strings that are
29       inserted.
30
31       A deep copy means that memory is allocated for the string and then the
32       string data is copied into that memory. A shallow copy is just a copy
33       of the pointer value and not of the string data itself.
34
35       The disadvantage of shallow copies is that because a pointer can be
36       deleted only once, the program must put all strings in a central place
37       and know when it is safe to delete them (i.e. when the strings are no
38       longer referenced by other parts of the program). This can make the
39       program more complex. The advantage of shallow copies is that they
40       consume far less memory than deep copies. It is also much faster to
41       copy a pointer (typically 4 or 8 bytes) than to copy string data.
42
43       A QStrList that operates on deep copies will, by default, turn on auto-
44       deletion (see setAutoDelete()). Thus, by default QStrList will
45       deallocate any string copies it allocates.
46
47       The virtual compareItems() function is reimplemented and does a case-
48       sensitive string comparison. The inSort() function will insert strings
49       in sorted order. In general it is fastest to insert the strings as they
50       come and sort() at the end; inSort() is useful when you just have to
51       add a few extra strings to an already sorted list.
52
53       The QStrListIterator class is an iterator for QStrList.
54
55       See also Collection Classes, Text Related Classes, and Non-GUI Classes.
56

MEMBER FUNCTION DOCUMENTATION

QStrList::QStrList ( bool deepCopies = TRUE )

59       Constructs an empty list of strings. Will make deep copies of all
60       inserted strings if deepCopies is TRUE, or use shallow copies if
61       deepCopies is FALSE.
62

QStrList::QStrList ( const QStrList & list )

64       Constructs a copy of list.
65
66       If list has deep copies, this list will also get deep copies. Only the
67       pointers are copied (shallow copy) if the other list does not use deep
68       copies.
69

QStrList::~QStrList ()

71       Destroys the list. All strings are removed.
72

QStrList & QStrList::operator= ( const QStrList & list )

74       Assigns list to this list and returns a reference to this list.
75
76       If list has deep copies, this list will also get deep copies.  Only the
77       pointers are copied (shallow copy) if the other list does not use deep
78       copies.
79
80

SEE ALSO

82       http://doc.trolltech.com/qstrlist.html
83       http://www.trolltech.com/faq/tech.html
84
86       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
87       license file included in the distribution for a complete license
88       statement.
89

AUTHOR

91       Generated automatically from the source code.
92

BUGS

94       If you find a bug in Qt, please report it as described in
95       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
96       help you. Thank you.
97
98       The definitive Qt documentation is provided in HTML format; it is
99       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
100       web browser. This man page is provided as a convenience for those users
101       who prefer man pages, although this format is not officially supported
102       by Trolltech.
103
104       If you find errors in this manual page, please report them to qt-
105       bugs@trolltech.com.  Please include the name of the manual page
106       (qstrlist.3qt) and the Qt version (3.3.8).
107
108
109
110Trolltech AS                    2 February 2007                  QStrList(3qt)
Impressum