Update docs for shared_ptr

This commit is contained in:
William S Fulton 2015-10-01 20:30:09 +01:00
commit 803ba97a83
6 changed files with 101 additions and 2 deletions

View file

@ -38,6 +38,10 @@
<li><a href="#Python_nn25">C++ namespaces</a>
<li><a href="#Python_nn26">C++ templates</a>
<li><a href="#Python_nn27">C++ Smart Pointers</a>
<ul>
<li><a href="#Python_smart_pointers_shared_ptr">The shared_ptr Smart Pointer</a>
<li><a href="#Python_smart_pointers_generic">Generic Smart Pointers</a>
</ul>
<li><a href="#Python_nn27a">C++ reference counted objects</a>
</ul>
<li><a href="#Python_nn28">Further details on the Python class interface</a>
@ -2000,6 +2004,20 @@ examples will appear later.
<H3><a name="Python_nn27"></a>36.3.14 C++ Smart Pointers</H3>
<H4><a name="Python_smart_pointers_shared_ptr"></a>36.3.14.1 The shared_ptr Smart Pointer</H4>
<p>
The C++11 standard provides <tt>std::shared_ptr</tt> which was derived from the Boost
implementation, <tt>boost::shared_ptr</tt>.
Both of these are available for Python in the SWIG library and usage is outlined
in the <a href="Library.html#Library_std_shared_ptr">shared_ptr smart pointer</a> library section.
</p>
<H4><a name="Python_smart_pointers_generic"></a>36.3.14.2 Generic Smart Pointers</H4>
<p>
In certain C++ programs, it is common to use classes that have been wrapped by
so-called "smart pointers." Generally, this involves the use of a template class