📄 lists.strmap.constructors.html
字号:
<html><!-- #BeginTemplate "/Templates/tmpl.dwt" --><head><!-- #BeginEditable "doctitle" --> <title>PTypes: lists: strmap: 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.strmap.html">strmap</a>: Constructors/destructors</p><blockquote> <pre class="lang">#include <ptypes.h>enum slflags { SL_SORTED = 0x0001, <span class="comment">// has no effect for strmap</span> SL_DUPLICATES = 0x0002, <span class="comment">// has no effect for strmap</span> SL_CASESENS = 0x0004, SL_OWNOBJECTS = 0x0008};strmap::strmap();strmap::strmap(slflags iflags);virtual strmap::~strmap();</pre></blockquote><p><span class="def">strmap::strmap()</span> -- the default constructor creates a string map which does not own objects.</p><p><span class="def">strmap::strmap(slflags iflags)</span> -- with this constructor additional options can be specified (unlike <span class="lang">strlist</span> only two of the flags are allowed here):</p><blockquote> <p> <span class="lang">SL_CASESENS</span> -- the comparison of the strings is case sensitive.</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 map object itself is being destroyed.</p></blockquote><p>These features are set only during construction of a string map object and can not be changed later.</p><p><span class="def"> strmap::~strmap()</span> -- destroys member objects if <span class="lang">SL_OWNOBJECTS</span> was specified during creation of this string map.</p><p class="seealso">See also: <a href="lists.strmap.manipulation.html">Manipulation</a>, <a href="lists.strmap.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 + -