]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/node.tex
Patches-1851591 ] dataview sample is crashing (under MSW)
[wxWidgets.git] / docs / latex / wx / node.tex
CommitLineData
2b5f62a0
VZ
1\section{\class{wxNode}}\label{wxnode}
2
3wxNodeBase is the node structure used in linked lists (see
4\helpref{wxList}{wxlist}) and derived classes. You should never use wxNodeBase
5class directly, however, because it works with untyped ({\tt void *}) data and
6this is unsafe. Use wxNodeBase-derived classes which are automatically defined
7by WX\_DECLARE\_LIST and WX\_DEFINE\_LIST macros instead as described in
8\helpref{wxList}{wxlist} documentation (see example there). Also note that
9although there is a class called wxNode, it is defined for backwards
10compatibility only and usage of this class is strongly deprecated.
11
12In the documentation below, the type {\tt T} should be thought of as a
13``template'' parameter: this is the type of data stored in the linked list or,
14in other words, the first argument of WX\_DECLARE\_LIST macro. Also, wxNode is
15written as wxNode<T> even though it isn't really a template class -- but it
16helps to think of it as if it were.
a660d684
KB
17
18\wxheading{Derived from}
19
6e6110ee 20None.
a660d684 21
954b8ae6
JS
22\wxheading{Include files}
23
24<wx/list.h>
25
a7af285d
VZ
26\wxheading{Library}
27
28\helpref{wxBase}{librarieslist}
29
a660d684
KB
30\wxheading{See also}
31
32\helpref{wxList}{wxlist}, \helpref{wxHashTable}{wxhashtable}
33
34\latexignore{\rtfignore{\wxheading{Members}}}
35
dcbd177f 36\membersection{wxNode<T>::GetData}\label{wxnodegetdata}
a660d684 37
2b5f62a0 38\constfunc{T *}{GetData}{\void}
a660d684 39
6e6110ee 40Retrieves the client data pointer associated with the node.
a660d684 41
dcbd177f 42\membersection{wxNode<T>::GetNext}\label{wxnodegetnext}
a660d684 43
2b5f62a0 44\constfunc{wxNode<T> *}{GetNext}{\void}
a660d684 45
2b5f62a0 46Retrieves the next node or NULL if this node is the last one.
a660d684 47
dcbd177f 48\membersection{wxNode<T>::GetPrevious}\label{wxnodegetprevious}
a660d684 49
2b5f62a0 50\func{wxNode<T> *}{GetPrevious}{\void}
a660d684 51
2b5f62a0 52Retrieves the previous node or NULL if this node is the first one in the list.
a660d684 53
dcbd177f 54\membersection{wxNode<T>::SetData}\label{wxnodesetdata}
a660d684 55
2b5f62a0 56\func{void}{SetData}{\param{T *}{data}}
a660d684
KB
57
58Sets the data associated with the node (usually the pointer will have been
59set when the node was created).
60
dcbd177f 61\membersection{wxNode<T>::IndexOf}\label{wxnodeindexof}
77c5eefb
VZ
62
63\func{int}{IndexOf}{\void}
64
65Returns the zero-based index of this node within the list. The return value
a8d08dbd 66will be {\tt wxNOT\_FOUND} if the node has not been added to a list yet.
a660d684 67