📄 lists.strmap.html
字号:
<html><!-- #BeginTemplate "/Templates/tmpl.dwt" --><head><!-- #BeginEditable "doctitle" --> <title>PTypes: lists: strmap</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>: strmap</p><ul><li> <h5><a href="lists.strmap.constructors.html">Constructors/destructors</a></h5></li><li> <h5><a href="lists.strmap.manipulation.html">Manipulation</a></h5></li><li> <h5><a href="lists.strmap.search.html">Search</a></h5></li></ul><p>The <span class="lang">strmap</span> class is a dynamic array of objects derived from <span class="lang">unknown</span>, where each object is associated with a string. Unlike <span class="lang">strlist</span>, <span class="lang">strmap</span> does not provide indexed access to the stored items, it can only retrieve an object by a string value. The searching algorithm is hidden and can be changed in the future releases of PTypes.</p><p><span class="lang">Strmap</span> itself is indirectly derived from <span class="lang">unknown</span>.</p><p>Like in <span class="lang">strlist</span>, 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 string map was created with <span class="lang">SL_OWNOBJECTS</span> flag. "Owning objects" means the string map is responsible for destroying and freeing its member objects.</p><p>A class template named <span class="lang">tstrmap</span>, fully compatible with <span class="lang">strmap</span>, is provided for better type checking at compile time. If you declare a variable, for example, of type <span class="lang">tstrmap<myclass></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"><ptypes.h></span> header file.</p><p class="seealso">See also: <a href="lists.strmap.constructors.html">Constructors/destructors</a>, <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 + -