Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 1232

wt-doc-3.2.3-1.fc18.noarch.rpm

<!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"/>
<title>Wt: Wt::Dbo::weak_ptr&lt; C &gt; Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Wt
   &#160;<span id="projectnumber">3.2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <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>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </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="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a>      </li>
      <li class="navelem"><a class="el" href="namespaceWt_1_1Dbo.html">Dbo</a>      </li>
      <li class="navelem"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::Dbo::weak_ptr&lt; C &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__dbo.html">Database Objects (Wt::Dbo)</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::Dbo::weak_ptr" -->
<p>A weak pointer for a database object.  
 <a href="classWt_1_1Dbo_1_1weak__ptr.html#details">More...</a></p>

<p><code>#include &lt;Wt/Dbo/weak_ptr&gt;</code></p>

<p><a href="classWt_1_1Dbo_1_1weak__ptr-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#ad66ef2f74e0242eec03488f4a534d161">weak_ptr</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new weak pointer.  <a href="#ad66ef2f74e0242eec03488f4a534d161"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6fcd8683e81f1a8e30b3b72f9bd98eaa"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::weak_ptr" ref="a6fcd8683e81f1a8e30b3b72f9bd98eaa" args="(const weak_ptr&lt; C &gt; &amp;other)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a6fcd8683e81f1a8e30b3b72f9bd98eaa">weak_ptr</a> (const <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;other)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a3ab3b78fba6dcdb657688cce05abb622">reset</a> (C *obj=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the value.  <a href="#a3ab3b78fba6dcdb657688cce05abb622"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a0e9ad1c975f81deb6c84f2e0729441e2">operator=</a> (const <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;other)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator.  <a href="#a0e9ad1c975f81deb6c84f2e0729441e2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a0ca7f9b95f69c755cc8c7df1d0f211fd">operator=</a> (const <a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt; &amp;other)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator.  <a href="#a0ca7f9b95f69c755cc8c7df1d0f211fd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const C *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a538df66d4e143c372df1e4b6d6cd42fa">operator-&gt;</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dereference operator.  <a href="#a538df66d4e143c372df1e4b6d6cd42fa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">C *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a8ed7e6eb2807e52dfbe2e579f4fd1802">modify</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dereference operator, for writing.  <a href="#a8ed7e6eb2807e52dfbe2e579f4fd1802"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a57b32ae3897b65ef98496c4b52fc31f3">operator==</a> (const <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Comparison operator.  <a href="#a57b32ae3897b65ef98496c4b52fc31f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a47d41108ffbb8bf34b697404d4b32883">operator==</a> (const <a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt; &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Comparison operator.  <a href="#a47d41108ffbb8bf34b697404d4b32883"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a54d6de12820954bfee289fdcc2d051cf">operator!=</a> (const <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Comparison operator.  <a href="#a54d6de12820954bfee289fdcc2d051cf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a77999ff9a0499bbcd77131b284aedd6b">operator!=</a> (const <a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt; &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Comparison operator.  <a href="#a77999ff9a0499bbcd77131b284aedd6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a9083ae4fd9eda8d0ee695bd0785b81d7">operator bool</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks for null.  <a href="#a9083ae4fd9eda8d0ee695bd0785b81d7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a7ad82f37f30b4dc467a3017183d83ba1">operator ptr&lt; C &gt;</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Casting operator to a ptr.  <a href="#a7ad82f37f30b4dc467a3017183d83ba1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a0644010958fecb882ddb64510a2c377d">query</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Promotes to a ptr.  <a href="#a0644010958fecb882ddb64510a2c377d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#abd9ba3eca68c4de65ecfdd493e35aed4">lock</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Promotes to a ptr.  <a href="#abd9ba3eca68c4de65ecfdd493e35aed4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structWt_1_1Dbo_1_1dbo__traits.html">dbo_traits</a>&lt; C &gt;::IdType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#ac8d8a7184c97bbc991b30ab2e57a0abe">id</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the object id.  <a href="#ac8d8a7184c97bbc991b30ab2e57a0abe"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class C&gt;<br/>
class Wt::Dbo::weak_ptr&lt; C &gt;</h3>

<p>A weak pointer for a database object. </p>
<p>A <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html" title="A weak pointer for a database object.">weak_ptr</a> has similar API and capabilities as a ptr, but does not actually store a reference to the object itself. Instead, it uses a query to retrieve the object.</p>
<p>It is used only to implement a OneToOne relation:</p>
<ul>
<li>class A hasOne class B object, in a <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html" title="A weak pointer for a database object.">weak_ptr</a></li>
<li>class B belongsTo a class A object, in a ptr</li>
</ul>
<p>This cannot be implemented using two plain ptr's because otherwise a cycle would be created which interferes with the count-based shared pointer implementation of ptr.</p>
<p>Only in a OneToOne relation, the required querying logic for the <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html" title="A weak pointer for a database object.">weak_ptr</a> to function properly is provided by the <a class="el" href="group__dbo.html#ga00a060d5f4764f673948989f21837548" title="Maps the &quot;One&quot;-side of a OneToOne relation.">hasOne()</a> call, and thus a <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html" title="A weak pointer for a database object.">weak_ptr</a> cannot be used outside of a OneToOne relation.</p>
<p>The <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html" title="A weak pointer for a database object.">weak_ptr</a> has almost the same capabilities as a ptr, except that it does not provide a dereference operator (*).</p>
<p>It's important to realize that reading a <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html" title="A weak pointer for a database object.">weak_ptr</a> results in a query, and thus you may want to first convert the <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html" title="A weak pointer for a database object.">weak_ptr</a> into a plain ptr when needing multiple operations. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad66ef2f74e0242eec03488f4a534d161"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::weak_ptr" ref="ad66ef2f74e0242eec03488f4a534d161" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::<a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new weak pointer. </p>
<p>The ptr does not point to anything. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac8d8a7184c97bbc991b30ab2e57a0abe"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::id" ref="ac8d8a7184c97bbc991b30ab2e57a0abe" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structWt_1_1Dbo_1_1dbo__traits.html">dbo_traits</a>&lt; C &gt;::IdType <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::id </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the object id. </p>
<p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="abd9ba3eca68c4de65ecfdd493e35aed4"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::lock" ref="abd9ba3eca68c4de65ecfdd493e35aed4" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt;C&gt; <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::lock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Promotes to a ptr. </p>
<p>Returns the value as a plain ptr.</p>
<p>Since this needs to query the value, you should have an active transaction.</p>
<p>This is equivalent to <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a0644010958fecb882ddb64510a2c377d" title="Promotes to a ptr.">query()</a> or the ptr&lt;C&gt; cast operator. </p>

</div>
</div>
<a class="anchor" id="a8ed7e6eb2807e52dfbe2e579f4fd1802"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::modify" ref="a8ed7e6eb2807e52dfbe2e579f4fd1802" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt;::mutator <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::modify </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dereference operator, for writing. </p>
<p>Returns the underlying object (or, rather, a proxy for it) with the intention to modify it. The proxy object will mark the object as dirty from its destructor. An involved modification should therefore preferably be implemented as a separate method or function to make sure that the object is marked as dirty after the whole modification: </p>
<div class="fragment"><pre class="fragment">   weak_ptr&lt;A&gt; a = ...;
   a.modify()-&gt;doSomething();
</pre></div><p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a9083ae4fd9eda8d0ee695bd0785b81d7"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator bool" ref="a9083ae4fd9eda8d0ee695bd0785b81d7" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator bool </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks for null. </p>
<p>Returns true if the pointer is pointing to a non-null object.</p>
<p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a7ad82f37f30b4dc467a3017183d83ba1"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator ptr&lt; C &gt;" ref="a7ad82f37f30b4dc467a3017183d83ba1" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator <a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Casting operator to a ptr. </p>
<p>Returns the value as a plain ptr.</p>
<p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a54d6de12820954bfee289fdcc2d051cf"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator!=" ref="a54d6de12820954bfee289fdcc2d051cf" args="(const weak_ptr&lt; C &gt; &amp;other) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Comparison operator. </p>
<p>Two pointers are equal if and only if they reference the same database object.</p>
<p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a77999ff9a0499bbcd77131b284aedd6b"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator!=" ref="a77999ff9a0499bbcd77131b284aedd6b" args="(const ptr&lt; C &gt; &amp;other) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Comparison operator. </p>
<p>Two pointers are equal if and only if they reference the same database object.</p>
<p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a538df66d4e143c372df1e4b6d6cd42fa"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator&#45;&gt;" ref="a538df66d4e143c372df1e4b6d6cd42fa" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt;::accessor <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator-&gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dereference operator. </p>
<p>Note that this operator returns a const copy of the referenced object. Use <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#a8ed7e6eb2807e52dfbe2e579f4fd1802" title="Dereference operator, for writing.">modify()</a> to get a non-const reference.</p>
<p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a0e9ad1c975f81deb6c84f2e0729441e2"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator=" ref="a0e9ad1c975f81deb6c84f2e0729441e2" args="(const weak_ptr&lt; C &gt; &amp;other)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp; <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assignment operator. </p>
<p>Since this needs to query the previous value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a0ca7f9b95f69c755cc8c7df1d0f211fd"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator=" ref="a0ca7f9b95f69c755cc8c7df1d0f211fd" args="(const ptr&lt; C &gt; &amp;other)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp; <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assignment operator. </p>
<p>Since this needs to query the previous value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a57b32ae3897b65ef98496c4b52fc31f3"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator==" ref="a57b32ae3897b65ef98496c4b52fc31f3" args="(const weak_ptr&lt; C &gt; &amp;other) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">weak_ptr</a>&lt; C &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Comparison operator. </p>
<p>Two pointers are equal if and only if they reference the same database object.</p>
<p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a47d41108ffbb8bf34b697404d4b32883"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::operator==" ref="a47d41108ffbb8bf34b697404d4b32883" args="(const ptr&lt; C &gt; &amp;other) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Comparison operator. </p>
<p>Two pointers are equal if and only if they reference the same database object.</p>
<p>Since this needs to query the value, you should have an active transaction. </p>

</div>
</div>
<a class="anchor" id="a0644010958fecb882ddb64510a2c377d"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::query" ref="a0644010958fecb882ddb64510a2c377d" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1ptr.html">ptr</a>&lt; C &gt; <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::query </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Promotes to a ptr. </p>
<p>Returns the value as a plain ptr.</p>
<p>Since this needs to query the value, you should have an active transaction.</p>
<p>This is equivalent to <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html#abd9ba3eca68c4de65ecfdd493e35aed4" title="Promotes to a ptr.">lock()</a> or the ptr&lt;C&gt; cast operator. </p>

</div>
</div>
<a class="anchor" id="a3ab3b78fba6dcdb657688cce05abb622"></a><!-- doxytag: member="Wt::Dbo::weak_ptr::reset" ref="a3ab3b78fba6dcdb657688cce05abb622" args="(C *obj=0)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1weak__ptr.html">Wt::Dbo::weak_ptr</a>&lt; C &gt;::reset </td>
          <td>(</td>
          <td class="paramtype">C *&#160;</td>
          <td class="paramname"><em>obj</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the value. </p>
<p>This is assigns a new value, and: </p>
<div class="fragment"><pre class="fragment">  p.reset(obj);
</pre></div><p> is equivalent to: </p>
<div class="fragment"><pre class="fragment">  p = <a class="code" href="classWt_1_1Dbo_1_1ptr.html" title="A smart pointer for a database object.">Wt::Dbo::ptr&lt;T&gt;</a>(obj);
</pre></div><p>Since this needs to query the previous value, you should have an active transaction. </p>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"><address style="text-align: right; margin: 3px"><small>
Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<a
href="http://www.doxygen.org/index.html"><img src="doxygen.png"
alt="doxygen" border="0" style="vertical-align: middle; display:
inline-block; height: 2em"></a> 1.7.5.1</small></address>
</body>
</html>