Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > d8d30ad953f2dbe7e871721325480315 > files > 389

librttr-devel-0.9.6-1.mga7.armv7hl.rpm

<!-- HTML header for doxygen 1.8.8-->
<!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="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.15"/>
        <script type="text/javascript" src="jquery.min.js"></script>
        <title>rttr: rttr::policy::prop Struct Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link rel = "shortcut icon" type = "image/x-icon" href = "favicon.ico">
        <link rel = "stylesheet" href = "fonts/ptsans_regular_macroman/stylesheet.css">
        <link rel = "stylesheet" href = "fonts/source_code_pro_regular/stylesheet.css">
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="custom-doxygen.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" href="custom-bootstrap.css">
        <script src="bootstrap/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="doxy-boot.js"></script>
    </head>
    <body>
     <!--
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">rttr 0.9.6</a>
                </div>
            </div>
        </nav>
        -->
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacerttr.html">rttr</a></li><li class="navelem"><a class="el" href="structrttr_1_1policy.html">policy</a></li><li class="navelem"><a class="el" href="structrttr_1_1policy_1_1prop.html">prop</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="structrttr_1_1policy_1_1prop-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">rttr::policy::prop Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="structrttr_1_1policy_1_1prop.html">prop</a> class groups all policies that can be used during registration of properties.  
 <a href="structrttr_1_1policy_1_1prop.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="policy_8h_source.html">policy.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a6e551c5748cfaad0d8f1afc353817f78"><td class="memItemLeft" align="right" valign="top">static const detail::as_reference_wrapper&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrttr_1_1policy_1_1prop.html#a6e551c5748cfaad0d8f1afc353817f78">as_reference_wrapper</a></td></tr>
<tr class="memdesc:a6e551c5748cfaad0d8f1afc353817f78"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="structrttr_1_1policy_1_1prop.html#a6e551c5748cfaad0d8f1afc353817f78">as_reference_wrapper</a> policy will bind a member object as <em>std::reference_wrapper</em> type.  <a href="#a6e551c5748cfaad0d8f1afc353817f78">More...</a><br /></td></tr>
<tr class="separator:a6e551c5748cfaad0d8f1afc353817f78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af18a7107143029acd396d39abfd8c94c"><td class="memItemLeft" align="right" valign="top">static const detail::bind_as_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrttr_1_1policy_1_1prop.html#af18a7107143029acd396d39abfd8c94c">bind_as_ptr</a></td></tr>
<tr class="memdesc:af18a7107143029acd396d39abfd8c94c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="structrttr_1_1policy_1_1prop.html#af18a7107143029acd396d39abfd8c94c">bind_as_ptr</a> policy will bind a member object as <em>pointer</em> type.  <a href="#af18a7107143029acd396d39abfd8c94c">More...</a><br /></td></tr>
<tr class="separator:af18a7107143029acd396d39abfd8c94c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="structrttr_1_1policy_1_1prop.html">prop</a> class groups all policies that can be used during registration of properties. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="a6e551c5748cfaad0d8f1afc353817f78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e551c5748cfaad0d8f1afc353817f78">&#9670;&nbsp;</a></span>as_reference_wrapper</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const detail::as_reference_wrapper rttr::policy::prop::as_reference_wrapper</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The <a class="el" href="structrttr_1_1policy_1_1prop.html#a6e551c5748cfaad0d8f1afc353817f78">as_reference_wrapper</a> policy will bind a member object as <em>std::reference_wrapper</em> type. </p>
<p>This can be useful when binding big data types, like arrays, to avoid copies during get/set of the property.</p>
<p>See following example code: </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacerttr.html">rttr</a>;</div><div class="line"><span class="keyword">struct </span>Foo</div><div class="line">{</div><div class="line">  std::vector&lt;int&gt; vec;</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="registration_8h.html#ac6326400f16225ee15b52eabcaae8130">RTTR_REGISTRATION</a></div><div class="line">{</div><div class="line">     <a class="code" href="classrttr_1_1registration_1_1class__.html">registration::class_&lt;Foo&gt;</a>(<span class="stringliteral">&quot;Foo&quot;</span>)</div><div class="line">                  .<a class="code" href="classrttr_1_1registration_1_1class__.html#a005a60417fb6d183af475cb4059dc0a0">property</a>(<span class="stringliteral">&quot;vec&quot;</span>, &amp;Foo::vec)</div><div class="line">                  (</div><div class="line">                      <a class="code" href="structrttr_1_1policy_1_1prop.html#a6e551c5748cfaad0d8f1afc353817f78">policy::prop::as_reference_wrapper</a></div><div class="line">                  );</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line">  Foo obj;</div><div class="line">  <span class="keyword">property</span> prop = type::get&lt;Foo&gt;().get_property(<span class="stringliteral">&quot;vec&quot;</span>);</div><div class="line">  <a class="code" href="classrttr_1_1variant.html">variant</a> var = prop.<a class="code" href="classrttr_1_1variant.html#aa3a9f7e07cdc4d922a4e09882c5c0574">get_value</a>(obj);</div><div class="line">  std::cout &lt;&lt; var.<a class="code" href="classrttr_1_1variant.html#a8a2fe635a8452ac3a2370589d6fc4bfb">is_type</a>&lt;std::reference_wrapper&lt;std::vector&lt;int&gt;&gt;&gt;(); <span class="comment">// prints &quot;true&quot;</span></div><div class="line">  prop.set_value(obj, var);      <span class="comment">// not really necessary, but remark that now a std::reference_wrapper&lt;std::vector&lt;int&gt;&gt; is expected</span></div><div class="line">  <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> 
</div>
</div>
<a id="af18a7107143029acd396d39abfd8c94c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af18a7107143029acd396d39abfd8c94c">&#9670;&nbsp;</a></span>bind_as_ptr</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const detail::bind_as_ptr rttr::policy::prop::bind_as_ptr</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The <a class="el" href="structrttr_1_1policy_1_1prop.html#af18a7107143029acd396d39abfd8c94c">bind_as_ptr</a> policy will bind a member object as <em>pointer</em> type. </p>
<p>This can be useful when binding big data types, like arrays, to avoid copies during get/set of the property.</p>
<p>See following example code: </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacerttr.html">rttr</a>;</div><div class="line"><span class="keyword">struct </span>Foo</div><div class="line">{</div><div class="line">  std::vector&lt;int&gt; vec;</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="registration_8h.html#ac6326400f16225ee15b52eabcaae8130">RTTR_REGISTRATION</a></div><div class="line">{</div><div class="line">     <a class="code" href="classrttr_1_1registration_1_1class__.html">registration::class_&lt;Foo&gt;</a>(<span class="stringliteral">&quot;Foo&quot;</span>)</div><div class="line">                  .<a class="code" href="classrttr_1_1registration_1_1class__.html#a005a60417fb6d183af475cb4059dc0a0">property</a>(<span class="stringliteral">&quot;vec&quot;</span>, &amp;Foo::vec)</div><div class="line">                  (</div><div class="line">                      <a class="code" href="structrttr_1_1policy_1_1prop.html#af18a7107143029acd396d39abfd8c94c">policy::prop::bind_as_ptr</a></div><div class="line">                  );</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div><div class="line">  Foo obj;</div><div class="line">  <span class="keyword">property</span> prop = type::get&lt;Foo&gt;().get_property(<span class="stringliteral">&quot;vec&quot;</span>);</div><div class="line">  <a class="code" href="classrttr_1_1variant.html">variant</a> var = prop.<a class="code" href="classrttr_1_1variant.html#aa3a9f7e07cdc4d922a4e09882c5c0574">get_value</a>(obj);</div><div class="line">  std::cout &lt;&lt; var.<a class="code" href="classrttr_1_1variant.html#a8a2fe635a8452ac3a2370589d6fc4bfb">is_type</a>&lt;std::vector&lt;int&gt;*&gt;(); <span class="comment">// prints &quot;true&quot;</span></div><div class="line">  prop.set_value(obj, var);                      <span class="comment">// not really necessary, but remark that now a std::vector&lt;int&gt;* is expected</span></div><div class="line">  <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> 
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="policy_8h_source.html">policy.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>
Generated on Thu Apr 11 2019 20:05:59 for rttr - 0.9.6 by 
<a href="http://www.doxygen.org/index.html">doxygen</a>.
</small>
</address>
</body>
</html>