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

📄 lists.strlist.html

📁 PTypes (C++ Portable Types Library) is a simple alternative to the STL that includes multithreading
💻 HTML
字号:
<html><!-- #BeginTemplate "/Templates/tmpl.dwt" --><head><!-- #BeginEditable "doctitle" --> <title>PTypes: lists: strlist</title><!-- #EndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="styles.css"></head><body bgcolor="#FFFFFF" leftmargin="40" marginwidth="40"><p><a href="../index.html"><img src="title-1.7.gif" width="213" height="34" alt="C++ Portable Types Library (PTypes) Version 1.7" border="0"></a> <hr noshade><!-- #BeginEditable "body" --> <p class="hpath"><a href="index.html">Top</a>: <a href="basic.html">Basic types</a>: <a href="lists.html">Lists</a>: strlist</p><ul><li> <h5><a href="lists.strlist.constructors.html">Constructors/destructors</a></h5></li><li> <h5><a href="lists.strlist.manipulation.html">Manipulation</a></h5></li><li> <h5><a href="lists.strlist.search.html">Search</a></h5></li></ul><p>The <span class="lang">strlist</span> class is a dynamic array of strings, optionally sorted. A pointer to an object derived from <span class="lang">unknown</span> can be associated with each string of the string list, thus, string lists can be used as containers of either strings, objects, or string/object pairs. <span class="lang">Strlist</span> itself is derived from <span class="lang">unknown</span>.</p><p>If a string list was constructed with SL_SORTED flag, then strings or string/object pairs are kept in alphabetical order. Whether the sorting is case sensitive or not can also be specified during construction. Keeping the list sorted assures that a string or an object associated with a string can be found relatively faster.</p><p>When an item is removed from the list, or the entire list is cleared (using <span class="lang">clear()</span> function) or destroyed, the objects associated with strings are not freed from memory unless the option SL_OWNOBJECTS is specified. &quot;Owning objects&quot; means the string list is responsible for destroying and freeing its member objects.</p><p>A class template named <span class="lang">tstrlist</span>, fully compatible with <span class="lang">strlist</span>, is provided for better type checking at compile time. If you declare a variable, for example, of type <span class="lang">tstrlist&lt;myclass&gt;</span>, all manipulation functions for this variable will accept and return pointers to <span class="lang">myclass</span>, instead of <span class="lang">unknown</span>.</p><p>This class is declared in <span class="lang">&lt;ptypes.h&gt;</span> header file.</p><p class="seealso">See also: <a href="unknown.html">unknown</a>, <a href="lists.strlist.constructors.html">Constructors/destructors</a>, <a href="lists.strlist.manipulation.html">Manipulation</a>, <a href="lists.strlist.search.html">Search</a></p><!-- #EndEditable --> <hr size="1"><a href="../index.html" class="ns">PTypes home</a></body><!-- #EndTemplate --></html>

⌨️ 快捷键说明

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