wxnodewxnodebase is the node structure used in linked lists (see wxlist) and derived classes. you should never use wxnodebase class directly, however, because it works with untyped (void *) data and this is unsafe. use wxnodebase-derived classes which are automatically defined by wx_declare_list and wx_define_list macros instead as described in wxlist documentation (see example there). also note that although there is a class called wxnode, it is defined for backwards compatibility only and usage of this class is strongly deprecated. in the documentation below, the type t should be thought of as a "template'' parameter: this is the type of data stored in the linked list or, in other words, the first argument of wx_declare_list macro. also, wxnode is written as wxnode<t> even though it isn't really a template class -- but it helps to think of it as if it were. derived from none. include files <wx/list.h> see also members
wxnode<t>::getdata
wxnode<t>::getdatat * getdata() const retrieves the client data pointer associated with the node.
wxnode<t>::getnextwxnode<t> * getnext() const retrieves the next node or null if this node is the last one.
wxnode<t>::getpreviouswxnode<t> * getprevious() retrieves the previous node or null if this node is the first one in the list.
wxnode<t>::setdatavoid setdata(t *data) sets the data associated with the node (usually the pointer will have been set when the node was created).
wxnode<t>::indexofint indexof() returns the zero-based index of this node within the list. the return value will be wxnot_found if the node has not been added to a list yet.
|