<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.6"/>
<title>Boost.Locale: boost::locale::hold_ptr&lt; T &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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</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="projectlogo"><img alt="Logo" src="boost-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Boost.Locale
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classboost_1_1locale_1_1hold__ptr.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classboost_1_1locale_1_1hold__ptr-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">boost::locale::hold_ptr&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer).  
 <a href="classboost_1_1locale_1_1hold__ptr.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="hold__ptr_8hpp_source.html">boost/locale/hold_ptr.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a681ee3d579435f9f2f171b830c402072"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a681ee3d579435f9f2f171b830c402072">hold_ptr</a> ()</td></tr>
<tr class="separator:a681ee3d579435f9f2f171b830c402072"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0007514dc0410ccb16adf01c56874f52"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a0007514dc0410ccb16adf01c56874f52">hold_ptr</a> (T *v)</td></tr>
<tr class="separator:a0007514dc0410ccb16adf01c56874f52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aace934e7a8b3f1880d1a06fa85795a48"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#aace934e7a8b3f1880d1a06fa85795a48">~hold_ptr</a> ()</td></tr>
<tr class="separator:aace934e7a8b3f1880d1a06fa85795a48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a907a9385c1a15dab07aade7466620bf6"><td class="memItemLeft" align="right" valign="top">T const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a907a9385c1a15dab07aade7466620bf6">get</a> () const </td></tr>
<tr class="separator:a907a9385c1a15dab07aade7466620bf6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30dbc88eb9fde35198774f3ace282712"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a30dbc88eb9fde35198774f3ace282712">get</a> ()</td></tr>
<tr class="separator:a30dbc88eb9fde35198774f3ace282712"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c8a19e35ff3c57100b24371854f31b7"><td class="memItemLeft" align="right" valign="top">T const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a2c8a19e35ff3c57100b24371854f31b7">operator*</a> () const </td></tr>
<tr class="separator:a2c8a19e35ff3c57100b24371854f31b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af99f3719b755b787b022253aa6f8d1c0"><td class="memItemLeft" align="right" valign="top">T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#af99f3719b755b787b022253aa6f8d1c0">operator*</a> ()</td></tr>
<tr class="separator:af99f3719b755b787b022253aa6f8d1c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ae6b54ed5471dd9560904c7ff8a7971"><td class="memItemLeft" align="right" valign="top">T const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a7ae6b54ed5471dd9560904c7ff8a7971">operator-&gt;</a> () const </td></tr>
<tr class="separator:a7ae6b54ed5471dd9560904c7ff8a7971"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a474f2619452b63408e1e761f414328f4"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a474f2619452b63408e1e761f414328f4">operator-&gt;</a> ()</td></tr>
<tr class="separator:a474f2619452b63408e1e761f414328f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d7b2957c037589b65b2cdd4f61ebe03"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a2d7b2957c037589b65b2cdd4f61ebe03">release</a> ()</td></tr>
<tr class="separator:a2d7b2957c037589b65b2cdd4f61ebe03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb84b86bb220d663ffe13e5be9cfd72e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#acb84b86bb220d663ffe13e5be9cfd72e">reset</a> (T *p=0)</td></tr>
<tr class="separator:acb84b86bb220d663ffe13e5be9cfd72e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e2640b5df80f86aeb68a6ee78dfd6f9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e2640b5df80f86aeb68a6ee78dfd6f9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html#a3e2640b5df80f86aeb68a6ee78dfd6f9">swap</a> (<a class="el" href="classboost_1_1locale_1_1hold__ptr.html">hold_ptr</a> &amp;other)</td></tr>
<tr class="memdesc:a3e2640b5df80f86aeb68a6ee78dfd6f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap two pointers. <br/></td></tr>
<tr class="separator:a3e2640b5df80f86aeb68a6ee78dfd6f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br/>
class boost::locale::hold_ptr&lt; T &gt;</h3>

<p>a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer). </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a681ee3d579435f9f2f171b830c402072"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::<a class="el" href="classboost_1_1locale_1_1hold__ptr.html">hold_ptr</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create new empty pointer </p>

</div>
</div>
<a class="anchor" id="a0007514dc0410ccb16adf01c56874f52"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::<a class="el" href="classboost_1_1locale_1_1hold__ptr.html">hold_ptr</a> </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create a pointer that holds <em>v</em>, ownership is transferred to smart pointer </p>

</div>
</div>
<a class="anchor" id="aace934e7a8b3f1880d1a06fa85795a48"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::~<a class="el" href="classboost_1_1locale_1_1hold__ptr.html">hold_ptr</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Destroy smart pointer and the object it owns. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a907a9385c1a15dab07aade7466620bf6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T const* <a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get a const pointer to the object </p>

</div>
</div>
<a class="anchor" id="a30dbc88eb9fde35198774f3ace282712"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get a mutable pointer to the object </p>

</div>
</div>
<a class="anchor" id="a2c8a19e35ff3c57100b24371854f31b7"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T const&amp; <a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::operator* </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get a const reference to the object </p>

</div>
</div>
<a class="anchor" id="af99f3719b755b787b022253aa6f8d1c0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T&amp; <a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::operator* </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get a mutable reference to the object </p>

</div>
</div>
<a class="anchor" id="a7ae6b54ed5471dd9560904c7ff8a7971"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T const* <a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::operator-&gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get a const pointer to the object </p>

</div>
</div>
<a class="anchor" id="a474f2619452b63408e1e761f414328f4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::operator-&gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get a mutable pointer to the object </p>

</div>
</div>
<a class="anchor" id="a2d7b2957c037589b65b2cdd4f61ebe03"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::release </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Transfer an ownership on the pointer to user </p>

</div>
</div>
<a class="anchor" id="acb84b86bb220d663ffe13e5be9cfd72e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr</a>&lt; T &gt;::reset </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>p</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set new value to pointer, previous object is destroyed, ownership on new object is transferred </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>boost/locale/<a class="el" href="hold__ptr_8hpp_source.html">hold_ptr.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

    <li class="footer">
&copy; Copyright 2009-2012 Artyom Beilis,  Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0.
    </li>
   </ul>
 </div>
</body>
</html>
