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

📄 lists.strlist.constructors.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: constructors/destructors</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>: <a href="lists.strlist.html">strlist</a>: Constructors/destructors</p><blockquote> <pre class="lang">#include &lt;ptypes.h&gt;enum slflags {    SL_SORTED = 0x0001,    SL_DUPLICATES = 0x0002,    SL_CASESENS = 0x0004,    SL_OWNOBJECTS = 0x0008};strlist::strlist();strlist::strlist(slflags iflags);virtual strlist::~strlist();</pre></blockquote><p><span class="def">strlist::strlist()</span> -- default constructor; creates an unsorted string list which does not own objects.</p><p><span class="def">strlist::strlist(slflags iflags)</span> -- with this constructor additional options can be specified:</p><blockquote> <p> <span class="lang">SL_SORTED</span> -- the string list is always kept in alphabetical order</p><p><span class="lang">SL_DUPLICATES</span> -- the sorted list allows duplicate items. If this option was turned off and an attempt was made to insert an item which already exists in the list, an unrecoverable error is raised.</p><p><span class="lang">SL_CASESENS</span> -- the comparison is case sensitive for sorted lists.</p><p><span class="lang">SL_OWNOBJECTS</span> -- the objects are destroyed whenever either an item is removed from the list using <span class="lang">del()</span> function, or the function <span class="lang">clear()</span> is called, or the string list object itself is being destroyed.</p></blockquote><p>These features are set only during construction of a string list object and can not be changed later.</p><p><span class="def"> strlist::~strlist()</span> -- destroys member objects if <span class="lang">SL_OWNOBJECTS</span> was specified during creation of this string list, or otherwise only destroys the array and the strings.</p><p class="seealso">See also: <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 + -