1 \section{\class{wxNode
}}\label{wxnode
}
3 wxNodeBase is the node structure used in linked lists (see
4 \helpref{wxList
}{wxlist
}) and derived classes. You should never use wxNodeBase
5 class directly, however, because it works with untyped (
{\tt void *
}) data and
6 this is unsafe. Use wxNodeBase-derived classes which are automatically defined
7 by WX
\_DECLARE\_LIST and WX
\_DEFINE\_LIST macros instead as described in
8 \helpref{wxList
}{wxlist
} documentation (see example there). Also note that
9 although there is a class called wxNode, it is defined for backwards
10 compatibility only and usage of this class is strongly deprecated.
12 In 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,
14 in other words, the first argument of WX
\_DECLARE\_LIST macro. Also, wxNode is
15 written as wxNode<T> even though it isn't really a template class -- but it
16 helps to think of it as if it were.
18 \wxheading{Derived from
}
22 \wxheading{Include files
}
28 \helpref{wxBase
}{librarieslist
}
32 \helpref{wxList
}{wxlist
},
\helpref{wxHashTable
}{wxhashtable
}
34 \latexignore{\rtfignore{\wxheading{Members
}}}
36 \membersection{wxNode<T>::GetData
}\label{wxnodegetdata
}
38 \constfunc{T *
}{GetData
}{\void}
40 Retrieves the client data pointer associated with the node.
42 \membersection{wxNode<T>::GetNext
}\label{wxnodegetnext
}
44 \constfunc{wxNode<T> *
}{GetNext
}{\void}
46 Retrieves the next node or NULL if this node is the last one.
48 \membersection{wxNode<T>::GetPrevious
}\label{wxnodegetprevious
}
50 \func{wxNode<T> *
}{GetPrevious
}{\void}
52 Retrieves the previous node or NULL if this node is the first one in the list.
54 \membersection{wxNode<T>::SetData
}\label{wxnodesetdata
}
56 \func{void
}{SetData
}{\param{T *
}{data
}}
58 Sets the data associated with the node (usually the pointer will have been
59 set when the node was created).
61 \membersection{wxNode<T>::IndexOf
}\label{wxnodeindexof
}
63 \func{int
}{IndexOf
}{\void}
65 Returns the zero-based index of this node within the list. The return value
66 will be
{\tt wxNOT
\_FOUND} if the node has not been added to a list yet.