1 Star 0 Fork 0

mobangjack / memory

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
classfoonathan_1_1memory_1_1allocator__polymorphic__deallocator.html 9.33 KB
一键复制 编辑 原始数据 按行查看 历史
Jonathan Müller 提交于 2020-05-05 17:04 . Update documentation
<!-- HTML header for doxygen 1.8.16-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>memory: allocator_polymorphic_deallocator&lt; BaseType, RawAllocator &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">memory
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="main-nav">
<ul class="sm sm-dox" id="main-menu">
<li><a href="index.html">Main Page</a></li>
<li><a href="md_doc_tutorial.html">Tutorial</a></li>
<li><a href="namespacefoonathan_1_1memory.html">Index</a></li>
<li><a href="files.html">Files</a></li>
</ul>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacefoonathan.html">foonathan</a></li><li class="navelem"><a class="el" href="namespacefoonathan_1_1memory.html">memory</a></li><li class="navelem"><a class="el" href="classfoonathan_1_1memory_1_1allocator__polymorphic__deallocator.html">allocator_polymorphic_deallocator</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Typedefs</a> &#124;
<a href="#pub-methods">Member Functions</a> </div>
<div class="headertitle">
<div class="title">allocator_polymorphic_deallocator&lt; BaseType, RawAllocator &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__adapter.html">Adapters and Wrappers</a></div></div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename BaseType, class RawAllocator&gt;<br />
class foonathan::memory::allocator_polymorphic_deallocator&lt; BaseType, RawAllocator &gt;</h3>
<p>A deleter class that deallocates the memory of a derived type through a specified <a href="md_doc_concepts.html#concept_rawallocator">RawAllocator</a>. </p>
<p>It can only be created from a <a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html">allocator_deallocator</a> and thus must only be used for smart pointers initialized by derived-to-base conversion of the pointer. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a7d9065faac8186bbc0793460883edb05"><td class="memItemLeft" align="right" valign="top"><a id="a7d9065faac8186bbc0793460883edb05"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>allocator_type</b> = typename <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>&lt; RawAllocator &gt;::allocator_type</td></tr>
<tr class="separator:a7d9065faac8186bbc0793460883edb05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2f2314f33892482b83189829315670f"><td class="memItemLeft" align="right" valign="top"><a id="af2f2314f33892482b83189829315670f"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>value_type</b> = BaseType</td></tr>
<tr class="separator:af2f2314f33892482b83189829315670f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Member Functions</h2></td></tr>
<tr class="memitem:ac412cd06b31f23da55629832e711c4a5"><td class="memTemplParams" colspan="2">template&lt;typename T , FOONATHAN_REQUIRES((std::is_base_of&lt; BaseType, T &gt;::value)) &gt; </td></tr>
<tr class="memitem:ac412cd06b31f23da55629832e711c4a5"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1allocator__polymorphic__deallocator.html#ac412cd06b31f23da55629832e711c4a5">allocator_polymorphic_deallocator</a> (<a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html">allocator_deallocator</a>&lt; T, RawAllocator &gt; dealloc)</td></tr>
<tr class="separator:ac412cd06b31f23da55629832e711c4a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a126343d6121aa750c8cd4473cb0a8f71"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1allocator__polymorphic__deallocator.html#a126343d6121aa750c8cd4473cb0a8f71">operator()</a> (value_type *pointer) noexcept</td></tr>
<tr class="separator:a126343d6121aa750c8cd4473cb0a8f71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cfad7a69c215de0ed8954f179fffb61"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1allocator__polymorphic__deallocator.html#a3cfad7a69c215de0ed8954f179fffb61">get_allocator</a> () const noexcept -&gt; decltype(std::declval&lt; <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>&lt; allocator_type &gt;&gt;().get_allocator())</td></tr>
<tr class="separator:a3cfad7a69c215de0ed8954f179fffb61"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructors</h2>
<a id="ac412cd06b31f23da55629832e711c4a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac412cd06b31f23da55629832e711c4a5">&#9670;&nbsp;</a></span>allocator_polymorphic_deallocator()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfoonathan_1_1memory_1_1allocator__polymorphic__deallocator.html">allocator_polymorphic_deallocator</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html">allocator_deallocator</a>&lt; T, RawAllocator &gt;&#160;</td>
<td class="paramname"><em>dealloc</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Creates it from a deallocator for a derived type. It will deallocate the memory as if done by the derived type. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Functions</h2>
<a id="a126343d6121aa750c8cd4473cb0a8f71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a126343d6121aa750c8cd4473cb0a8f71">&#9670;&nbsp;</a></span>operator()()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void operator() </td>
<td>(</td>
<td class="paramtype">value_type *&#160;</td>
<td class="paramname"><em>pointer</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Deallocates the memory given to it. Calls <code>deallocate_node(pointer, size, alignment)</code> on the referenced allocator object, where <code>size</code> and <code>alignment</code> are the values of the type it was created with. </dd></dl>
</div>
</div>
<a id="a3cfad7a69c215de0ed8954f179fffb61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cfad7a69c215de0ed8954f179fffb61">&#9670;&nbsp;</a></span>get_allocator()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto get_allocator </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const -&gt; decltype(std::declval&lt;<a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>&lt;allocator_type&gt;&gt;().get_allocator())
</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Returns:</dt><dd>The reference to the allocator. It has the same type as the call to <a class="el" href="classfoonathan_1_1memory_1_1allocator__storage.html#ad0e22f6844a93ca183a896dc1e863a50">allocator_reference::get_allocator()</a>. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.16-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
1
https://gitee.com/mobangjack/memory.git
git@gitee.com:mobangjack/memory.git
mobangjack
memory
memory
gh-pages

搜索帮助