⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vxwlist.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/VXWList.html - generated by refgen from /vobs/wpwr/docs/vxworks/ref/VXWList.i --> <title> VXWList </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Wind Foundation Classes</i></a></p></blockquote><h1>VXWList</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>VXWList</strong> - simple linked list class</p></blockquote><h4>METHODS</h4><blockquote><p><p><b><i><a href="./VXWList.html#VXWList::VXWList">VXWList::VXWList</a></i>(&nbsp;)</b>  -  initialize a list<br><b><i><a href="./VXWList.html#VXWList::VXWList_1">VXWList::VXWList</a></i>(&nbsp;)</b>  -  initialize a list as a copy of another<br><b><i><a href="./VXWList.html#VXWList::~VXWList">VXWList::~VXWList</a></i>(&nbsp;)</b>  -  free up a list<br><b><i><a href="./VXWList.html#VXWList::add">VXWList::add</a></i>(&nbsp;)</b>  -  add a node to the end of list<br><b><i><a href="./VXWList.html#VXWList::concat">VXWList::concat</a></i>(&nbsp;)</b>  -  concatenate two lists<br><b><i><a href="./VXWList.html#VXWList::count">VXWList::count</a></i>(&nbsp;)</b>  -  report the number of nodes in a list<br><b><i><a href="./VXWList.html#VXWList::extract">VXWList::extract</a></i>(&nbsp;)</b>  -  extract a sublist from list<br><b><i><a href="./VXWList.html#VXWList::find">VXWList::find</a></i>(&nbsp;)</b>  -  find a node in list<br><b><i><a href="./VXWList.html#VXWList::first">VXWList::first</a></i>(&nbsp;)</b>  -  find first node in list<br><b><i><a href="./VXWList.html#VXWList::get">VXWList::get</a></i>(&nbsp;)</b>  -  delete and return the first node from list<br><b><i><a href="./VXWList.html#VXWList::insert">VXWList::insert</a></i>(&nbsp;)</b>  -  insert a node in list after a specified node<br><b><i><a href="./VXWList.html#VXWList::last">VXWList::last</a></i>(&nbsp;)</b>  -  find the last node in list<br><b><i><a href="./VXWList.html#VXWList::next">VXWList::next</a></i>(&nbsp;)</b>  -  find the next node in list<br><b><i><a href="./VXWList.html#VXWList::nStep">VXWList::nStep</a></i>(&nbsp;)</b>  -  find a list node <i>nStep</i> steps away from a specified node<br><b><i><a href="./VXWList.html#VXWList::nth">VXWList::nth</a></i>(&nbsp;)</b>  -  find the Nth node in a list<br><b><i><a href="./VXWList.html#VXWList::previous">VXWList::previous</a></i>(&nbsp;)</b>  -  find the previous node in list<br><b><i><a href="./VXWList.html#VXWList::remove">VXWList::remove</a></i>(&nbsp;)</b>  -  delete a specified node from list<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>The VXWList class supports the creation and maintenance of a doublylinked list.  The class contains pointers to the first and lastnodes in the list, and a count of the number of nodes in the list.The nodes in the list are derived from the structure NODE, whichprovides two pointers: <b>NODE::next</b> and <b>NODE::previous</b>.Both the forward and backward chains are terminated with a NULL pointer.<p>The VXWList class simply manipulates the linked-list data structures;no kernel functions are invoked.  In particular, linked lists by themselvesprovide no task synchronization or mutual exclusion.  If multiple tasks willaccess a single linked list, that list must be guarded with somemutual-exclusion mechanism (such as a mutual-exclusion semaphore).<p></blockquote><h4>NON-EMPTY LIST</h4><blockquote><p><p><pre>   ---------             --------          --------   | head---------------&gt;| next-----------&gt;| next---------   |       |             |      |          |      |      |   |       |       ------- prev |&lt;---------- prev |      |   |       |       |     |      |          |      |      |   | tail------    |     | ...  |    -----&gt;| ...  |      |   |       |  |    v                 |                   v   |count=2|  |  -----               |                 -----   ---------  |   ---                |                  ---              |    -                 |                   -              |                      |              ------------------------</pre></blockquote><h4>EMPTY LIST</h4><blockquote><p><p><pre>        -----------        |  head------------------        |         |             |        |  tail----------       |        |         |     |       v        | count=0 |   -----   -----        -----------    ---     ---                        -    -</pre></blockquote><h4>WARNINGS</h4><blockquote><p>Use only single inheritance!  This class is an interface to theVxWorks library lstLib.  More sophisticated alternatives areavailable in the <b>Tools.h</b>++ class libraries.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following example illustrates how to create a list by derivingelements from NODE and putting them on a VXWList.<p><pre>class myListNode : public NODE    {  public:    myListNode ()     {     }  private:    };VXWList      myList;myListNode   a, b, c;NODE       * pEl = &amp;c;void useList ()    {    myList.add (&amp;a);    myList.insert (pEl, &amp;b);    }</pre></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>vxwLstLib.h</b><p><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWList.html#top">VXWList</a></b><hr><a name="VXWList::VXWList"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWList::VXWList</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWList::VXWList</i>(&nbsp;)</strong> - initialize a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>    VXWList ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This constructor initializes a list as an empty list.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWList.html#top">VXWList</a></b><hr><a name="VXWList::VXWList_1"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWList::VXWList</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWList::VXWList</i>(&nbsp;)</strong> - initialize a list as a copy of another</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>VXWList    (    const VXWList &    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This constructor builds a new list as a copy of an existing list.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWList.html#top">VXWList</a></b><hr><a name="VXWList::~VXWList"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWList::~VXWList</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWList::~VXWList</i>(&nbsp;)</strong> - free up a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>    ~VXWList ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This destructor frees up memory used for nodes.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWList.html#top">VXWList</a></b><hr><a name="VXWList::add"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWList::add</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWList::add</i>(&nbsp;)</strong> - add a node to the end of list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void add    (    NODE * pNode    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds a specified node to the end of the list.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWList.html#top">VXWList</a></b><hr><a name="VXWList::concat"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWList::concat</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWList::concat</i>(&nbsp;)</strong> - concatenate two lists</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void concat    (    VXWList &aList    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine concatenates the specified list to the end of the current list.The specified list is left empty.  Either list (or both) can beempty at the beginning of the operation.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWList.html#top">VXWList</a></b><hr><a name="VXWList::count"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWList::count</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWList::count</i>(&nbsp;)</strong> - report the number of nodes in a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>    int count ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the number of nodes in a specified list.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>The number of nodes in the list.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./VXWList.html#top">VXWList</a></b><hr><a name="VXWList::extract"></a><p align=right><a href="rtnIndex.html"><i>Wind Foundation Classes :  Methods</i></a></p></blockquote><h1><i>VXWList::extract</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>VXWList::extract</i>(&nbsp;)</strong> - extract a sublist from list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>LIST extract    (    NODE * pStart,    NODE * pEnd    )</pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -