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

📄 lists.strmap.manipulation.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: strmap: manipulation</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>: Manipulation </p><blockquote> <pre class="lang">#include &lt;ptypes.h&gt;void  clear(strmap& s);void  put(strmap& s, const string& str, unknown* obj);void  del(strmap& s, const string&amp; str);</pre></blockquote><p><span class="def">clear(strmap& s)</span> clears all items of the string map <span class="lang">s</span>. This function may also destroy all objects if the flag <span class="lang">SL_OWNOBJECTS</span> was specified during construction of the string map.</p><p><span class="def">put(strmap& s, const string& str, unknown* obj)</span> adds the given string <span class="lang">str</span> to the list and associates the string with the object <span class="lang">obj</span>. If an item associated with the same string already exists in the map, the previous object is removed from the map, and the new one is placed instead. Additionally, the previous object may be destroyed if the string map object was created with the flag <span class="lang">SL_OWNOBJECTS</span>. If the parameter <span class="lang">obj</span> is <span class="lang">NULL</span>, the item is removed from the map.</p><p><span class="def">del(strlist& s, const string&amp; str)</span> removes the item associated with the string <span class="lang">str</span> from the map. Calling <span class="lang">put(s, str, NULL)</span> has the same effect.</p><p class="seealso">See also: <a href="lists.strmap.constructors.html">Constructors/destructors</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 + -