]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/strlist.tex
added container class source
[wxWidgets.git] / docs / latex / wx / strlist.tex
... / ...
CommitLineData
1\section{\class{wxStringList}}\label{wxstringlist}
2
3A string list is a list which is assumed to contain strings.
4Memory is allocated when strings are added to
5the list, and deallocated by the destructor or by the {\bf Delete}\rtfsp
6member.
7
8\wxheading{Derived from}
9
10\helpref{wxList}{wxlist}\\
11\helpref{wxObject}{wxobject}
12
13\wxheading{Include files}
14
15<wx/list.h>
16
17\wxheading{See also}
18
19\helpref{wxString}{wxstring}, \helpref{wxList}{wxlist}
20
21\latexignore{\rtfignore{\wxheading{Members}}}
22
23\membersection{wxStringList::wxStringList}
24
25\func{}{wxStringList}{\void}
26
27Constructor.
28
29\func{void}{wxStringList}{\param{char* }{first}, ...}
30
31Constructor, taking NULL-terminated string argument list. wxStringList
32allocates memory for the strings.
33
34\membersection{wxStringList::\destruct{wxStringList}}
35
36\func{}{\destruct{wxStringList}}{\void}
37
38Deletes string list, deallocating strings.
39
40\membersection{wxStringList::Add}
41
42\func{wxNode *}{Add}{\param{const wxString\& }{s}}
43
44Adds string to list, allocating memory.
45
46\membersection{wxStringList::Clear}
47
48\func{void}{Clear}{\void}
49
50Clears all strings from the list.
51
52\membersection{wxStringList::Delete}
53
54\func{void}{Delete}{\param{const wxString\& }{s}}
55
56Searches for string and deletes from list, deallocating memory.
57
58\membersection{wxStringList::ListToArray}
59
60\func{char*}{ListToArray}{\param{bool}{ new\_copies = FALSE}}
61
62Converts the list to an array of strings, only allocating new memory if
63\rtfsp{\bf new\_copies} is TRUE.
64
65\membersection{wxStringList::Member}
66
67\func{bool}{Member}{\param{const wxString\& }{s}}
68
69Returns TRUE if {\bf s} is a member of the list (tested using {\bf strcmp}).
70
71\membersection{wxStringList::Sort}
72
73\func{void}{Sort}{\void}
74
75Sorts the strings in ascending alphabetical order. Note that all nodes
76(but not strings) get deallocated and new ones allocated.
77
78