chromium/native_client_sdk/doc_generated/pepper_stable/cpp/classpp_1_1_var_1_1_out_exception.html

{{+bindTo:partials.standard_nacl_api}}
<h1>pp::Var::OutException Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
  <div>
<!-- Generated by Doxygen 1.7.6.1 -->



</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="pp::Var::OutException" -->
<p><a href="classpp_1_1_var_1_1_out_exception-members.html">List of all members.</a></p>
<h2>
Public Member Functions</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_var_1_1_out_exception.html#afa4be8888c046a7b4f54be2cec82e4e7">OutException</a> (<a class="el" href="classpp_1_1_var.html">Var</a> *v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_var_1_1_out_exception.html#af2300053414367146b49f6f71c2eb513">~OutException</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_Var *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_var_1_1_out_exception.html#ae27bafd88243e3b2fffc3038a1f31971">get</a> ()</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This class is used when calling the raw C PPAPI when using the C++ <code><a class="el" href="classpp_1_1_var.html" title="A generic type used for passing data types between the module and the page.">Var</a></code> as a possible NULL exception. </p>
<p>This class will handle getting the address of the internal value out if it's non-NULL and fixing up the reference count.</p>
<p><b>Warning:</b> this will only work for things with exception semantics, i.e. that the value will not be changed if it's a non-undefined exception. Otherwise, this class will mess up the refcounting.</p>
<p>This is a bit subtle:</p>
<ul>
<li>If NULL is passed, we return NULL from <a class="el" href="classpp_1_1_var_1_1_out_exception.html#ae27bafd88243e3b2fffc3038a1f31971">get()</a> and do nothing.</li>
</ul>
<ul>
<li>If a undefined value is passed, we return the address of a undefined var from get and have the output value take ownership of that var.</li>
</ul>
<ul>
<li>If a non-undefined value is passed, we return the address of that var from get, and nothing else should change.</li>
</ul>
<p>Example: void FooBar(a, b, Var* exception = NULL) { foo_interface-&gt;Bar(a, b, Var::OutException(exception).<a class="el" href="classpp_1_1_var_1_1_out_exception.html#ae27bafd88243e3b2fffc3038a1f31971">get()</a>); } </p>
</div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="afa4be8888c046a7b4f54be2cec82e4e7"></a><!-- doxytag: member="pp::Var::OutException::OutException" ref="afa4be8888c046a7b4f54be2cec82e4e7" args="(Var *v)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_var_1_1_out_exception.html#afa4be8888c046a7b4f54be2cec82e4e7">pp::Var::OutException::OutException</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classpp_1_1_var.html">Var</a> *&#160;</td>
<td class="paramname"><em>v</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor. </p>
</div>
</div>
<a class="anchor" id="af2300053414367146b49f6f71c2eb513"></a><!-- doxytag: member="pp::Var::OutException::~OutException" ref="af2300053414367146b49f6f71c2eb513" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_var_1_1_out_exception.html#af2300053414367146b49f6f71c2eb513">pp::Var::OutException::~OutException</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="ae27bafd88243e3b2fffc3038a1f31971"></a><!-- doxytag: member="pp::Var::OutException::get" ref="ae27bafd88243e3b2fffc3038a1f31971" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_Var* <a class="el" href="classpp_1_1_var_1_1_out_exception.html#ae27bafd88243e3b2fffc3038a1f31971">pp::Var::OutException::get</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="var_8h.html">var.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}